controllers

package
v0.0.0-...-be21ac7 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2015 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULTTAG = "latest"

Variables

This section is empty.

Functions

func GetTLSConfig

func GetTLSConfig(path string, insecure bool) (t *tls.Config, err error)

Get tls config from path & insecure.

func LookupHost

func LookupHost(addr string) (*models.Host, int, *url.URL, error)

Lookup hosts by address. Return *models.Host, index, *url.URL, err

func NewRequest

func NewRequest(method, endpoint, host string) (q *quest.Requester, err error)

Create Request Client. We can set a host for switching the docker server.

func ParseURL

func ParseURL(addr string) (u *url.URL, err error)

Parse url and return *url.URL. tcp://0.0.0.:2375 unix:///var/run/docker.sock

Types

type AppsController

type AppsController struct{}

func NewApps

func NewApps() *AppsController

func (*AppsController) Index

func (a *AppsController) Index(w http.ResponseWriter, r *http.Request)

type ContainerActionsController

type ContainerActionsController struct{}

Container Actions Controller

func NewContainerActions

func NewContainerActions() *ContainerActionsController

func (*ContainerActionsController) Kill

Kill a container. POST /containers/:id/kill

func (*ContainerActionsController) Logs

Get container logs. GET /containers/:id/logs

func (*ContainerActionsController) Pause

Pause a container. POST /containers/:id/pause

func (*ContainerActionsController) Restart

Restart a container. POST /containers/:id/restart

func (*ContainerActionsController) Start

Start a container. POST /containers/:id/start

func (*ContainerActionsController) Stop

Stop a container. POST /containers/:id/stop

func (*ContainerActionsController) Top

List processes running inside a container. GET /containers/:id/top

func (*ContainerActionsController) UnPause

Unpause a container. POST /containers/:id/unpause

type ContainersController

type ContainersController struct{}

Containers Controller.

func NewContainers

func NewContainers() *ContainersController

func (*ContainersController) Create

func (*ContainersController) Destroy

Remove a container. DELETE /containers/:id

func (*ContainersController) Index

List containers. GET /containers

func (*ContainersController) Show

Inspect a container. GET /containers/:id

type ContainersDestoryOptions

type ContainersDestoryOptions struct {
	Force string `url:"force"`
	V     string `url:"v"`
}

Query Parameters for remove a container.

type ContainersIndexOptions

type ContainersIndexOptions struct {
	All     string `url:"all"`
	Limit   string `url:"limit"`
	Size    string `url:"size"`
	Since   string `url:"since"`
	Before  string `url:"before"`
	Filters string `url:"filters"`
}

Query Parameters for list containers.

type HostActionsController

type HostActionsController struct{}

Host Actions Controller.

func NewHostActions

func NewHostActions() *HostActionsController

func (*HostActionsController) Ping

Ping the docker server. GET /hosts/:id/ping

func (*HostActionsController) Version

Show the docker version information GET /hosts/:id/version

type HostsController

type HostsController struct{}

Hosts Container.

func NewHosts

func NewHosts() *HostsController

func (*HostsController) Create

func (h *HostsController) Create(w http.ResponseWriter, r *http.Request)

Add a host. POST /host

func (*HostsController) Destroy

func (h *HostsController) Destroy(w http.ResponseWriter, r *http.Request)

Remove a host. DELETE /hosts/:id

func (*HostsController) Index

List hosts. GET /hosts

type ImageActionsController

type ImageActionsController struct{}

Image Actions Controller.

func NewImageActions

func NewImageActions() *ImageActionsController

func (*ImageActionsController) History

Get the history of an image. GET /images/:id/history

func (*ImageActionsController) Push

Push an image on the registry Need X-Registry-Auth header POST /images/:id/push

func (*ImageActionsController) Tag

Tag an image into a repository POST /images/:id/tag

type ImagesController

type ImagesController struct{}

Images Container.

func NewImages

func NewImages() *ImagesController

func (*ImagesController) Create

func (ic *ImagesController) Create(w http.ResponseWriter, r *http.Request)

Create an image POST /images /docker_remote_api_v1.16/#create-an-image

func (*ImagesController) Destroy

func (ic *ImagesController) Destroy(w http.ResponseWriter, r *http.Request)

Remove an image. DELETE /images/:id

func (*ImagesController) Index

func (ic *ImagesController) Index(w http.ResponseWriter, r *http.Request)

List Images. GET /images

func (*ImagesController) Search

func (ic *ImagesController) Search(w http.ResponseWriter, r *http.Request)

Search images GET /images/search Search for an image on Docker Hub https://hub.docker.com/.

func (*ImagesController) Show

Inspect an image. GET /images/:id

type SystemController

type SystemController struct{}

System Controller.

func NewSystem

func NewSystem() *SystemController

func (*SystemController) Info

Display system-wide information. GET /info

Jump to

Keyboard shortcuts

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