config

package
v3.2.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const WriteBufferSize = 10240

WriteBufferSize assign the websocket write buffer size

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	MySQL MySQL `json:"mysql"`
	SMTP  SMTP  `json:"smtp"`
	SSO   SSO   `json:"sso"`
}

Config denotes configuration

func NewConfig

func NewConfig(filename string) (*Config, error)

NewConfig return an initialized configuration

func (Config) SwaggerModel

func (c Config) SwaggerModel() swaggermodels.Config

SwaggerModel return the swagger version

type MySQL

type MySQL struct {
	Username string `json:"username"`
	Password string `json:"password"`
	Host     string `json:"host"`
	Port     int    `json:"port"`
	DBName   string `json:"db_name"`
}

MySQL denotes MySQL configuration

func (MySQL) DataSourceName

func (m MySQL) DataSourceName() string

DataSourceName return the data source name to connect mysql

type SMTP

type SMTP struct {
	Address   string `json:"address"`
	FromEmail string `json:"from_email"`
	Password  string `json:"password"`
}

SMTP denotes SMTP configuration

type SSO

type SSO struct {
	Domain       string `json:"domain"`
	ClientID     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
	RedirectURI  string `json:"redirect_uri"`
	EntryGroup   string `json:"entry_group"`
	Scope        string `json:"scope"`
}

SSO denotes SSO configuration

Jump to

Keyboard shortcuts

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