config

package
v0.0.0-...-3301e3d Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: MPL-2.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 Config

type Config struct {
	Version    string // server git hash
	DeployTime time.Time
	Env        string `yaml:"env"`
	Port       string `yaml:"port"`
	Debug      bool   `yaml:"debug"`

	MongoDB struct {
		Name             string `yaml:"name"`
		ConnectionString string `yaml:"connectionString"`

		UsersCollectionName    string `yaml:"usersCollectionName"`
		ProjectsCollectionName string `yaml:"projectsCollectionName"`
		PrivKeysCollectionName string `yaml:"privKeysCollectionName"`
		PubKeysCollectionName  string `yaml:"pubKeysCollectionName"`
	} `yaml:"mongodb"`

	Auth struct {
		SigningKey string `yaml:"signingKey"`
	} `yaml:"auth"`
}

Config holds the service configuration necessary for endpoints to respond to requests

func BuildConfig

func BuildConfig(filePath, version string) *Config

BuildConfig returns a populated config struct from a yaml file

Jump to

Keyboard shortcuts

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