utility

package
v0.0.0-...-d809d1c Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const UserCtxKey = ctxKey("USER")

Variables

This section is empty.

Functions

func ConfigureSlog

func ConfigureSlog(writeTo io.Writer)

ConfigureSlog so that it easy to locate the source file & line as the Goland IDE picks up the relative file path.

func ContextGetUser

func ContextGetUser(ctx context.Context) *domain.User

func ContextSetUser

func ContextSetUser(r *http.Request, user *domain.User) *http.Request

Types

type Config

type Config struct {
	Port int
	ENV  string
	DB   struct {
		DSN             string
		MaxOpenConn     int
		MaxIdleConn     int
		MaxIdleConnTime string
	}
	SMTP struct {
		Host     string
		Port     int
		Username string
		Password string
		Sender   string
	}
}

func ParseFlags

func ParseFlags() *Config

Jump to

Keyboard shortcuts

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