ghcr

package
v0.0.68 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package ghcr provides a client for interacting with the GitHub Container Registry

Index

Constants

View Source
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

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

FetchAllProperties implements the provider interface TODO: Implement this

func (*ImageLister) FetchProperty

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL