settings

package
v0.0.0-...-240b47d Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAccountNumber = "271828182845"
	DefaultRegion        = "us-west-2"

	DefaultBasePort = 9050
	DefaultDataPath = "data"

	DefaultDevConfigFile = "functions.yml"
	DefaultSqsEndpoint   = "http://localhost:9324"
	DefaultNetworks      = "rainbow"
)
View Source
const (
	DefaultDbFilename  = "db.sqlite3"
	InMemoryDbFilename = ":memory:"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AccountNumber string
	IsDebug       bool
	IsLocal       bool
	Region        string

	Database *Database

	BasePort int

	DevConfigFile string
	Networks      []string
	SqsEndpoint   string
	// contains filtered or unexported fields
}

func DefaultConfig

func DefaultConfig() *Config

func FromContext

func FromContext(ctx context.Context) *Config

func FromFlags

func FromFlags(name string, args []string) (*Config, string, error)

func (*Config) ArnFragment

func (config *Config) ArnFragment() string

func (*Config) CreateDatabase

func (config *Config) CreateDatabase() *sql.DB

func (*Config) DataPath

func (config *Config) DataPath() string

func (*Config) DbConnectionString

func (config *Config) DbConnectionString() string

func (*Config) NewContext

func (config *Config) NewContext(ctx context.Context) context.Context

type Database

type Database struct {
	Filename string
	Options  string
}

func DefaultDatabase

func DefaultDatabase() *Database

func InMemoryDatabase

func InMemoryDatabase() *Database

type NetworkValue

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

func (*NetworkValue) Set

func (v *NetworkValue) Set(s string) error

func (*NetworkValue) String

func (v *NetworkValue) String() string

Jump to

Keyboard shortcuts

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