config

package
v0.0.0-...-cc2418b Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCollectionName

func GetCollectionName(v *viper.Viper) string

func GetMongoDbName

func GetMongoDbName(v *viper.Viper) string

func GetMongoDbUri

func GetMongoDbUri(v *viper.Viper) string

func GetServerPort

func GetServerPort(v *viper.Viper) string

func GetServerReadTimeout

func GetServerReadTimeout(v *viper.Viper) int64

func GetServerWriteTimeout

func GetServerWriteTimeout(v *viper.Viper) int64

Types

type Config

type Config struct {
	Server *Server
	Mongo  *Mongo
}

func NewConfig

func NewConfig() (*Config, error)

type Mongo

type Mongo struct {
	Uri        string
	Name       string
	Collection string
}

type Server

type Server struct {
	Port         string
	ReadTimeout  int64
	WriteTimeout int64
}

Jump to

Keyboard shortcuts

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