config

package
v0.0.0-...-b877db6 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Global = &Config{}

Functions

This section is empty.

Types

type App

type App struct {
	Name      string    `json:"name"`
	Alg       string    `json:"alg"`
	Signature Signature `json:"signature"`
}

type Config

type Config struct {
	Port             int             `json:"port"`
	AdminSecret      string          `json:"admin_secret"`
	Apps             map[string]*App `json:"apps"`
	DefaultSignature Signature       `json:"default_signature"`
	MongoURL         string          `json:"mongo_url"`
	DBName           string          `json:"db_name"`
	ServerOptions    ServerOptions   `json:"server_options"`
}

func (*Config) Load

func (c *Config) Load(filePath string)

type ServerOptions

type ServerOptions struct {
	EnableTLS bool       `json:"enable_tls"`
	CertFile  string     `json:"cert_file"`
	KeyFile   string     `json:"key_file"`
	TLSConfig tls.Config `json:"tls_config"`
}

type Signature

type Signature struct {
	HMACSecret        string `json:"hmac_secret"`
	RSAPrivateKeyFile string `json:"rsa_private_key_file"`
	RSAPublicKeyFile  string `json:"rsa_public_key_file"`
}

Jump to

Keyboard shortcuts

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