config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2018 License: MIT Imports: 1 Imported by: 54

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	TLS      TLS
	Clients  []Client
	Payment  []PaymentProvider
	Storage  Storage
	Locker   Locker
	Insecure bool
	Address  string
}

AppConfig is the main config structure export DIGOTA_LOCKER...=val

func LoadConfig

func LoadConfig() (*AppConfig, error)

LoadConfig read env vars and *AppConfig or error

type Client

type Client struct {
	Serial string
	Scopes []string
}

Client is the client config structure

type Locker

type Locker struct {
	Handler string
	Address []string
}

Locker is the lock server handler config

type PaymentProvider

type PaymentProvider struct {
	Provider   string
	Secret     string
	Live       bool
	MerchId    string
	PublicKey  string
	PrivateKey string
}

PaymentProvider is the payment provider config

type Storage

type Storage struct {
	Handler  string
	Address  []string
	Username string
	Password string
	Database string
}

Storage is the storage handler config

type TLS

type TLS struct {
	Key   string
	Crt   string
	CACrt string
}

Jump to

Keyboard shortcuts

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