Documentation
¶
Index ¶
- Constants
- func Is(spec accspeccpi.AccessSpec) bool
- func NewMethod(spec *AccessSpec, blob blobaccess.BlobAccess) (accspeccpi.AccessMethod, error)
- type AccessSpec
- func (a *AccessSpec) AccessMethod(cv accspeccpi.ComponentVersionAccess) (accspeccpi.AccessMethod, error)
- func (a *AccessSpec) Describe(ctx accspeccpi.Context) string
- func (a *AccessSpec) GetInexpensiveContentVersionIdentity(access accspeccpi.ComponentVersionAccess) string
- func (a *AccessSpec) GetReferenceHint(cv accspeccpi.ComponentVersionAccess) string
- func (_ *AccessSpec) GetType() string
- func (a *AccessSpec) GlobalAccessSpec(ctx accspeccpi.Context) accspeccpi.AccessSpec
- func (_ *AccessSpec) IsLocal(accspeccpi.Context) bool
Constants ¶
View Source
const ( Type = "compose" TypeV1 = Type + runtime.VersionSeparator + "v1" )
Type is the access type of GitHub registry.
Variables ¶
This section is empty.
Functions ¶
func Is ¶
func Is(spec accspeccpi.AccessSpec) bool
func NewMethod ¶
func NewMethod(spec *AccessSpec, blob blobaccess.BlobAccess) (accspeccpi.AccessMethod, error)
Types ¶
type AccessSpec ¶
type AccessSpec struct {
runtime.ObjectVersionedType `json:",inline"`
// Id is the internal id to identify the content
Id string `json:"id"`
// 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 GitHub registry.
func New ¶
func New(hint string, mediaType string, global accspeccpi.AccessSpec) *AccessSpec
New creates a new GitHub registry access spec version v1.
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(access accspeccpi.ComponentVersionAccess) string
func (*AccessSpec) GetReferenceHint ¶
func (a *AccessSpec) GetReferenceHint(cv accspeccpi.ComponentVersionAccess) string
func (*AccessSpec) GetType ¶
func (_ *AccessSpec) GetType() string
func (*AccessSpec) GlobalAccessSpec ¶
func (a *AccessSpec) GlobalAccessSpec(ctx accspeccpi.Context) accspeccpi.AccessSpec
func (*AccessSpec) IsLocal ¶
func (_ *AccessSpec) IsLocal(accspeccpi.Context) bool
Click to show internal directories.
Click to hide internal directories.