bootstrap

package
v0.0.0-...-7bb11d0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2023 License: Unlicense Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger *logrus.Logger

Logger represents the configured Logrus logger.

Functions

func InitLogger

func InitLogger() *logrus.Logger

InitLogger initializes and returns the logger.

func NewRedisCache

func NewRedisCache(env *Env) (*redis.Client, error)

Types

type Application

type Application struct {
	Env    *Env
	Client *redis.Client
	Logger *logrus.Logger
}

func App

func App() Application

type Env

type Env struct {
	SERVER_PORT         string `mapstructure:"SERVER_PORT"`
	REDIS_ADDRESS       string `mapstructure:"REDIS_ADDRESS"`
	REDIS_PASS          string `mapstructure:"REDIS_PASS"`
	REDIS_DB            int    `mapstructure:"REDIS_DB"`
	REDIS_EXPIRY_MIN    int    `mapstructure:"REDIS_EXPIRY_MIN"`
	API_KEY             string `mapstructure:"API_KEY"`
	API_URL             string `mapstructure:"API_URL"`
	CONTEXT_TIMEOUT_SEC int    `mapstructure:"CONTEXT_TIMEOUT_SEC"`
}

func NewEnv

func NewEnv() (*Env, error)

Jump to

Keyboard shortcuts

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