extendedregistry

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsertoClient

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

func (*AsertoClient) CreateRepo added in v0.1.19

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) ListOrgs

func (*AsertoClient) ListPublicRepos

func (*AsertoClient) ListRepos

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 added in v0.1.19

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)
	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

func NewAsertoClient

func NewAsertoClient(ctx context.Context, logger *zerolog.Logger, cfg *Config) (ExtendedClient, error)

func NewGHCRClient

func NewGHCRClient(logger *zerolog.Logger, cfg *Config, client *http.Client) ExtendedClient

when page size is -1 grab loop through all pages

type GHCRClient

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

func (*GHCRClient) CreateRepo added in v0.1.19

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) ListOrgs

func (*GHCRClient) ListPublicRepos

func (*GHCRClient) ListRepos

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 added in v0.1.19

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