config

package
v0.0.0-...-d389d3b Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	Assets     *AssetsConfig
	Database   *DatabaseConfig
	HTTPServer *HTTPServerConfig
	RabbitMQ   *RabbitMQConfig
}

func NewAppConfig

func NewAppConfig(assets *AssetsConfig, env env.Env) *AppConfig

type AssetsConfig

type AssetsConfig struct {
	EmbedMigrations fs.FS
	TemplateSQL     fs.FS
}

func NewAssetsConfig

func NewAssetsConfig(logo string, embedMigrations fs.FS, templateSQL fs.FS) *AssetsConfig

type DatabaseConfig

type DatabaseConfig struct {
	Name               string
	User               string
	Password           string
	Host               string
	Port               string
	MigrationDirectory string
	Driver             string // TODO, validate supported dialects
}

func NewDatabaseConfig

func NewDatabaseConfig(
	name string,
	user string,
	password string,
	host string,
	port string,
	migrationDirectory string,
	dialect string,
) *DatabaseConfig

type HTTPServerConfig

type HTTPServerConfig struct {
	Port string
}

func NewHTTPServerConfig

func NewHTTPServerConfig(port string) *HTTPServerConfig

type RabbitMQConfig

type RabbitMQConfig struct {
	Name     string
	Password string
	Host     string
}

func NewRabbitMQConfig

func NewRabbitMQConfig(name string, password string, host string) *RabbitMQConfig

func (RabbitMQConfig) ToDsn

func (r RabbitMQConfig) ToDsn() string

Jump to

Keyboard shortcuts

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