Documentation ¶
Index ¶
- Constants
- func AddConfig(opts flagsets.ConfigOptions, config flagsets.Config) error
- func ConfigHandler() flagsets.ConfigOptionTypeSetHandler
- func Is(spec accspeccpi.AccessSpec) bool
- type AccessSpec
- func (a *AccessSpec) AccessMethod(cv accspeccpi.ComponentVersionAccess) (accspeccpi.AccessMethod, error)
- func (a *AccessSpec) Describe(ctx accspeccpi.Context) string
- func (a *AccessSpec) GetInexpensiveContentVersionIdentity(cv accspeccpi.ComponentVersionAccess) string
- func (a *AccessSpec) GetMimeType() string
- func (a *AccessSpec) GetReferenceHint(cv accspeccpi.ComponentVersionAccess) string
- func (a *AccessSpec) GlobalAccessSpec(ctx accspeccpi.Context) accspeccpi.AccessSpec
- func (a *AccessSpec) IsLocal(accspeccpi.Context) bool
- func (a AccessSpec) MarshalJSON() ([]byte, error)
- type AccessSpecV1
Constants ¶
View Source
const ( Type = "localBlob" TypeV1 = Type + runtime.VersionSeparator + "v1" )
Type is the access type of a blob local to a component.
Variables ¶
This section is empty.
Functions ¶
func ConfigHandler ¶
func ConfigHandler() flagsets.ConfigOptionTypeSetHandler
func Is ¶
func Is(spec accspeccpi.AccessSpec) bool
Types ¶
type AccessSpec ¶
type AccessSpec struct { runtime.InternalVersionedTypedObject[accspeccpi.AccessSpec] // LocalReference is the repository local identity of the blob. // it is used by the repository implementation to get access // to the blob and if therefore specific to a dedicated repository type. LocalReference string `json:"localReference"` // MediaType is the media type of the object represented by the blob MediaType string `json:"mediaType"` // GlobalAccess is an optional field describing a possibility // for a global access. If given, it MUST describe a global access method. GlobalAccess *accspeccpi.AccessSpecRef `json:"globalAccess,omitempty"` // ReferenceName is an optional static name the object should be // use in a local repository context. It is use by a repository // to optionally determine a globally referencable access according // to the OCI distribution spec. The result will be stored // by the repository in the field ImageReference. // The value is typically an OCI repository name optionally // followed by a colon ':' and a tag ReferenceName string `json:"referenceName,omitempty"` }
AccessSpec describes the access for a local blob.
func Decode ¶
func Decode(data []byte) (*AccessSpec, error)
func New ¶
func New(local, hint string, mediaType string, global accspeccpi.AccessSpec) *AccessSpec
New creates a new localFilesystemBlob accessor.
func (*AccessSpec) AccessMethod ¶
func (a *AccessSpec) AccessMethod(cv accspeccpi.ComponentVersionAccess) (accspeccpi.AccessMethod, error)
func (*AccessSpec) Describe ¶
func (a *AccessSpec) Describe(ctx accspeccpi.Context) string
func (*AccessSpec) GetInexpensiveContentVersionIdentity ¶
func (a *AccessSpec) GetInexpensiveContentVersionIdentity(cv accspeccpi.ComponentVersionAccess) string
func (*AccessSpec) GetMimeType ¶
func (a *AccessSpec) GetMimeType() string
func (*AccessSpec) GetReferenceHint ¶
func (a *AccessSpec) GetReferenceHint(cv accspeccpi.ComponentVersionAccess) string
func (*AccessSpec) GlobalAccessSpec ¶
func (a *AccessSpec) GlobalAccessSpec(ctx accspeccpi.Context) accspeccpi.AccessSpec
func (*AccessSpec) IsLocal ¶
func (a *AccessSpec) IsLocal(accspeccpi.Context) bool
func (AccessSpec) MarshalJSON ¶
func (a AccessSpec) MarshalJSON() ([]byte, error)
type AccessSpecV1 ¶
type AccessSpecV1 struct { runtime.ObjectVersionedType `json:",inline"` // LocalReference is the repository local identity of the blob. // it is used by the repository implementation to get access // to the blob and if therefore specific to a dedicated repository type. LocalReference string `json:"localReference"` // MediaType is the media type of the object represented by the blob MediaType string `json:"mediaType"` // GlobalAccess is an optional field describing a possibility // for a global access. If given, it MUST describe a global access method. GlobalAccess *accspeccpi.AccessSpecRef `json:"globalAccess,omitempty"` // ReferenceName is an optional static name the object should be // use in a local repository context. It is use by a repository // to optionally determine a globally referencable access according // to the OCI distribution spec. The result will be stored // by the repository in the field ImageReference. // The value is typically an OCI repository name optionally // followed by a colon ':' and a tag ReferenceName string `json:"referenceName,omitempty"` }
Click to show internal directories.
Click to hide internal directories.