Documentation ¶
Index ¶
- Constants
- Variables
- func Decrypt(msg string) string
- func Encrypt(msg string) string
- func GetDouble(s string) float64
- func GetInt(s string) int
- func GetInt64(s string) int64
- func GetTimestamp(layout, value string) int64
- func InvokeGoroutine(tag string, f func())
- func MaxInt(a, b int) int
- func MaxInt64(a, b int64) int64
- func MinInt(a, b int) int
- func MinInt64(a, b int64) int64
- func Now() time.Time
- func ResetEncryptionKey(newKey string)
- func Today() time.Time
- func Unix(timestamp int64) time.Time
- type ConcurrentMap
- type MetaError
- type Ref
- type ReferenceCounting
Constants ¶
Variables ¶
View Source
var AsiaSeoul *time.Location
AsiaSeoul is the timezone of Asia/Seoul
View Source
var PHASE = DEV
PHASE Phase of the server.
Functions ¶
func GetDouble ¶
GetDouble parses string into float64 s: string, comma allowed if parsing fails: panics
func GetTimestamp ¶
GetTimestamp returns timestamp from string value given layout.
func InvokeGoroutine ¶
func InvokeGoroutine(tag string, f func())
InvokeGoroutine Invoke goroutine with handling panicking Sends log to GCE with stack trace https://jacking75.github.io/go_spew/
func ResetEncryptionKey ¶
func ResetEncryptionKey(newKey string)
ResetEncryptionKey Use this to change the encryption key
Types ¶
type ConcurrentMap ¶
type ConcurrentMap struct {
// contains filtered or unexported fields
}
func NewConcurrentMap ¶
func NewConcurrentMap() *ConcurrentMap
func (*ConcurrentMap) Count ¶
func (cm *ConcurrentMap) Count() int
func (*ConcurrentMap) DeleteValue ¶
func (cm *ConcurrentMap) DeleteValue(key interface{})
func (*ConcurrentMap) GetValue ¶
func (cm *ConcurrentMap) GetValue(key interface{}) (interface{}, bool)
func (*ConcurrentMap) Iterate ¶
func (cm *ConcurrentMap) Iterate(f func(key, value interface{}, stop *bool))
func (*ConcurrentMap) SetValue ¶
func (cm *ConcurrentMap) SetValue(key, value interface{})
type MetaError ¶
MetaError generates an error with a cached tag
func NewTaggedError ¶
NewTaggedError generates an error generator given a tag
type Ref ¶
type Ref struct {
// contains filtered or unexported fields
}
Ref is a simple struct for reference counting. Will panic if overreleased.
type ReferenceCounting ¶
type ReferenceCounting interface { Retain() Release() Count() int }
ReferenceCounting is an interface for reference counting structs
Click to show internal directories.
Click to hide internal directories.