deploy

package
v0.0.0-...-f696f8f Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultConfigName = "wb-go-deploy.yaml"
	SshPort           = 22
	SshUser           = "root"
	SshPassword       = "wirenboard"
	DefaultAppDir     = "/mnt/data/"
)

Functions

func Run

func Run(config *Config) error

Types

type BuildConfig

type BuildConfig struct {
	SrcDir string `yaml:"src_dir" validate:"required,dirpath"`
	OutDir string `yaml:"out_dir" validate:"required,dirpath"`
}

type Config

type Config struct {
	AppName     string            `yaml:"app_name" validate:"required"`
	Build       BuildConfig       `yaml:"build" validate:"required"`
	Environment map[string]string `yaml:"environment"`
	Devices     []Device          `yaml:"devices" validate:"required,min=1,dive"`
	WorkingDir  string
}

func GetConfig

func GetConfig(configPath string) (*Config, error)

type Device

type Device struct {
	Host     string `yaml:"host" validate:"required"`
	User     string `yaml:"user" validate:"required"`
	Password string `yaml:"password" validate:"required"`
	SshPort  int    `yaml:"ssh_port" validate:"required,min=1,max=65535"`
	AppDir   string `yaml:"app_dir" validate:"required"`
}

Jump to

Keyboard shortcuts

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