Documentation
¶
Index ¶
- Constants
- Variables
- func CloneRepository(projectName, repoOwner, repoName, branch, gho string) error
- func DeployProject(dInfo ProjectDeploymentInfo, opts *DeployParams) error
- func PullRepository(projectName, gho string) error
- type DeployFunc
- type DeployParams
- type DeserializeFunc
- type DockerCompose
- type Dockerfile
- type ProcessStore
- type ProjectDeploymentInfo
- type ShellScript
- type SingleCommand
Constants ¶
View Source
const DEF_REMOTE = "origin"
Variables ¶
View Source
var ProjectDeployment = map[db.ProjectType]DeserializeFunc{ db.ProjectTypeDockerfile: func(b []byte) (DeployFunc, error) { var v Dockerfile err := json.Unmarshal(b, &v) if err != nil { return nil, err } return func() error { return nil }, nil }, db.ProjectTypeCompose: func(b []byte) (DeployFunc, error) { var v DockerCompose err := json.Unmarshal(b, &v) if err != nil { return nil, err } return func() error { return nil }, nil }, db.ProjectTypeShell: func(b []byte) (DeployFunc, error) { var v ShellScript err := json.Unmarshal(b, &v) if err != nil { return nil, err } return func() error { return nil }, nil }, db.ProjectTypeCommand: func(b []byte) (DeployFunc, error) { var v SingleCommand err := json.Unmarshal(b, &v) if err != nil { return nil, err } return func() error { return nil }, nil }, }
Functions ¶
func CloneRepository ¶
func DeployProject ¶
func DeployProject(dInfo ProjectDeploymentInfo, opts *DeployParams) error
func PullRepository ¶
Types ¶
type DeployFunc ¶
type DeployFunc func() error
type DeployParams ¶
type DeserializeFunc ¶
type DeserializeFunc func([]byte) (DeployFunc, error)
type DockerCompose ¶
type DockerCompose struct {
FileLocation string `json:"file_location"`
}
func (*DockerCompose) Deploy ¶
func (*DockerCompose) Deploy(opts *DeployParams) error
func (*DockerCompose) Stop ¶
func (s *DockerCompose) Stop(projectName string) error
type Dockerfile ¶
type Dockerfile struct {
FileLocation string `json:"file_location"`
HostPorts string `json:"host_ports"`
ContainerPorts string `json:"container_ports"`
Volumes [][]string `json:"volumes"`
NetworkMode int `json:"network_mode"`
NetworkName string `json:"network_name"`
}
func (*Dockerfile) Deploy ¶
func (s *Dockerfile) Deploy(params *DeployParams) error
func (*Dockerfile) Stop ¶
func (s *Dockerfile) Stop(projectName string) error
type ProcessStore ¶
type ProcessStore struct {
// contains filtered or unexported fields
}
func NewProcessStore ¶
func NewProcessStore() *ProcessStore
type ProjectDeploymentInfo ¶
type ProjectDeploymentInfo interface {
Deploy(*DeployParams) error
Stop(string) error
// contains filtered or unexported methods
}
func GetProjectDeploymentInfo ¶
func GetProjectDeploymentInfo(projectType db.ProjectType, buf []byte) (ProjectDeploymentInfo, error)
type ShellScript ¶
type ShellScript struct {
FileLocation string `json:"file_location"`
}
func (*ShellScript) Deploy ¶
func (s *ShellScript) Deploy(params *DeployParams) error
func (*ShellScript) Stop ¶
func (s *ShellScript) Stop(projectName string) error
type SingleCommand ¶
func (*SingleCommand) Deploy ¶
func (s *SingleCommand) Deploy(params *DeployParams) error
func (*SingleCommand) Stop ¶
func (s *SingleCommand) Stop(projectName string) error
Click to show internal directories.
Click to hide internal directories.