server

package
v0.0.0-...-7674232 Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

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

Log - log client.

Functions

func Debug

func Debug(msg string)

Debug - shorthand Log.Debug

func Error

func Error(msg string)

Error - shorthand Log.Error

func Fatal

func Fatal(msg string)

Fatal - shorthand Log.Fatal

func GetShortUUID

func GetShortUUID(n int) string

GetShortUUID makes random characters with specified length

func Info

func Info(msg string)

Info - shorthand Log.Info

func NewElasticSearchClient

func NewElasticSearchClient(host, user, pass string) *elasticsearch.Client

NewElasticSearchClient creates a new elasticsearch client

func NewMongoDBClient

func NewMongoDBClient(host, user, pass string) *mongo.Client

NewMongoDBClient creates a new mongodb client

func NewRouterWithInject

func NewRouterWithInject(routers ...gen.Router) *mux.Router

NewRouterWithInject creates a new router with inject header middleware

func Warn

func Warn(msg string)

Warn - shorthand Log.Warn

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

Jump to

Keyboard shortcuts

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