setups

package
v0.0.0-...-d63001d Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

NOTE: This is your primary database and should remain consistent across any server instance

Functions

func GetDB

func GetDB() *gorm.DB

func NewMysqlDB

func NewMysqlDB(dsn string, disableDatetimePrecision bool, dontSupportRenameIndex bool, dontSupportRenameColumn bool, skipInitializeWithVersion bool)

func NewRedisDB

func NewRedisDB(host, port, pass string) *redis.Client

func Run

func Run()

Types

type Server

type Server struct {
	Router         *gin.Engine
	Context        *gin.Context
	RedisClient    *redis.Client
	FileAdapter    *fileadapter.Adapter
	TokenInterface *middlewares.TokenInterface
}

func (*Server) Close

func (server *Server) Close()

func (*Server) InitializeRoutes

func (server *Server) InitializeRoutes()

func (*Server) InitializeServer

func (server *Server) InitializeServer(redis_host, redis_port, redis_pass string)

Jump to

Keyboard shortcuts

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