configs

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type C

type C struct {
	Username string     `yaml:"username"`
	AWSes    []CAWS     `yaml:"awses"`
	Bastions []CBastion `yaml:"bastions"`
	Targets  []CTarget  `yaml:"targets"`
}

type CAWS

type CAWS struct {
	Name            string `yaml:"name"`
	AccessKeyID     string `yaml:"access_key_id"`
	SecretAccessKey string `yaml:"secret_access_key"`
	Region          string `yaml:"region"`
	AccountNumber   string `yaml:"account_number"`
}

type CBastion

type CBastion struct {
	Name     string `yaml:"name"`
	Username string `yaml:"username"`
	Host     string `yaml:"host"`
}

type CTarget

type CTarget struct {
	Name        string         `yaml:"name"`
	AWS         string         `yaml:"aws"`
	Bastion     string         `yaml:"bastion"`
	GroupID     string         `yaml:"group_id"`
	InstanceID  string         `yaml:"instance_id"`
	Description string         `yaml:"description"`
	Enables     CTargetEnables `yaml:"enables"`
	SSH         CTargetSSH     `yaml:"ssh"`
	RDP         CTargetRDP     `yaml:"rdp"`
}

type CTargetEnables

type CTargetEnables struct {
	MyIP     bool `yaml:"myip"`
	Instance bool `yaml:"instance"`
	RDP      bool `yaml:"rdp"`
	SSH      bool `yaml:"ssh"`
}

type CTargetRDP

type CTargetRDP struct {
	Username string `yaml:"username"`
	Password string `yaml:"password"`
}

type CTargetSSH

type CTargetSSH struct {
	Username string `yaml:"username"`
	Direct   bool   `yaml:"direct"`
}

type Configs

type Configs struct {
	Configs C
	Target  STarget
}

func New

func New() (t *Configs)

func (*Configs) Load

func (t *Configs) Load() error

func (*Configs) SetTarget

func (t *Configs) SetTarget(tn string) bool

type STarget

type STarget struct {
	Name        string
	AWS         CAWS
	Bastion     CBastion
	Username    string
	GroupID     string
	InstanceID  string
	Description string
	LocalPort   string
	Enables     CTargetEnables
	RDP         CTargetRDP
	SSH         CTargetSSH
}

Jump to

Keyboard shortcuts

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