Documentation ¶
Overview ¶
Package tag is used for wrapping tag lists
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerList ¶
DockerList is returned from registry/2.0 API's.
func (DockerList) GetTags ¶
func (tl DockerList) GetTags() ([]string, error)
GetTags returns the tags from a list.
func (DockerList) MarshalPretty ¶
func (tl DockerList) MarshalPretty() ([]byte, error)
MarshalPretty is used for printPretty template formatting.
type GCRList ¶
type GCRList struct { Children []string `json:"child,omitempty"` Manifests map[string]GCRManifestInfo `json:"manifest,omitempty"` }
GCRList fields are from gcr.io.
type GCRManifestInfo ¶
type GCRManifestInfo struct { Size uint64 `json:"imageSizeBytes"` MediaType string `json:"mediaType"` Created time.Time `json:"timeCreatedMs"` Uploaded time.Time `json:"timeUploadedMs"` Tags []string `json:"tag"` }
GCRManifestInfo is a Manifests entry is the output of List and Walk.
func (GCRManifestInfo) MarshalJSON ¶
func (m GCRManifestInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*GCRManifestInfo) UnmarshalJSON ¶
func (m *GCRManifestInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler
type LayoutList ¶ added in v0.5.2
LayoutList includes the OCI Index from an OCI Layout.
type List ¶
type List struct { DockerList GCRList LayoutList // contains filtered or unexported fields }
List contains a tag list. Currently this is a struct but the underlying type could be changed to an interface in the future. Using methods is recommended over directly accessing fields.
func New ¶
New creates a tag list from options. Tags may be provided directly, or they will be parsed from the raw input based on the media type.
func (List) GetOrig ¶
func (t List) GetOrig() interface{}
GetOrig returns the underlying tag data structure if defined.
func (List) MarshalJSON ¶
MarshalJSON returns the tag list in json.
func (List) RawHeaders ¶
RawHeaders returns the received http headers.
type Opts ¶
type Opts func(*tagConfig)
Opts defines options for creating a new tag.
func WithHeaders ¶
WithHeaders includes data from http headers when creating tag list.
func WithLayoutIndex ¶ added in v0.5.2
WithLayoutIndex include the index from an OCI Layout.