extendedregistry

package
v0.1.35 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AnnotationPolicyRegistryType = "org.openpolicyregistry.type"
	PolicyTypePolicy             = "policy"

	AnnotationPolicyRegistryTemplateKind = "org.openpolicyregistry.template.kind"
	TemplateTypePolicy                   = "policy"
	TemplateTypeCICD                     = "cicd"

	AnnotationImageVendor      = "org.opencontainers.image.vendor"
	AnnotationImageAuthors     = "org.opencontainers.image.authors"
	AnnotationImageDescription = "org.opencontainers.image.description"
	AnnotationImageTitle       = "org.opencontainers.image.title"
	AnnotationImageCreated     = "org.opencontainers.image.created"
)

OCI Annotations

View Source
const (
	AsertoRegistryServiceName = "aserto.registry.v1.Registry"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AsertoClient

type AsertoClient struct {
	// contains filtered or unexported fields
}

func (*AsertoClient) CreateRepo

func (c *AsertoClient) CreateRepo(ctx context.Context, org, repo string) error

func (*AsertoClient) GetTag

func (c *AsertoClient) GetTag(ctx context.Context, org, repo, tag string) (*api.RegistryRepoTag, error)

func (*AsertoClient) IsValidTag

func (c *AsertoClient) IsValidTag(ctx context.Context, org, repo, tag string) (bool, error)

func (*AsertoClient) ListDigests

func (c *AsertoClient) ListDigests(ctx context.Context, org, repo string, page *api.PaginationRequest) ([]*api.RegistryRepoDigest, *api.PaginationResponse, error)

func (*AsertoClient) ListOrgs

func (c *AsertoClient) ListOrgs(ctx context.Context, page *api.PaginationRequest) (*registry.ListOrgsResponse, error)

func (*AsertoClient) ListPublicRepos

func (c *AsertoClient) ListPublicRepos(ctx context.Context, org string, page *api.PaginationRequest) (*registry.ListPublicImagesResponse, error)

func (*AsertoClient) ListRepos

func (c *AsertoClient) ListRepos(ctx context.Context, org string, page *api.PaginationRequest) (*registry.ListImagesResponse, *api.PaginationResponse, error)

func (*AsertoClient) ListTags

func (c *AsertoClient) ListTags(ctx context.Context, org, repo string, page *api.PaginationRequest, deep bool) ([]*api.RegistryRepoTag, *api.PaginationResponse, error)

func (*AsertoClient) RemoveImage

func (c *AsertoClient) RemoveImage(ctx context.Context, org, repo, tag string) error

func (*AsertoClient) RepoAvailable

func (c *AsertoClient) RepoAvailable(ctx context.Context, org, repo string) (bool, error)

func (*AsertoClient) SetVisibility

func (c *AsertoClient) SetVisibility(ctx context.Context, org, repo string, public bool) error

type Config

type Config struct {
	Address     string `json:"address"`
	GRPCAddress string `json:"extended"`
	Username    string `json:"username"`
	Password    string `json:"password"`
}

type ExtendedClient

type ExtendedClient interface {
	ListOrgs(ctx context.Context, page *api.PaginationRequest) (*registry.ListOrgsResponse, error)
	ListRepos(ctx context.Context, org string, page *api.PaginationRequest) (*registry.ListImagesResponse, *api.PaginationResponse, error)
	ListPublicRepos(ctx context.Context, org string, page *api.PaginationRequest) (*registry.ListPublicImagesResponse, error)
	ListTags(ctx context.Context, org, repo string, page *api.PaginationRequest, deep bool) ([]*api.RegistryRepoTag, *api.PaginationResponse, error)
	ListDigests(ctx context.Context, org, repo string, page *api.PaginationRequest) ([]*api.RegistryRepoDigest, *api.PaginationResponse, error)
	GetTag(ctx context.Context, org, repo, tag string) (*api.RegistryRepoTag, error)
	SetVisibility(ctx context.Context, org, repo string, public bool) error
	RemoveImage(ctx context.Context, org, repo, tag string) error
	IsValidTag(ctx context.Context, org, repo, tag string) (bool, error)
	RepoAvailable(ctx context.Context, org, repo string) (bool, error)
	CreateRepo(ctx context.Context, org, repo string) error
}

func GetExtendedClient

func GetExtendedClient(ctx context.Context, server string, logger *zerolog.Logger, cfg *Config, transport *http.Transport) (ExtendedClient, error)

TODO: This needs to be smarted - rework in progress

type GHCRClient

type GHCRClient struct {
	// contains filtered or unexported fields
}

func (*GHCRClient) CreateRepo

func (g *GHCRClient) CreateRepo(ctx context.Context, org, repo string) error

func (*GHCRClient) GetTag

func (g *GHCRClient) GetTag(ctx context.Context, org, repo, tag string) (*api.RegistryRepoTag, error)

func (*GHCRClient) IsValidTag

func (g *GHCRClient) IsValidTag(ctx context.Context, org, repo, tag string) (bool, error)

func (*GHCRClient) ListDigests

func (g *GHCRClient) ListDigests(ctx context.Context, org, repo string, page *api.PaginationRequest) ([]*api.RegistryRepoDigest, *api.PaginationResponse, error)

func (*GHCRClient) ListOrgs

func (g *GHCRClient) ListOrgs(ctx context.Context, page *api.PaginationRequest) (*registry.ListOrgsResponse, error)

func (*GHCRClient) ListPublicRepos

func (g *GHCRClient) ListPublicRepos(ctx context.Context, org string, page *api.PaginationRequest) (*registry.ListPublicImagesResponse, error)

func (*GHCRClient) ListRepos

func (g *GHCRClient) ListRepos(ctx context.Context, org string, page *api.PaginationRequest) (*registry.ListImagesResponse, *api.PaginationResponse, error)

func (*GHCRClient) ListTags

func (g *GHCRClient) ListTags(ctx context.Context, org, repo string, page *api.PaginationRequest, deep bool) ([]*api.RegistryRepoTag, *api.PaginationResponse, error)

ListTags returns tags on the image - if org is empty it returns the tags of the user's image

func (*GHCRClient) RemoveImage

func (g *GHCRClient) RemoveImage(ctx context.Context, org, repo, tag string) error

If tag not specified remove repository

func (*GHCRClient) RepoAvailable

func (g *GHCRClient) RepoAvailable(ctx context.Context, org, repo string) (bool, error)

func (*GHCRClient) SetVisibility

func (g *GHCRClient) SetVisibility(ctx context.Context, org, repo string, public bool) error

Jump to

Keyboard shortcuts

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