enum

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AirdbSuccess    uint = 20000
	AirdbFailed     uint = 20001
	AirdbAuthFailed uint = 20002
	AirdbUndefined  uint = 24999
	AirdbUnknown    uint = 25000
)

Airdb error codes for user.

View Source
const (
	RoleGuest = iota + 1
	RoleDeveloper
	RoleSRE
	RolePM
	RoleOwner
	RoleAdmin
)
View Source
const (
	PermRead = iota + 1
	PermWrite
	PermCreate
	PermDelete
	PermUpdate
)

Variables

View Source
var CodeMap = map[uint]string{
	AirdbSuccess:    "Success",
	AirdbFailed:     "Failed",
	AirdbAuthFailed: "Auth failed",
	AirdbUndefined:  "Undefined",
	AirdbUnknown:    "Uknown error",
}
View Source
var EnvMap = map[Env]string{
	EnvDev:  "dev",
	EnvTest: "test",
	EnvPro:  "pro",
	EnvLive: "live",
}

Functions

func FormCode

func FormCode(code uint) string

func FromEnv

func FromEnv(env Env) string

func GetEnvList

func GetEnvList() (envList []string)

func IsLiveEnv

func IsLiveEnv(sEnv string) bool

func ToCode

func ToCode(sCode string) uint

Types

type Env

type Env uint
const (
	EnvDev Env = iota + 1
	EnvTest
	EnvPro
	EnvLive
)

func ToEnv

func ToEnv(sEnv string) Env

Jump to

Keyboard shortcuts

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