Help us shape the future of Go! Take the 2026 Go Developer Survey

ghcr

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 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) CreationOptions added in v0.1.2

CreationOptions implements the Provider interface

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) ProviderClassInfo added in v0.2.0

func (*ImageLister) ProviderClassInfo() *minderv1.ProviderClassInfo

ProviderClassInfo implements the Provider interface

func (*ImageLister) RegisterEntity

func (i *ImageLister) RegisterEntity(
	_ context.Context, entType minderv1.Entity, props *properties.Properties,
) (*properties.Properties, error)

RegisterEntity 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