utils

package
v0.0.0-...-224700b Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CONTENT_TYPE   string = "Content-Type"
	CONTENT_CODE   string = "X-Content-Code"
	ACCESS_CONTROL string = "X-Access-Ctrl"
	SOURCE_CONTROL string = "X-Source"
	CLIENT_VERSION string = "X-Client-Version"

	PATH        string = "/api"
	SERVER_PORT string = ":8080"

	REQUEST_LOG   string = "REQUEST"
	RESPONSE_LOG  string = "RESPONSE"
	EXCEPTION_LOG string = "EXCEPTION"
	INFO_LOG      string = "INFO"
	ERR_LOG       string = "ERROR"

	PLAYER_X int = 1
	PLAYER_O int = 0
)

Variables

View Source
var GetEnv = map[EnvKey]string{}

Functions

func LoadEnv

func LoadEnv() error

Types

type Env

type Env interface {
	Value() (string, error)
}
var (
	ContentType   Env = New("X_CONTENT_TYPE")
	ContentCode   Env = New("PUBLIC_KEy")
	ClientVersion Env = New("WEB_VERSION")
)

type EnvKey

type EnvKey struct {
	Key string
}

func New

func New(key string) *EnvKey

func (*EnvKey) Value

func (v *EnvKey) Value() (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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