config

package
v0.0.0-...-7ce9cfc Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GCP = "GCP"
	AWS = "AWS"
)

Variables

View Source
var DefaultPath = "./sshrimp.toml"

DefaultPath of the sshrimp config file

View Source
var EnvVarName = "SSHRIMP_CONFIG"

EnvVarName is the optional environment variable that if set overrides DefaultPath

Functions

func GetPath

func GetPath() string

GetPath returns the default sshrimp config file path taking into account EnvVarName

func Wizard

func Wizard(configPath string, config *SSHrimp) (string, error)

Wizard launches a interactive question/answer terminal prompt to create a config file

Types

type Agent

type Agent struct {
	ProviderURL    string
	ClientID       string
	ClientSecret   string
	BrowserCommand []string
	Socket         string
}

Agent config for the sshrimp-agent agent

type CertificateAuthority

type CertificateAuthority struct {
	CloudProvider      string
	Project            string
	AccountID          int
	Regions            []string
	FunctionName       string
	KeyAlias           string
	ForceCommandRegex  string
	SourceAddressRegex string
	UsernameRegex      string
	UsernameClaim      string
	ValidAfterOffset   string
	ValidBeforeOffset  string
	Extensions         []string
}

CertificateAuthority config for the sshrimp-ca lambda

type SSHrimp

type SSHrimp struct {
	Agent                Agent
	CertificateAuthority CertificateAuthority
}

SSHrimp main configuration struct for sshrimp-agent and sshrimp-ca

func NewSSHrimp

func NewSSHrimp() *SSHrimp

NewSSHrimp returns SSHrimp

func NewSSHrimpWithDefaults

func NewSSHrimpWithDefaults() *SSHrimp

NewSSHrimpWithDefaults returns SSHrimp with defaults already set

func (*SSHrimp) Read

func (c *SSHrimp) Read(configPath string) error

func (*SSHrimp) Write

func (c *SSHrimp) Write(configPath string) error

Jump to

Keyboard shortcuts

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