dockerhub

package
v0.0.0-...-dc8d2b7 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TokensFilePath = filepath.Join(os.Getenv("HOME"), ".dockerhub_tokens")

Functions

This section is empty.

Types

type BuildSetting

type BuildSetting struct {
	Autobuild    bool   `json:"autobuild"`
	BuildContext string `json:"build_context"`
	Dockerfile   string `json:"dockerfile"`
	Nocache      bool   `json:"nocache"`
	SourceName   string `json:"source_name"`
	SourceType   string `json:"source_type"`
	Tag          string `json:"tag"`
}

type Client

type Client struct {
	RestyClient *resty.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient() (*Client, error)

func (*Client) CreateRepository

func (c *Client) CreateRepository(repo *Repository) error

func (*Client) EachRepository

func (c *Client) EachRepository(user string, cb func(*Repository)) error

func (*Client) ListRepositories

func (c *Client) ListRepositories(user string, page, pageSize int) (*RepositoryList, error)

func (*Client) UpdateBuildSettings

func (c *Client) UpdateBuildSettings(repo *Repository) error

type Repository

type Repository struct {
	Owner         string         `json:"owner"`
	Name          string         `json:"name"`
	Namespace     string         `json:"namespace"`
	Private       bool           `json:"is_private"`
	Privacy       string         `json:"privacy"`
	Provider      string         `json:"provider"`
	Repository    string         `json:"repository"`
	Registry      string         `json:"registry"`
	Image         string         `json:"image"`
	BuildSettings []BuildSetting `json:"build_settings"`
}

type RepositoryList

type RepositoryList struct {
	Count    int          `json:"count"`
	Next     string       `json:"next"`
	Previous string       `json:"previous"`
	Results  []Repository `json:"results"`
}

Jump to

Keyboard shortcuts

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