config

package
v1.14.1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2025 License: Apache-2.0, Apache-2.0 Imports: 4 Imported by: 58

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Server struct {
		Bindip       string
		Port         int
		Maxprocs     int
		Cache        bool
		Lrucache     int
		Gzip         bool
		Cert         string
		Privkey      string
		ReqSizeLimit int64
		EnableCors   bool
	}

	MongoDB     MongoConfig
	Profile     string
	MongoClient *mongo.Client
}

Config configuration for the api

func LoadConfiguration

func LoadConfiguration() Config

LoadConfiguration function loads the configurations passed either by flags or by the configuration file

type MongoConfig

type MongoConfig struct {
	User     string   `bson:"name"`
	Email    string   `bson:"email"`
	Host     string   `bson:"server"`
	Port     int      `bson:"port"`
	Db       string   `bson:"database"`
	Username string   `bson:"username"`
	Password string   `bson:"password"`
	Store    string   `bson:"store"`
	ApiKey   string   `bson:"api_key"`
	Roles    []string `bson:"roles"`
}

MongoConfig configuration to connect to a mongodb instance

Jump to

Keyboard shortcuts

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