common

package module
v0.0.0-...-3f48d72 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: GPL-3.0 Imports: 16 Imported by: 0

README

Common

Common libraries

Documentation

Index

Constants

View Source
const (
	//ClaimMetaKey claim key in meta
	ClaimMetaKey claimKey = "ClaimKey"
)

Variables

View Source
var DB *gorm.DB

DB Postgres Database

View Source
var JwtKey = []byte(os.Getenv("JWT_KEY"))

JwtKey auth key

Functions

func Authenticate

func Authenticate(ctx context.Context) (context.Context, error)

Authenticate for grpc

func Bootstrap

func Bootstrap()

Bootstrap User app

func BootstrapTesting

func BootstrapTesting(dbLogMode bool)

BootstrapTesting for testing

func GetRandomNumberString

func GetRandomNumberString(n int) string

GetRandomNumberString by length

func GetRandomString

func GetRandomString(n int) string

GetRandomString by length

func InitDB

func InitDB()

InitDB initiate database

func InitTestDB

func InitTestDB()

InitTestDB init test db

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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