extendedregistry

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: Apache-2.0 Imports: 23 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) GetTag

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

func (*AsertoClient) IsValidTag

func (c *AsertoClient) IsValidTag(org, repo, tag string) (bool, error)

func (*AsertoClient) ListOrgs

func (c *AsertoClient) ListOrgs(page *api.PaginationRequest) (*registry.ListOrgsResponse, *api.PaginationResponse, error)

func (*AsertoClient) ListPublicRepos

func (c *AsertoClient) ListPublicRepos(org string, page *api.PaginationRequest) (*registry.ListImagesResponse, *api.PaginationResponse, error)

func (*AsertoClient) ListRepos

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

func (*AsertoClient) ListTags

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

func (*AsertoClient) RemoveImage

func (c *AsertoClient) RemoveImage(org, repo, tag string) error

func (*AsertoClient) SetVisibility

func (c *AsertoClient) SetVisibility(org, repo string, public bool) error

type Config

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

type ExtendedClient

type ExtendedClient interface {
	ListOrgs(page *api.PaginationRequest) (*registry.ListOrgsResponse, *api.PaginationResponse, error)
	ListRepos(org string, page *api.PaginationRequest) (*registry.ListImagesResponse, *api.PaginationResponse, error)
	ListPublicRepos(org string, page *api.PaginationRequest) (*registry.ListImagesResponse, *api.PaginationResponse, error)
	ListTags(org, repo string, page *api.PaginationRequest) ([]*api.RegistryRepoTag, *api.PaginationResponse, error)
	GetTag(org, repo, tag string) (*api.RegistryRepoTag, error)
	SetVisibility(org, repo string, public bool) error
	RemoveImage(org, repo, tag string) error
	IsValidTag(org, repo, tag string) (bool, error)
}

func GetExtendedClient

func GetExtendedClient(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(logger *zerolog.Logger, cfg *Config, client *http.Client) ExtendedClient

TODO Use aserto-go SDK registry client

func NewGHCRClient

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

type GHCRClient

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

func (*GHCRClient) GetTag

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

func (*GHCRClient) IsValidTag

func (g *GHCRClient) IsValidTag(org, repo, tag string) (bool, error)

func (*GHCRClient) ListOrgs

func (g *GHCRClient) ListOrgs(page *api.PaginationRequest) (*registry.ListOrgsResponse, *api.PaginationResponse, error)

func (*GHCRClient) ListPublicRepos

func (g *GHCRClient) ListPublicRepos(org string, page *api.PaginationRequest) (*registry.ListImagesResponse, *api.PaginationResponse, error)

func (*GHCRClient) ListRepos

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

func (*GHCRClient) ListTags

func (g *GHCRClient) ListTags(org, repo string, page *api.PaginationRequest) ([]*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(org, repo, tag string) error

If tag not specified remove repository

func (*GHCRClient) SetVisibility

func (g *GHCRClient) SetVisibility(org, repo string, public bool) error

Directories

Path Synopsis
Package mock_sources is a generated GoMock package.
Package mock_sources is a generated GoMock package.

Jump to

Keyboard shortcuts

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