handler

package
v0.0.0-...-c1a9489 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2024 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WEEK_IN_SECOND = 60 * 60 * 24 * 7
	WEEK_IN_MINUTE = 60 * 24 * 7
	RetryMSG       = "Something went wrong. Please try again later"
	GRPC_TIMEOUT   = time.Millisecond * 500
)
View Source
const (
	UPLOAD_FOLDER = "uploads"
)

Variables

View Source
var (
	JWTFile = "jwt.ed"
	Redis   = os.Getenv("REDIS_ADDRESS")
)

Functions

func AdminMiddleware

func AdminMiddleware() gin.HandlerFunc

func NewIndexHandler

func NewIndexHandler(logger *slog.Logger) *indexHandler

func NewStockHandler

func NewStockHandler(grpc_url string, l *slog.Logger) (*stockHandler, error)

func NewUserHandler

func NewUserHandler(url string, logger *slog.Logger) *userHandler

Types

type Handler

type Handler interface {
	Close() error
}

Jump to

Keyboard shortcuts

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