constants

package
v0.0.0-...-4e22d16 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AllowOrigin     = "*, localhost:5080" // more specific "localhost:3000, google.com"
	AllowCredential = "true"
	AllowHeader     = "" /* 143-byte string literal not displayed */
	AllowMethods    = "POST, GET, PUT, DELETE, PATCH"
	MaxAge          = "43200" // for 12 hour
)
View Source
const (
	EnvironmentProduction  = "production"
	EnvironmentDevelopment = "development"
)
View Source
const (
	LoggerCategory          = "category"
	LoggerCategoryServer    = "server"
	LoggerCategoryConfig    = "config"
	LoggerCategoryDatabase  = "database"
	LoggerCategoryHTTP      = "http"
	LoggerCategoryMigration = "migration"
	LoggerCategoryCORS      = "cors"
	LoggerCategorySeeder    = "seeder"

	LoggerFile = "file"
)
View Source
const (
	CtxAuthenticatedUserKey = "CtxAuthenticatedUserKey"
	AdminID                 = 1
	UserID                  = 2
)
View Source
const (
	EndpointV1 = "/api/v1"
)

Variables

View Source
var (
	// global
	ErrUnexpected = errors.New("unexpected error")

	// entity
	ErrUserNotFound = errors.New("user not found")

	// config
	ErrLoadConfig  = errors.New("failed to load config file")
	ErrParseConfig = errors.New("failed to parse env to config struct")
	ErrEmptyVar    = errors.New("required variabel environment is empty")
)
View Source
var (
	GMT7 = time.FixedZone("GMT+7", 7*60*60)
)
View Source
var (
	ListGender = []string{"male", "female"}
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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