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.
Click to show internal directories.
Click to hide internal directories.