config

package
v4.0.0-...-664ee31 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name    = "go.micro.dashboard"
	Version = "1.2.0"
)

Variables

This section is empty.

Functions

func Load

func Load() error

Load will load configurations and update it when changed

Types

type AuthConfig

type AuthConfig struct {
	Username        string
	Password        string
	TokenSecret     string
	TokenExpiration time.Duration
}

func GetAuthConfig

func GetAuthConfig() AuthConfig

type CORSConfig

type CORSConfig struct {
	Enable bool   `toml:"enable"`
	Origin string `toml:"origin"`
}

type Config

type Config struct {
	Server ServerConfig
}

func GetConfig

func GetConfig() Config

type ServerConfig

type ServerConfig struct {
	Address string
	Auth    AuthConfig
	CORS    CORSConfig
}

func GetServerConfig

func GetServerConfig() ServerConfig

Jump to

Keyboard shortcuts

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