deploy

package
v0.0.0-...-ace3778 Latest Latest
Warning

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

Go to latest
Published: May 8, 2022 License: MIT Imports: 22 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Commands

func Commands() []cli.Command

Commands get commands of all deploy methods

func Register

func Register(ms ...Method)

Register register new deploy method

Types

type AwsS3

type AwsS3 struct {
	Local     string
	AccessKey string
	SecretKey string
	Bucket    string
	Region    string
}

func (*AwsS3) Command

func (a *AwsS3) Command() cli.Command

func (*AwsS3) Create

func (a *AwsS3) Create(ctx *cli.Context) (Method, error)

func (*AwsS3) Do

func (a *AwsS3) Do() error

func (*AwsS3) String

func (a *AwsS3) String() string

type Ftp

type Ftp struct {
	Local     string
	Host      string
	User      string
	Password  string
	Directory string
}

Ftp is ftp deployment

func (*Ftp) Command

func (f *Ftp) Command() cli.Command

Command return ftp deploy command

func (*Ftp) Create

func (f *Ftp) Create(ctx *cli.Context) (Method, error)

Create create ftp method from cli args

func (*Ftp) Do

func (f *Ftp) Do() error

Do do ftp deploy process

func (*Ftp) String

func (f *Ftp) String() string

String is ftp deploy's name

type Git

type Git struct {
	Repo    string
	Message string
	Local   string
	Branch  string
}

Git is deployment of git repository

func (*Git) Command

func (g *Git) Command() cli.Command

Command return git deploy command

func (*Git) Create

func (g *Git) Create(ctx *cli.Context) (Method, error)

Create creates git deploy settings in Context

func (*Git) Do

func (g *Git) Do() error

Do do git deploy action with built Context

func (*Git) String

func (g *Git) String() string

String return git deployment typename

type Method

type Method interface {
	Create(ctx *cli.Context) (Method, error)
	Do() error
	Command() cli.Command
	String() string
}

Method define deploy method behavior

type Qiniu

type Qiniu struct {
	Local     string
	AccessKey string
	SecretKey string
	Bucket    string
}

func (*Qiniu) Command

func (q *Qiniu) Command() cli.Command

func (*Qiniu) Create

func (q *Qiniu) Create(ctx *cli.Context) (Method, error)

func (*Qiniu) Do

func (q *Qiniu) Do() error

func (*Qiniu) String

func (q *Qiniu) String() string

type Sftp

type Sftp struct {
	Host      string
	User      string
	Password  string
	Directory string
	Local     string
	// contains filtered or unexported fields
}

func (*Sftp) Command

func (s *Sftp) Command() cli.Command

Command return sftp deploy command

func (*Sftp) Create

func (s *Sftp) Create(ctx *cli.Context) (Method, error)

func (*Sftp) Do

func (s *Sftp) Do() error

func (*Sftp) String

func (s *Sftp) String() string

func (*Sftp) UploadAll

func (s *Sftp) UploadAll(local string) error

upload files without checking diff status

Jump to

Keyboard shortcuts

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