types

package
v0.0.0-...-e8fc915 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveGlobalConfig

func SaveGlobalConfig() error

Types

type Compose

type Compose struct {
	Mode    string   `json:"mode" yaml:"mode"`
	Inline  string   `json:"inline,omitempty" yaml:"inline,omitempty"`
	Include []string `json:"include,omitempty" yaml:"include,omitempty"`
	Context string   `json:"context,omitempty" yaml:"context,omitempty"`
	Sudo    bool     `json:"sudo,omitempty" yaml:"sudo,omitempty"`
}

type Discovery

type Discovery struct {
	Include []string `json:"include" yaml:"include"`
	Exclude []string `json:"exclude" yaml:"exclude"`
}

type Dns

type Dns struct {
	Driver string            `json:"driver" yaml:"driver"`
	Zone   string            `json:"zone" yaml:"zone"`
	Env    map[string]string `json:"env,omitempty" yaml:"env,omitempty"`
	Use    string            `json:"use" yaml:"use"`
}

type GlobalConfig

type GlobalConfig struct {
	Hosts      map[string]Host   `json:"hosts" yaml:"hosts"`
	Workspaces map[string]string `json:"scopes" yaml:"scopes"`
	Paths      *GlobalPaths      `json:"paths" yaml:"paths"`
}

func GetGlobalConfig

func GetGlobalConfig() (*GlobalConfig, error)

type GlobalConfigFile

type GlobalConfigFile struct {
	File   string
	Config *GlobalConfig
}

func (*GlobalConfigFile) Load

func (cfg *GlobalConfigFile) Load() error

func (*GlobalConfigFile) Save

func (cfg *GlobalConfigFile) Save() error

type GlobalPaths

type GlobalPaths struct {
	Cache string `json:"cache" yaml:"cache"`
}

type Hooks

type Hooks struct {
	Before       []Task `json:"before" yaml:"before"`
	After        []Task `json:"after" yaml:"after"`
	BeforeDeploy []Task `json:"before-deploy" yaml:"before-deploy"`
	AfterDeploy  []Task `json:"after-deploy" yaml:"after-deploy"`
	BeforeRemove []Task `json:"before-remove" yaml:"before-remove"`
	AfterRemove  []Task `json:"after-remove" yaml:"after-remove"`
}

type Host

type Host struct {
	Host     string `json:"host" yaml:"host"`
	Port     int    `json:"port" yaml:"port"`
	User     string `json:"user" yaml:"user"`
	Identity string `json:"identity" yaml:"identity"`
}

type Jolt9

type Jolt9 struct {
	Name     string            `json:"name" yaml:"name"`
	Secrets  []Secret          `json:"secrets,omitempty" yaml:"secrets,omitempty"`
	Vaults   []Vault           `json:"vaults,omitempty" yaml:"vaults,omitempty"`
	Env      map[string]string `json:"env,omitempty" yaml:"env,omitempty"`
	Dns      *Dns              `json:"dns,omitempty" yaml:"dns,omitempty"`
	Files    []string          `json:"files,omitempty" yaml:"files,omitempty"`
	Hooks    *Hooks            `json:"hooks,omitempty" yaml:"hooks,omitempty"`
	Inherits []string          `json:"inherits,omitempty" yaml:"inherits,omitempty"`
	Compose  *Compose          `json:"compose,omitempty" yaml:"compose,omitempty"`
	Ssh      *Ssh              `json:"ssh,omitempty" yaml:"ssh,omitempty"`
}

func (*Jolt9) Merge

func (j *Jolt9) Merge(j2 *Jolt9)

func (*Jolt9) MergeSecrets

func (j *Jolt9) MergeSecrets(secrets []Secret)

func (*Jolt9) MergeVaults

func (j *Jolt9) MergeVaults(vaults []Vault)

func (*Jolt9) PrependMergeSecrets

func (j *Jolt9) PrependMergeSecrets(secrets []Secret)

func (*Jolt9) PrependMergeVaults

func (j *Jolt9) PrependMergeVaults(vaults []Vault)

func (*Jolt9) ResolveInheritence

func (j *Jolt9) ResolveInheritence(dir string) (*Jolt9, error)

type Project

type Project struct {
	Targets map[string]string `json:"targets" yaml:"targets"`
}

func (*Project) UnmarshalYAML

func (p *Project) UnmarshalYAML(node *yaml.Node) error

type Secret

type Secret struct {
	Name    string `json:"name" yaml:"name"`
	Use     string `json:"use" yaml:"use"`
	Key     string `json:"key" yaml:"key"`
	Vault   string `json:"vault" yaml:"vault"`
	Gen     bool   `json:"gen" yaml:"gen"`
	Special string `json:"special" yaml:"special"`
	Digits  bool   `json:"digits" yaml:"digits"`
	Lower   bool   `json:"lower" yaml:"lower"`
	Upper   bool   `json:"upper" yaml:"upper"`
	Size    int    `json:"size" yaml:"size"`
}

func (*Secret) UnmarshalYAML

func (s *Secret) UnmarshalYAML(node *yaml.Node) error

type Secrets

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

type Ssh

type Ssh struct {
	Host     string `json:"host" yaml:"host"`
	Port     int    `json:"port" yaml:"port"`
	User     string `json:"user" yaml:"user"`
	Identity string `json:"identity" yaml:"identity"`
}

type Task

type Task struct {
	Name    string            `json:"name" yaml:"name"`
	Run     string            `json:"run" yaml:"run"`
	Timeout string            `json:"timeout" yaml:"timeout"`
	Env     map[string]string `json:"env" yaml:"env"`
	Use     string            `json:"use" yaml:"use"`
}

type Vault

type Vault struct {
	Name string `json:"name" yaml:"name"`
	Uri  string `json:"uri" yaml:"uri"`
	Use  string `json:"use" yaml:"use"`
	With map[string]interface{}
}

type Workspace

type Workspace struct {
	Name      string             `json:"name" yaml:"name"`
	Vaults    []Vault            `json:"vaults,omitempty" yaml:"vaults,omitempty"`
	Secrets   []Secret           `json:"secrets,omitempty" yaml:"secrets,omitempty"`
	Dns       map[string]Dns     `json:"dns,omitempty" yaml:"dns,omitempty"`
	Projects  map[string]Project `json:"projects" yaml:"projects"`
	Discovery *Discovery         `json:"discovery,omitempty" yaml:"discovery,omitempty"`
}

type WorkspaceFile

type WorkspaceFile struct {
	File   string
	Config *Workspace
}

func (*WorkspaceFile) Load

func (cfg *WorkspaceFile) Load() error

func (*WorkspaceFile) Save

func (cfg *WorkspaceFile) Save() error

Jump to

Keyboard shortcuts

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