config

package
v0.0.0-...-044f632 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	With string
}

type AuthType

type AuthType = string
const (
	FakeAuth     AuthType = "fake"
	FirebaseAuth AuthType = "firebase"
)

type Config

type Config struct {
	Environment Env
	HTTP        HTTP
	Mongo       Mongo
	Auth        Auth
	Firebase    Firebase
	Pipeline    Pipeline
	SavePerStep SavePerStep
	Nats        NatsServer
	Logger      Logger
}

func FromPath

func FromPath(configsPath string) (*Config, error)

type Env

type Env = string
const LocalEnv Env = "local"

type Firebase

type Firebase struct {
	ServiceAccountFile string
}

type HTTP

type HTTP struct {
	Port            string
	ReadTimeout     time.Duration
	WriteTimeout    time.Duration
	ShutdownTimeout time.Duration
	AllowedOrigins  []string
}

type Logger

type Logger struct {
	Lib   LoggerLib
	Level LoggerLevel
}

type LoggerLevel

type LoggerLevel = string
const (
	DebugLevel LoggerLevel = "DEBUG"
	InfoLevel  LoggerLevel = "INFO"
	WarnLevel  LoggerLevel = "WARN"
	ErrorLevel LoggerLevel = "ERROR"
	FatalLevel LoggerLevel = "FATAL"
)

type LoggerLib

type LoggerLib = string
const Zap LoggerLib = "zap"

type Mongo

type Mongo struct {
	URI               string
	DatabaseName      string
	Username          string
	Password          string
	DisconnectTimeout time.Duration
}

type NatsServer

type NatsServer struct {
	URL string
}

type Pipeline

type Pipeline struct {
	FlowTimeout time.Duration
	Policy      StepsPolicy
	SignalBus   SignalBus
	Workers     int
}

type SavePerStep

type SavePerStep struct {
	SaveTimeout time.Duration
}

type SignalBus

type SignalBus = string
const Nats SignalBus = "nats"

type StepsPolicy

type StepsPolicy = string
const SavePerStepPolicy StepsPolicy = "savePerStep"

Jump to

Keyboard shortcuts

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