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(c accspeccpi.ComponentVersionAccess) (accspeccpi.AccessMethod, error)
- func (a *AccessSpec) Describe(ctx accspeccpi.Context) string
- func (_ *AccessSpec) GetType() string
- func (a *AccessSpec) GlobalAccessSpec(ctx accspeccpi.Context) accspeccpi.AccessSpec
- func (_ *AccessSpec) IsLocal(accspeccpi.Context) bool
- type AccessSpecOptions
- type RepositoryService
Constants ¶
View Source
const ( Type = "gitHub" TypeV1 = Type + runtime.VersionSeparator + "v1" )
Type is the access type of GitHub registry.
View Source
const ( LegacyType = "github" LegacyTypeV1 = LegacyType + runtime.VersionSeparator + "v1" )
View Source
const ShaLength = 40
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.ObjectVersionedType `json:",inline"` // RepoUrl is the repository URL, with host, owner and repository RepoURL string `json:"repoUrl"` // APIHostname is an optional different hostname for accessing the GitHub REST API // for enterprise installations APIHostname string `json:"apiHostname,omitempty"` // Commit defines the hash of the commit Commit string `json:"commit"` // contains filtered or unexported fields }
AccessSpec describes the access for a GitHub registry.
func New ¶
func New(repoURL, apiHostname, commit string, opts ...AccessSpecOptions) *AccessSpec
New creates a new GitHub registry access spec version v1.
func (*AccessSpec) AccessMethod ¶
func (a *AccessSpec) AccessMethod(c accspeccpi.ComponentVersionAccess) (accspeccpi.AccessMethod, error)
func (*AccessSpec) Describe ¶
func (a *AccessSpec) Describe(ctx accspeccpi.Context) string
func (*AccessSpec) GetType ¶
func (_ *AccessSpec) GetType() string
func (*AccessSpec) GlobalAccessSpec ¶ added in v0.3.0
func (a *AccessSpec) GlobalAccessSpec(ctx accspeccpi.Context) accspeccpi.AccessSpec
func (*AccessSpec) IsLocal ¶
func (_ *AccessSpec) IsLocal(accspeccpi.Context) bool
type AccessSpecOptions ¶
type AccessSpecOptions func(s *AccessSpec)
AccessSpecOptions defines a set of options which can be applied to the access spec.
func WithClient ¶
func WithClient(client *http.Client) AccessSpecOptions
WithClient creates an access spec with a custom http client.
func WithDownloader ¶
func WithDownloader(downloader downloader.Downloader) AccessSpecOptions
WithDownloader defines a client with a custom downloader.
type RepositoryService ¶
type RepositoryService interface {
GetArchiveLink(ctx context.Context, owner, repo string, archiveformat github.ArchiveFormat, opts *github.RepositoryContentGetOptions, followRedirects bool) (*url.URL, *github.Response, error)
}
RepositoryService defines capabilities of a GitHub repository.
Click to show internal directories.
Click to hide internal directories.