lib

package
v0.0.0-...-c95f17e Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Module exports dependency

Functions

This section is empty.

Types

type Database

type Database struct {
	Driver neo4j.DriverWithContext
}

func NewDatabase

func NewDatabase(ctx context.Context, env Env, logger Logger) Database

type Env

type Env struct {
	ServerPort  string `mapstructure:"SERVER_PORT"`
	Environment string `mapstructure:"ENV"`
	LogOutput   string `mapstructure:"LOG_OUTPUT"`
	DBUsername  string `mapstructure:"DB_USER"`
	DBPassword  string `mapstructure:"DB_PASS"`
	DBHost      string `mapstructure:"DB_HOST"`
	DBPort      string `mapstructure:"DB_PORT"`
	DBName      string `mapstructure:"DB_NAME"`
	JWTSecret   string `mapstructure:"JWT_SECRET"`
}

Env has environment stored

func NewEnv

func NewEnv() Env

NewEnv creates a new environment

type GinLogger

type GinLogger struct {
	*Logger
}

func (GinLogger) Write

func (l GinLogger) Write(p []byte) (n int, err error)

type Logger

type Logger struct {
	*zap.SugaredLogger
}

func GetLogger

func GetLogger() Logger

GetLogger get the logger

func (Logger) GetGinLogger

func (l Logger) GetGinLogger() GinLogger

type RequestHandler

type RequestHandler struct {
	Gin *gin.Engine
}

func NewRequestHandler

func NewRequestHandler(logger Logger) RequestHandler

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳