Documentation ¶
Index ¶
- type Config
- type Container
- type Endpoint
- type Image
- type Portainer
- func (p *Portainer) Auth() error
- func (p *Portainer) CreateContainer(e uint, body map[string]interface{}) (id string, err error)
- func (p *Portainer) ListContainers(e uint) ([]Container, error)
- func (p *Portainer) ListEndpoints() ([]Endpoint, error)
- func (p *Portainer) ListImages(e uint) (images []Image, err error)
- func (p *Portainer) RemoveContainer(e uint, id string) (int, error)
- func (p *Portainer) StartContainer(e uint, id string) (int, error)
- func (p *Portainer) StopContainer(e uint, id string) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct { ID string `json:"Id"` Names []string `json:"Names"` Image string `json:"Image"` ImageID string `json:"ImageID"` Command string `json:"Command"` Created int `json:"Created"` State string `json:"State"` Status string `json:"Status"` Ports []struct { PrivatePort int `json:"PrivatePort"` PublicPort int `json:"PublicPort"` Type string `json:"Type"` } `json:"Ports"` Labels map[string]string `json:"Labels,omitempty"` SizeRw int `json:"SizeRw"` SizeRootFs int `json:"SizeRootFs"` HostConfig struct { NetworkMode string `json:"NetworkMode"` } `json:"HostConfig"` NetworkSettings struct { Networks struct { Bridge struct { IPAMConfig interface{} `json:"IPAMConfig"` Links interface{} `json:"Links"` Aliases interface{} `json:"Aliases"` NetworkID string `json:"NetworkID"` EndpointID string `json:"EndpointID"` Gateway string `json:"Gateway"` IPAddress string `json:"IPAddress"` IPPrefixLen int `json:"IPPrefixLen"` IPv6Gateway string `json:"IPv6Gateway"` GlobalIPv6Address string `json:"GlobalIPv6Address"` GlobalIPv6PrefixLen int `json:"GlobalIPv6PrefixLen"` MacAddress string `json:"MacAddress"` } `json:"bridge"` } `json:"Networks"` } `json:"NetworkSettings"` Mounts []struct { Name string `json:"Tag"` Source string `json:"Source"` Destination string `json:"Destination"` Driver string `json:"Driver"` Mode string `json:"Mode"` RW bool `json:"RW"` Propagation string `json:"Propagation"` } `json:"Mounts"` }
type Image ¶
type Image struct { Containers int `json:"Containers"` Created int `json:"Created"` ID string `json:"Id"` Labels interface{} `json:"Labels"` ParentID string `json:"ParentId"` RepoDigests []string `json:"RepoDigests"` RepoTags []string `json:"RepoTags"` Size int `json:"Size"` VirtualSize int `json:"VirtualSize"` }
type Portainer ¶
func NewPortainer ¶
func (*Portainer) CreateContainer ¶
noinspection GoNilness
func (*Portainer) ListEndpoints ¶
func (*Portainer) RemoveContainer ¶
noinspection GoNilness
func (*Portainer) StartContainer ¶
noinspection GoNilness
Click to show internal directories.
Click to hide internal directories.