@@ -21,57 +21,57 @@ import (
2121 "github.com/theupdateframework/go-tuf/v2/metadata"
2222)
2323
24- // repositoryType struct for storing metadata
25- type repositoryType struct {
24+ // Type struct for storing metadata
25+ type Type struct {
2626 root * metadata.Metadata [metadata.RootType ]
2727 snapshot * metadata.Metadata [metadata.SnapshotType ]
2828 timestamp * metadata.Metadata [metadata.TimestampType ]
2929 targets map [string ]* metadata.Metadata [metadata.TargetsType ]
3030}
3131
3232// New creates an empty repository instance
33- func New () * repositoryType {
34- return & repositoryType {
33+ func New () * Type {
34+ return & Type {
3535 targets : map [string ]* metadata.Metadata [metadata.TargetsType ]{},
3636 }
3737}
3838
3939// Root returns metadata of type Root
40- func (r * repositoryType ) Root () * metadata.Metadata [metadata.RootType ] {
40+ func (r * Type ) Root () * metadata.Metadata [metadata.RootType ] {
4141 return r .root
4242}
4343
4444// SetRoot sets metadata of type Root
45- func (r * repositoryType ) SetRoot (meta * metadata.Metadata [metadata.RootType ]) {
45+ func (r * Type ) SetRoot (meta * metadata.Metadata [metadata.RootType ]) {
4646 r .root = meta
4747}
4848
4949// Snapshot returns metadata of type Snapshot
50- func (r * repositoryType ) Snapshot () * metadata.Metadata [metadata.SnapshotType ] {
50+ func (r * Type ) Snapshot () * metadata.Metadata [metadata.SnapshotType ] {
5151 return r .snapshot
5252}
5353
5454// SetSnapshot sets metadata of type Snapshot
55- func (r * repositoryType ) SetSnapshot (meta * metadata.Metadata [metadata.SnapshotType ]) {
55+ func (r * Type ) SetSnapshot (meta * metadata.Metadata [metadata.SnapshotType ]) {
5656 r .snapshot = meta
5757}
5858
5959// Timestamp returns metadata of type Timestamp
60- func (r * repositoryType ) Timestamp () * metadata.Metadata [metadata.TimestampType ] {
60+ func (r * Type ) Timestamp () * metadata.Metadata [metadata.TimestampType ] {
6161 return r .timestamp
6262}
6363
6464// SetTimestamp sets metadata of type Timestamp
65- func (r * repositoryType ) SetTimestamp (meta * metadata.Metadata [metadata.TimestampType ]) {
65+ func (r * Type ) SetTimestamp (meta * metadata.Metadata [metadata.TimestampType ]) {
6666 r .timestamp = meta
6767}
6868
6969// Targets returns metadata of type Targets
70- func (r * repositoryType ) Targets (name string ) * metadata.Metadata [metadata.TargetsType ] {
70+ func (r * Type ) Targets (name string ) * metadata.Metadata [metadata.TargetsType ] {
7171 return r .targets [name ]
7272}
7373
7474// SetTargets sets metadata of type Targets
75- func (r * repositoryType ) SetTargets (name string , meta * metadata.Metadata [metadata.TargetsType ]) {
75+ func (r * Type ) SetTargets (name string , meta * metadata.Metadata [metadata.TargetsType ]) {
7676 r .targets [name ] = meta
7777}
0 commit comments