Documentation
¶
Index ¶
- type AsertoClient
- func (c *AsertoClient) CreateRepo(ctx context.Context, org, repo string) error
- func (c *AsertoClient) GetTag(ctx context.Context, org, repo, tag string) (*api.RegistryRepoTag, error)
- func (c *AsertoClient) IsValidTag(ctx context.Context, org, repo, tag string) (bool, error)
- func (c *AsertoClient) ListOrgs(ctx context.Context, page *api.PaginationRequest) (*registry.ListOrgsResponse, error)
- func (c *AsertoClient) ListPublicRepos(ctx context.Context, org string, page *api.PaginationRequest) (*registry.ListPublicImagesResponse, error)
- func (c *AsertoClient) ListRepos(ctx context.Context, org string, page *api.PaginationRequest) (*registry.ListImagesResponse, *api.PaginationResponse, error)
- func (c *AsertoClient) ListTags(ctx context.Context, org, repo string, page *api.PaginationRequest, deep bool) ([]*api.RegistryRepoTag, *api.PaginationResponse, error)
- func (c *AsertoClient) RemoveImage(ctx context.Context, org, repo, tag string) error
- func (c *AsertoClient) RepoAvailable(ctx context.Context, org, repo string) (bool, error)
- func (c *AsertoClient) SetVisibility(ctx context.Context, org, repo string, public bool) error
- type Config
- type ExtendedClient
- func GetExtendedClient(ctx context.Context, server string, logger *zerolog.Logger, cfg *Config, ...) (ExtendedClient, error)
- func NewAsertoClient(ctx context.Context, logger *zerolog.Logger, cfg *Config) (ExtendedClient, error)
- func NewGHCRClient(logger *zerolog.Logger, cfg *Config, client *http.Client) ExtendedClient
- type GHCRClient
- func (g *GHCRClient) CreateRepo(ctx context.Context, org, repo string) error
- func (g *GHCRClient) GetTag(ctx context.Context, org, repo, tag string) (*api.RegistryRepoTag, error)
- func (g *GHCRClient) IsValidTag(ctx context.Context, org, repo, tag string) (bool, error)
- func (g *GHCRClient) ListOrgs(ctx context.Context, page *api.PaginationRequest) (*registry.ListOrgsResponse, error)
- func (g *GHCRClient) ListPublicRepos(ctx context.Context, org string, page *api.PaginationRequest) (*registry.ListPublicImagesResponse, error)
- func (g *GHCRClient) ListRepos(ctx context.Context, org string, page *api.PaginationRequest) (*registry.ListImagesResponse, *api.PaginationResponse, error)
- func (g *GHCRClient) ListTags(ctx context.Context, org, repo string, page *api.PaginationRequest, deep bool) ([]*api.RegistryRepoTag, *api.PaginationResponse, error)
- func (g *GHCRClient) RemoveImage(ctx context.Context, org, repo, tag string) error
- func (g *GHCRClient) RepoAvailable(ctx context.Context, org, repo string) (bool, error)
- func (g *GHCRClient) SetVisibility(ctx context.Context, org, repo string, public bool) error
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 (*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 ¶ added in v0.1.19
func (*AsertoClient) SetVisibility ¶
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 NewGHCRClient ¶
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 (*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 ¶ added in v0.1.19
func (*GHCRClient) SetVisibility ¶
Click to show internal directories.
Click to hide internal directories.