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) DeregisterEntity(_ context.Context, _ minderv1.Entity, _ *properties.Properties) error
- func (_ *ImageLister) FetchAllProperties(_ context.Context, _ *properties.Properties, _ minderv1.Entity, ...) (*properties.Properties, error)
- func (_ *ImageLister) FetchProperty(_ context.Context, _ *properties.Properties, _ 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)
- func (_ *ImageLister) PropertiesToProtoMessage(_ minderv1.Entity, _ *properties.Properties) (protoreflect.ProtoMessage, error)
- func (_ *ImageLister) RegisterEntity(_ context.Context, _ minderv1.Entity, _ *properties.Properties) (*properties.Properties, error)
- func (_ *ImageLister) ReregisterEntity(_ context.Context, _ minderv1.Entity, _ *properties.Properties) error
- func (_ *ImageLister) SupportsEntity(_ minderv1.Entity) bool
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) DeregisterEntity ¶
func (_ *ImageLister) DeregisterEntity(_ context.Context, _ minderv1.Entity, _ *properties.Properties) error
DeregisterEntity implements the Provider interface
func (*ImageLister) FetchAllProperties ¶
func (_ *ImageLister) FetchAllProperties( _ context.Context, _ *properties.Properties, _ minderv1.Entity, _ *properties.Properties, ) (*properties.Properties, error)
FetchAllProperties implements the provider interface TODO: Implement this
func (*ImageLister) FetchProperty ¶
func (_ *ImageLister) FetchProperty( _ context.Context, _ *properties.Properties, _ minderv1.Entity, _ string) (*properties.Property, error)
FetchProperty implements the provider interface TODO: Implement this
func (*ImageLister) GetEntityName ¶
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
func (*ImageLister) PropertiesToProtoMessage ¶
func (_ *ImageLister) PropertiesToProtoMessage(_ minderv1.Entity, _ *properties.Properties) (protoreflect.ProtoMessage, error)
PropertiesToProtoMessage implements the Provider interface
func (*ImageLister) RegisterEntity ¶
func (_ *ImageLister) RegisterEntity( _ context.Context, _ minderv1.Entity, _ *properties.Properties, ) (*properties.Properties, error)
RegisterEntity implements the Provider interface
func (*ImageLister) ReregisterEntity ¶
func (_ *ImageLister) ReregisterEntity( _ context.Context, _ minderv1.Entity, _ *properties.Properties, ) error
ReregisterEntity implements the Provider interface
func (*ImageLister) SupportsEntity ¶
func (_ *ImageLister) SupportsEntity(_ minderv1.Entity) bool
SupportsEntity implements the Provider interface