cli

package
v0.0.0-...-f60b9ba Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Types

type Config

type Config struct {
	Production bool       `env:"PRODUCTION"`
	Db         ConfigDb   `envPrefix:"DB_"`
	Nats       ConfigNats `envPrefix:"NATS_"`
	Api        ConfigApi  `envPrefix:"API_"`
	Ldap       ConfigLdap `envPrefix:"LDAP_"`
	IPRanges   string     `env:"IP_RANGES"`
}

type ConfigApi

type ConfigApi struct {
	Host string `env:"HOST" envDefault:"localhost"`
	Port int    `env:"PORT" envDefault:"3999"`
	Key  string `env:"KEY,notEmpty"`
}

func (ConfigApi) Addr

func (ca ConfigApi) Addr() string

type ConfigDb

type ConfigDb struct {
	Url    string `env:"URL" envDefault:"postgres://people:people@localhost:5432/authority?sslmode=disable"`
	AesKey string `env:"AES_KEY,notEmpty"`
}

type ConfigLdap

type ConfigLdap struct {
	Url      string `env:"URL,notEmpty"`
	Username string `env:"USERNAME,notEmpty"`
	Password string `env:"PASSWORD,notEmpty"`
}

type ConfigNats

type ConfigNats struct {
	Url        string `env:"URL" envDefault:"nats://localhost:4222"`
	Nkey       string `env:"NKEY"`
	NkeySeed   string `env:"NKEY_SEED"`
	StreamName string `env:"STREAM_NAME,notEmpty"`
}

type ErrorMessage

type ErrorMessage struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type Version

type Version struct {
	Branch string `env:"SOURCE_BRANCH" json:"branch,omitempty"`
	Commit string `env:"SOURCE_COMMIT" json:"commit,omitempty"`
	Image  string `env:"IMAGE_NAME" json:"image,omitempty"`
}

Jump to

Keyboard shortcuts

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