config

package
v0.0.0-...-6794c67 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ServiceName = "user-settings-service"

Functions

This section is empty.

Types

type Postgres

type Postgres struct {
	URI          string `mapstructure:"uri"`
	Database     string `mapstructure:"database"`
	SchemaPath   string `mapstructure:"schema_path"`
	MaxOpenConns int    `mapstructure:"max_open_conns"`
	MaxIdleConns int    `mapstructure:"max_idle_conns"`
}

type Service

type Service struct {
	Host        string `mapstructure:"host"`
	Port        int    `mapstructure:"port"`
	MetricsPort int    `mapstructure:"metrics_port"`
	LogLevel    string `mapstructure:"log_level"`
}

Service is a base config options struct for all services

func (*Service) SetLogLevel

func (s *Service) SetLogLevel()

SetLogLevel sets the log level for the service

type UserSettings

type UserSettings struct {
	Service          `mapstructure:"service"`
	Postgres         `mapstructure:"postgres"`
	*certs.TLSConfig `mapstructure:"tls"`
	// contains filtered or unexported fields
}

func (*UserSettings) GetStorage

func (s *UserSettings) GetStorage() storage.Client

GetStorage returns the storage client for the service

func (*UserSettings) SetStorage

func (s *UserSettings) SetStorage(c storage.Client)

SetStorage sets the storage client for the service

Jump to

Keyboard shortcuts

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