dockerhub

package
v1.8.4-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a client to interact with DockerHub

func NewClient

func NewClient(registry *model.Registry) (*Client, error)

NewClient creates a new DockerHub client.

func (*Client) Do

func (c *Client) Do(method, path string, body io.Reader) (*http.Response, error)

Do performs http request to DockerHub, it will set token automatically.

type LoginCredential

type LoginCredential struct {
	User     string `json:"username"`
	Password string `json:"password"`
}

LoginCredential is request to login.

type NamespacesResp

type NamespacesResp struct {
	// Namespaces is a list of namespaces
	Namespaces []string `json:"namespaces"`
}

NamespacesResp is namespace list responsed from DockerHub.

type NewOrgReq

type NewOrgReq struct {
	// Name is name of the namespace
	Name string `json:"orgname"`
	// FullName ...
	FullName string `json:"full_name"`
	// Company ...
	Company string `json:"company"`
	// Location ...
	Location string `json:"location"`
	// ProfileUrl ...
	ProfileURL string `json:"profile_url"`
	// GravatarEmail ...
	GravatarEmail string `json:"gravatar_email"`
}

NewOrgReq is request to create a new org as namespace.

type Repo

type Repo struct {
	// User ...
	User string `json:"user"`
	// Name of the repo
	Name string `json:"name"`
	// Namespace of the repo
	Namespace string `json:"namespace"`
	// RepoType is type of the repo, e.g. 'image'
	RepoType string `json:"repository_type"`
	// Status ...
	Status int `json:"status"`
	// Description ...
	Description string `json:"description"`
	// IsPrivate indicates whether the repo is private
	IsPrivate bool `json:"is_private"`
	// IsAutomated ...
	IsAutomated bool `json:"is_automated"`
	// CanEdit ...
	CanEdit bool `json:"can_edit"`
	// StarCount ..
	StarCount int `json:"star_count"`
	// PullCount ...
	PullCount int `json:"pull_count"`
}

Repo describes a repo in DockerHub

type ReposResp

type ReposResp struct {
	// Count is total number of repos
	Count int `json:"count"`
	// Next is the URL of the next page
	Next string `json:"next"`
	// Previous is the URL of the previous page
	Previous string `json:"previous"`
	// Repos is repo list
	Repos []Repo `json:"results"`
}

ReposResp is response of repo list request

type Tag

type Tag struct {
	// Name of the tag
	Name string `json:"name"`
	// FullSize is size of the image
	FullSize int64 `json:"full_size"`
}

Tag describes a tag in DockerHub

type TagsResp

type TagsResp struct {
	// Count is total number of repos
	Count int `json:"count"`
	// Next is the URL of the next page
	Next string `json:"next"`
	// Previous is the URL of the previous page
	Previous string `json:"previous"`
	// Repos is tags list
	Tags []Tag `json:"results"`
}

TagsResp is response of tag list request

type TokenResp

type TokenResp struct {
	Token string `json:"token"`
}

TokenResp is response of login.

Jump to

Keyboard shortcuts

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