config

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPConfig

type HTTPConfig struct {
	DB            database.DBConfig `json:"db,omitempty" yaml:"db,omitempty"`
	SetupDB       bool              `json:"setup_db,omitempty" yaml:"setup_db,omitempty"`
	EnableMetrics bool              `json:"enable_metrics,omitempty" yaml:"enable_metrics,omitempty"`
	Port          string            `json:"port,omitempty" yaml:"port,omitempty"`
	EnableCORS    bool              `json:"enable_cors,omitempty" yaml:"enable_cors,omitempty"`
	Jwt           JwtConfig         `json:"jwt,omitempty" yaml:"jwt,omitempty"`
}

HTTPConfig configuration object for API server

func NewHTTPConfig

func NewHTTPConfig() *HTTPConfig

NewHTTPConfig returns a new, blank configuration for API server

type JwtConfig

type JwtConfig struct {
	SecretKey       string `json:"secret_key,omitempty" yaml:"secret_key,omitempty"`
	Issuer          string `json:"issuer,omitempty" yaml:"issuer,omitempty"`
	ExpirationHours int64  `json:"expiration_hours" yaml:"expiration_hours"`
}

JwtConfig configuration object for JSON Web Toens

Jump to

Keyboard shortcuts

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