Versions in this module Expand all Collapse all v1 v1.0.1 Oct 16, 2018 Changes in this version + const EmailLinked + const EmailLinkedString + const EmailPrimary + const EmailPrimaryString + const EmailVerified + const EmailVerifiedString + const OAuthProviderGithub + const OAuthProviderGoogle + const PermissionAdmin + const PermissionAdminString + const PermissionBanned + const PermissionBannedString + const PermissionDefault + const PermissionDefaultString + const PermissionTeam + const PermissionTeamString + const PermissionVerified + const PermissionVerifiedString + const RoundStatusClosed + const RoundStatusFinished + const RoundStatusOpen + const RoundStatusRunning + var CryptoGenThreshold = 10 + func CryptoCmpBytes(x, y []byte) bool + func CryptoCmpStr(x, y string) bool + func CryptoGen() (key string, err error) + func CryptoGenBytes(len int) (buf []byte, err error) + func CryptoGenString(n int) (string, error) + func CryptoPwd(password string) (hash, salt string, err error) + func CryptoPwdVerify(hash, salt, password string) (ok bool, err error) + func EmailAtoI(status string) int + func EmailItoA(status int) string + func FastRandomString(n int) string + func ItoNumberUnity(value int) string + func MaxInt(x, y int) int + func MinInt(x, y int) int + func PermissionAtoI(permission string) int + func PermissionItoA(permission int) string + func StrMask(str string) string + func StrMaskIdx(str string, idx int) string + func TernaryOperatorA(condition bool, trueValue string, falseValue string) string + func TernaryOperatorI(condition bool, trueValue int, falseValue int) int + type CryptoService struct + func NewCryptoService(key []byte) (cs *CryptoService, err error) + func (cs CryptoService) Decrypt(cipher []byte) (plain []byte, err error) + func (cs CryptoService) DecryptBase64(base64Cipher []byte) (plain []byte, err error) + func (cs CryptoService) Encrypt(plain []byte) (cipher []byte, err error) + func (cs CryptoService) EncryptBase64(plain []byte) (base64Cipher []byte, err error) + type Email struct + Email string + Public bool + Status int + func (e Email) IsLinked() bool + func (e Email) IsPrimary() bool + func (e Email) IsVerified() bool + type Endpoint struct + Host string + Port int + func NewEndpoint(host string, port int) *Endpoint + func NewEndpointAddr(addr string) *Endpoint + func (ep *Endpoint) String() string + type FCRNG struct + Increment uint64 + Seed uint64 + Size uint64 + func NewFCRNG(size uint64) *FCRNG + func (f *FCRNG) Next32() int32 + func (f *FCRNG) Next64() int64 + func (f *FCRNG) NextU32() uint32 + func (f *FCRNG) NextU64() uint64 + type GoogleUser struct + Email string + EmailVerified bool + FamilyName string + Gender string + GivenName string + Name string + Picture string + Profile string + Sub string + type Round struct + ID int + Joined int + Max int + Min int + Name string + RoundStatus int + Starttime time.Time + Wallpaper string + type Roundentry struct + Authtoken string + Watchtoken string + type RoundentryConnectinfo struct + AESKey string + IPv4 string + IPv6 string + Port int + Roundticket string + type RoundentryVerification struct + AESKey *string + RoundID int + UserID int + type SSHTunnel struct + Local *Endpoint + Remote *Endpoint + Server *Endpoint + func NewSSHTunnel(user string, password string, local *Endpoint, server *Endpoint, ...) *SSHTunnel + func (tunnel *SSHTunnel) Bind() error + func (tunnel *SSHTunnel) Start(tunnelReady chan bool) error + type SafeUser struct + Bio string + Company string + Emails []Email + ID int + Location string + Name string + OAuth map[string]string + Permission int + PermissionString string + Social map[string]string + Username string + Web []string + func (su *SafeUser) MakePublic() + func (su *SafeUser) PrimaryEmail() *Email + func (su *SafeUser) User() *User + type StringCache struct + func NewStringCache() *StringCache + func (c *StringCache) Add(key string, intervalSeconds float64, refresh StringCacheRefreshFunc) + func (c *StringCache) Get(key string) (value string) + type StringCacheItem struct + type StringCacheRefreshFunc func() (value string) + type User struct + Bio *string + Company *string + Emails []Email + ID *int + Location *string + Name *string + OAuth map[string]string + Permission *int + PermissionString *string + Social map[string]string + Username *string + Web []string + func (u *User) SafeUser() *SafeUser + func (u *User) Validate() (safeUser *SafeUser, valid bool)