context

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PostMethodSupported = "only post method is allowed"
	CredentialsError    = "credentials error"
	TokenError          = "token error"
	UnauthorizedAccess  = "unauthorized access"
)

Variables

This section is empty.

Functions

func BrokerClient

func BrokerClient(host string, port int) (pb.EndpointClient, error)

func ConfigureClient

func ConfigureClient(config *Config) (pb.ConfigureEndpointClient, error)

func ManagerClient

func ManagerClient(config *Config) (pb.ManagerClient, error)

func OpenDB

func OpenDB(config *Config) (*sqlx.DB, error)

Types

type Config

type Config struct {
	App       string            `mapstructure:"app"`
	DB        database          `mapstructure:"db"`
	Auth      auth              `mapstructure:"auth"`
	Configure configure         `mapstructure:"configure"`
	Manager   client            `mapstructure:"manager"`
	Broker    map[string]client `mapstructure:"broker"`
	Log       logging           `mapstructure:"log"`
}

func LoadConfig

func LoadConfig(path string) (*Config, error)

Jump to

Keyboard shortcuts

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