Documentation ¶
Index ¶
- Variables
- func Debug(msg string)
- func Error(msg string)
- func Fatal(msg string)
- func GetShortUUID(n int) string
- func Info(msg string)
- func NewElasticSearchClient(host, user, pass string) *elasticsearch.Client
- func NewMongoDBClient(host, user, pass string) *mongo.Client
- func NewRouterWithInject(routers ...gen.Router) *mux.Router
- func Warn(msg string)
- type ConfigList
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInviteNotFound = errors.New("invite code was not found")
ErrInviteNotFound is shared error for handling createAccount method
View Source
var Log *logrus.Logger
Log - log client.
Functions ¶
func GetShortUUID ¶
GetShortUUID makes random characters with specified length
func NewElasticSearchClient ¶
func NewElasticSearchClient(host, user, pass string) *elasticsearch.Client
NewElasticSearchClient creates a new elasticsearch client
func NewMongoDBClient ¶
NewMongoDBClient creates a new mongodb client
func NewRouterWithInject ¶
NewRouterWithInject creates a new router with inject header middleware
Types ¶
type ConfigList ¶
type ConfigList struct { MongoHost string MongoUser string MongoPass string ElasticHost string ElasticUser string ElasticPass string JwtSecret string }
ConfigList stores credentials
func GetConfig ¶
func GetConfig() ConfigList
GetConfig creates ConfigList from environment variables
Click to show internal directories.
Click to hide internal directories.