Documentation
¶
Overview ¶
Package ghcr provides a client for interacting with the GitHub Container Registry
Index ¶
- Constants
- func ParseV1Config(rawCfg json.RawMessage) (*minderv1.GHCRProviderConfig, error)
- type ImageLister
- func (_ *ImageLister) CanImplement(trait minderv1.ProviderType) bool
- func (_ *ImageLister) FetchAllProperties(_ context.Context, _ string, _ minderv1.Entity) (*properties.Properties, error)
- func (_ *ImageLister) FetchProperty(_ context.Context, _ string, _ minderv1.Entity, _ string) (*properties.Property, error)
- func (_ *ImageLister) GetEntityName(_ minderv1.Entity, _ *properties.Properties) (string, error)
- func (g *ImageLister) GetNamespaceURL() string
- func (g *ImageLister) ListImages(ctx context.Context) ([]string, error)
Constants ¶
const GHCR = "ghcr"
GHCR is the string that represents the GHCR provider
Variables ¶
This section is empty.
Functions ¶
func ParseV1Config ¶
func ParseV1Config(rawCfg json.RawMessage) (*minderv1.GHCRProviderConfig, error)
ParseV1Config parses the raw configuration into a GHCR configuration
Types ¶
type ImageLister ¶
type ImageLister struct {
// contains filtered or unexported fields
}
ImageLister is the struct that contains the ImageLister client
func FromGitHubClient ¶
func FromGitHubClient(client *github.Client, namespace string) *ImageLister
FromGitHubClient creates a new GHCR client from an existing GitHub client
func New ¶
func New(cred provifv1.OAuth2TokenCredential, cfg *minderv1.GHCRProviderConfig) *ImageLister
New creates a new GHCR client
func (*ImageLister) CanImplement ¶
func (_ *ImageLister) CanImplement(trait minderv1.ProviderType) bool
CanImplement returns true/false depending on whether the GHCR client can implement the specified trait
func (*ImageLister) FetchAllProperties ¶ added in v0.0.59
func (_ *ImageLister) FetchAllProperties(_ context.Context, _ string, _ minderv1.Entity) (*properties.Properties, error)
FetchAllProperties implements the provider interface TODO: Implement this
func (*ImageLister) FetchProperty ¶ added in v0.0.59
func (_ *ImageLister) FetchProperty(_ context.Context, _ string, _ minderv1.Entity, _ string) (*properties.Property, error)
FetchProperty implements the provider interface TODO: Implement this
func (*ImageLister) GetEntityName ¶ added in v0.0.59
func (_ *ImageLister) GetEntityName(_ minderv1.Entity, _ *properties.Properties) (string, error)
GetEntityName implements the provider interface TODO: Implement this
func (*ImageLister) GetNamespaceURL ¶
func (g *ImageLister) GetNamespaceURL() string
GetNamespaceURL returns the URL of the GHCR container namespace
func (*ImageLister) ListImages ¶
func (g *ImageLister) ListImages(ctx context.Context) ([]string, error)
ListImages lists the containers in the GHCR