context

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2019 License: MIT Imports: 14 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 ConfigureClient

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

func OpenDB

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

Types

type Config

type Config struct {
	AppName string

	DBHost     string
	DBPort     string
	DBUser     string
	DBPassword string
	DBName     string

	JWTSecret   string
	JWTExpireIn time.Duration

	DebugMode bool
	LogFormat string

	ConfHost   string
	ConfPort   string
	ConfUseTLS bool
	ConfCACert string
	ConfCert   string
	ConfKey    string
}

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