common

package
v0.0.0-...-1835397 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Guid

func Guid() string

func RandToken

func RandToken() string

func RandUserName

func RandUserName() string

func StrToInt

func StrToInt(str string) int

Types

type Config

type Config struct {
	Server ServerConf
	Log    LogConf
}

func LoadConfig

func LoadConfig(configPath string) (config *Config, err error)

type LogConf

type LogConf struct {
	File  string
	Level string
}

type ServerConf

type ServerConf struct {
	Addr  string
	Mode  string
	Redis string
	Db    string
}

type Session

type Session struct {
	// contains filtered or unexported fields
}

func NewSession

func NewSession(appId int) (*Session, error)

func (*Session) Get

func (s *Session) Get(key string) (interface{}, error)

func (*Session) Key

func (s *Session) Key(key string) string

func (*Session) Set

func (s *Session) Set(key string, value interface{}) error

func (*Session) SetRedis

func (s *Session) SetRedis(client *redis.Client) error

Jump to

Keyboard shortcuts

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