client

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

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

APIClient provided the http client for trigger http requests

func NewAPIClient

func NewAPIClient(config APIClientConfig) (*APIClient, error)

NewAPIClient is constructor of APIClient

func (*APIClient) Delete

func (ac *APIClient) Delete(url string) error

Delete data

func (*APIClient) Get

func (ac *APIClient) Get(url string) ([]byte, error)

Get data

func (*APIClient) Post

func (ac *APIClient) Post(url string, data []byte) error

Post data

func (*APIClient) SwitchAccount

func (ac *APIClient) SwitchAccount(username, password string)

SwitchAccount : Switch account

type APIClientConfig

type APIClientConfig struct {
	Username string
	Password string
	CaFile   string
	CertFile string
	KeyFile  string
	Proxy    string
}

APIClientConfig : Keep config options for APIClient

type DockerClient

type DockerClient struct{}

DockerClient : Run docker commands

func (*DockerClient) Login

func (dc *DockerClient) Login(userName, password string, uri string) error

Login : Login docker

func (*DockerClient) Pull

func (dc *DockerClient) Pull(image string) error

Pull : Pull image

func (*DockerClient) Push

func (dc *DockerClient) Push(image string) error

Push : push image

func (*DockerClient) Status

func (dc *DockerClient) Status() error

Status : Check if docker daemon is there

func (*DockerClient) Tag

func (dc *DockerClient) Tag(source, target string) error

Tag :Tag image

Jump to

Keyboard shortcuts

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