config

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SkeltonBytes

func SkeltonBytes() ([]byte, error)

Types

type AfterBench

type AfterBench struct {
	SlackChannelId string `yaml:"slack_channel_id,omitempty"`
	Target         string `yaml:"target,omitempty"`
	Command        string `yaml:"command,omitempty"`
}

type Alp

type Alp struct {
	Version string `yaml:"version,omitempty"`
}

type Config

type Config struct {
	Setup Setup  `yaml:"setup,omitempty"`
	Slack Slack  `yaml:"slack,omitempty"`
	Hosts []Host `yaml:"hosts,omitempty"`
}

func Skelton

func Skelton() (Config, error)

func (Config) IsAlpEnabled

func (c Config) IsAlpEnabled() (flag bool, version string)

func (Config) IsDockerEnabled

func (c Config) IsDockerEnabled() bool

func (Config) IsNetdataEnabled

func (c Config) IsNetdataEnabled() (flag bool, version string, port int)

type Deploy

type Deploy struct {
	SlackChannelId string         `yaml:"slack_channel_id,omitempty"`
	PreCommand     string         `yaml:"pre_command,omitempty"`
	PostCommand    string         `yaml:"post_command,omitempty"`
	Targets        []DeployTarget `yaml:"targets,omitempty"`
}

type DeployTarget

type DeployTarget struct {
	Src     string `yaml:"src,omitempty"`
	Target  string `yaml:"target,omitempty"`
	Compile string `yaml:"compile,omitempty"`
}

type Docker

type Docker struct {
	Netdata *Netdata `yaml:"netdata,omitempty"`
}

type Host

type Host struct {
	Host       string     `yaml:"host,omitempty"`
	Port       int        `yaml:"int,omitempty"`
	User       string     `yaml:"user,omitempty"`
	Key        string     `yaml:"key,omitempty"`
	Password   string     `yaml:"password,omitempty"`
	Deploy     Deploy     `yaml:"deploy,omitempty"`
	Profiling  Profiling  `yaml:"profiling,omitempty"`
	AfterBench AfterBench `yaml:"after_bench,omitempty"`
}

func (Host) IsLocal

func (c Host) IsLocal() bool

func (Host) ListTarget

func (c Host) ListTarget() []DeployTarget

type Netdata

type Netdata struct {
	Version    string `yaml:"version,omitempty"`
	PublicPort int    `yaml:"public_port,omitempty"`
}

type Profiling

type Profiling struct {
	Command string `yaml:"command,omitempty"`
}

type Setup

type Setup struct {
	Docker *Docker `yaml:"docker,omitempty"`
	Alp    *Alp    `yaml:"alp,omitempty"`
}

type Slack

type Slack struct {
	DefaultChannelId string `yaml:"default_channel_id,omitempty"`
}

Jump to

Keyboard shortcuts

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