Documentation ¶
Index ¶
- Variables
- func ParseName(fullName string) (namespace, repository string, err error)
- type Authorizer
- type Client
- func (c *Client) DeleteManifest(image string, manifest *image.ImageManifest) error
- func (c *Client) ExistBlob(repository, digest string) (bool, error)
- func (c *Client) GetManifest(image string) (*image.ImageManifest, error)
- func (c *Client) ListNamespaces() []string
- func (c *Client) ListRepositories() *image.APIRepositories
- func (c *Client) ListTags(repository string) *image.APIRepository
- func (c *Client) LoginDockerHub() error
- func (c *Client) PullBlob(repository, digest string) (string, int64, error)
- func (c *Client) PushBlob(repository, digest, blobPath string, size int64) error
- func (c *Client) PutManifest(image string, manifest *image.ImageManifest) error
- func (c *Client) Synchronize() error
- type NamespacesResponse
- type RepositoriesResponse
- type Repository
- type Tag
- type TagsResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var Logger = log.Log.WithName("dockerhub-registry")
Functions ¶
Types ¶
type Authorizer ¶
type Client ¶
type Client struct {
Name, Namespace string
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(c client.Client, registry types.NamespacedName, scheme *runtime.Scheme, httpClient *cmhttp.HttpClient) *Client
NewClient is api client of internal registry
func (*Client) DeleteManifest ¶
func (c *Client) DeleteManifest(image string, manifest *image.ImageManifest) error
DeleteManifest deletes manifest in the registry
func (*Client) GetManifest ¶
func (c *Client) GetManifest(image string) (*image.ImageManifest, error)
GetManifest gets manifests of image in the registry
func (*Client) ListNamespaces ¶
func (*Client) ListRepositories ¶
func (c *Client) ListRepositories() *image.APIRepositories
ListRepositories get repository list from registry server
func (*Client) ListTags ¶
func (c *Client) ListTags(repository string) *image.APIRepository
ListTags get tag list of repository from registry server
func (*Client) LoginDockerHub ¶
func (*Client) PutManifest ¶
func (c *Client) PutManifest(image string, manifest *image.ImageManifest) error
PutManifest updates manifest in the registry
func (*Client) Synchronize ¶
Synchronize synchronizes repository list between tmax.io.Repository resource and Registry server
type NamespacesResponse ¶
type NamespacesResponse struct {
Namespaces []string `json:"namespaces"`
}
type RepositoriesResponse ¶
type RepositoriesResponse struct { Count int `json:"count"` Next string `json:"next"` Previous string `json:"previous"` Repositories []Repository `json:"results"` }
type Repository ¶
type Repository struct { User string `json:"user"` Name string `json:"name"` Namespace string `json:"namespace"` RepositoryType string `json:"repository_type"` Status int `json:"status"` Description string `json:"description"` IsPrivate bool `json:"is_private"` IsAutomated bool `json:"is_automated"` CanEdit bool `json:"can_edit"` StarCount int `json:"star_count"` PullCount int `json:"pull_count"` LastUpdated time.Time `json:"last_updated"` IsMigrated bool `json:"is_migrated"` CollaboratorCount int `json:"collaborator_count"` Affiliation string `json:"affiliation"` HubUser string `json:"hub_user"` }
Click to show internal directories.
Click to hide internal directories.