Documentation ¶
Index ¶
- Constants
- Variables
- func AddConfig(opts flagsets.ConfigOptions, config flagsets.Config) error
- func ConfigHandler() flagsets.ConfigOptionTypeSetHandler
- func Is(spec cpi.AccessSpec) bool
- type AccessSpec
- func (a *AccessSpec) AccessMethod(cv cpi.ComponentVersionAccess) (cpi.AccessMethod, error)
- func (a *AccessSpec) Describe(ctx cpi.Context) string
- func (a *AccessSpec) GetMimeType() string
- func (a *AccessSpec) GetReferenceHint(cv cpi.ComponentVersionAccess) string
- func (a *AccessSpec) IsLocal(cpi.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 ¶
View Source
var LocalBlobV1 = cpi.NewAccessSpecVersion(&AccessSpecV1{}, converterV1{})
Functions ¶
func ConfigHandler ¶
func ConfigHandler() flagsets.ConfigOptionTypeSetHandler
func Is ¶
func Is(spec cpi.AccessSpec) bool
Types ¶
type AccessSpec ¶
type AccessSpec struct { runtime.ObjectVersionedType // 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 *cpi.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 New ¶
func New(local, hint string, mediaType string, global cpi.AccessSpec) *AccessSpec
New creates a new localFilesystemBlob accessor.
func (*AccessSpec) AccessMethod ¶
func (a *AccessSpec) AccessMethod(cv cpi.ComponentVersionAccess) (cpi.AccessMethod, error)
func (*AccessSpec) GetMimeType ¶
func (a *AccessSpec) GetMimeType() string
func (*AccessSpec) GetReferenceHint ¶
func (a *AccessSpec) GetReferenceHint(cv cpi.ComponentVersionAccess) string
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 *internal.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.