cmd

package
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2021 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NameDataDir = ".portainer-cli"
)

Variables

View Source
var (
	User     string
	Password string
)
View Source
var (
	RegistryUser          string
	RegistryPassword      string
	RegistryServerAddress string
)
View Source
var (
	// portainer host
	Host    string
	Datadir string
	Verbose bool
)
View Source
var (
	Repo    = ""
	Branch  = ""
	Commit  = ""
	Version = ""
)

Functions

func Execute

func Execute()

func GetContainerSpec added in v0.0.13

func GetContainerSpec(instanceAnswer string) (containerID, endpointName, imageName, state string)

func SplitFullImageName added in v0.0.10

func SplitFullImageName(name string) (imageName, imageTag string)

func SplitFullRegistryImageName added in v0.0.10

func SplitFullRegistryImageName(name string) (dockerRegistryHost, imageShortName, imageTag string)

SplitFullRegistryImageName split dockerRegistryHost/imageShortName/imageTag into each piece example: dockerhub.com/ccx/go-test-grpc-srv:v1.0.0 yields [dockerhub.com ccx/go-test-grpc-srv v1.0.0]

Types

type Manager

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

func (*Manager) Login

func (c *Manager) Login(user string, password string) error

func (*Manager) SyncData

func (c *Manager) SyncData() error

SyncData portainer 服务器数据同步到本地 db 缓存

func (*Manager) UpgradeService added in v0.0.13

func (c *Manager) UpgradeService(
	ctx context.Context,
	containerID string,
	targetImageTag string,
) error

UpgradeService Do deploy specified docker with given image tag

Jump to

Keyboard shortcuts

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