config

package
v0.0.0-...-418667d Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectDB

func ConnectDB() (*sql.DB, error)

func CreateLoggers

func CreateLoggers(request *http.Request) *logrus.Entry

func CreateValidator

func CreateValidator() *validator.Validate

func GenerateToken

func GenerateToken(claims jwt.MapClaims) *jwt.Token

func InitConfig

func InitConfig()

func SetupMailjetClient

func SetupMailjetClient() *mailjet.Client

func VerifyToken

func VerifyToken(tokenString string, keyFunc jwt.Keyfunc) (*jwt.Token, error)

Types

type JwtParameters

type JwtParameters struct {
	Id          string
	Username    string
	GroupMenu   string
	Role        int
	Permissions []int
}

type LoggerFileHook

type LoggerFileHook struct {
	// contains filtered or unexported fields
}

func NewLoggerFileHook

func NewLoggerFileHook(file string, flag int, chmod os.FileMode) (*LoggerFileHook, error)

func (*LoggerFileHook) Fire

func (hook *LoggerFileHook) Fire(entry *logrus.Entry) error

func (*LoggerFileHook) Levels

func (hook *LoggerFileHook) Levels() []logrus.Level

Jump to

Keyboard shortcuts

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