Documentation
¶
Index ¶
- Constants
- func Base64Decode(src []byte) ([]byte, error)
- func Base64Encode(src []byte) []byte
- func Get(tp reflect.Type) (interface{}, bool)
- func LoadLocales(path string) error
- func Map(bean interface{})
- func Md5(src []byte) [16]byte
- func OpenLogger(tag string) (*syslog.Writer, error)
- func RandomBytes(size int) []byte
- func RandomStr(size int) string
- func Shell(cmd string, args ...string) error
- func T(locale, key string, args ...interface{}) string
- func Uuid() string
- type Aes
- type Application
- type CacheManager
- type Controller
- type Dialect
- type Engine
- type Field
- type Form
- type Handler
- type Hmac
- type Migrator
- type Model
- type Redis
- func (r *Redis) Del(key string) error
- func (r *Redis) Expire(key string, time int64) error
- func (r *Redis) Get(key string, val interface{}) error
- func (r *Redis) Open(cfg *redisConfig) error
- func (r *Redis) Set(key string, val interface{}, expire int64) error
- func (r *Redis) Shell() (string, []string)
- type RedisCacheManager
- type RedisSessionProvider
- type RedisSessionStore
- type Request
- type Response
- func (r *Response) Error(e error)
- func (r *Response) File(req *http.Request, file string)
- func (r *Response) HtmlT(file string, data interface{})
- func (r *Response) Json(data interface{})
- func (r *Response) Text(data []byte)
- func (r *Response) TextT(buf *bytes.Buffer, tpl string, data interface{}) error
- func (r *Response) Xml(data interface{})
- type Route
- type Router
- type Session
- type SessionManager
- type SessionProvider
- type SessionStore
- type Sql
- func (p *Sql) Bool(name string, def bool) string
- func (p *Sql) Bytes(name string, fix bool, size int, big, null bool) string
- func (p *Sql) Create() string
- func (p *Sql) CreateIndex(name, table string, unique bool, columns ...string) string
- func (p *Sql) CreateTable(table string, columns ...string) string
- func (p *Sql) Created() string
- func (p *Sql) Date(name string, null bool, def string) string
- func (p *Sql) Datetime(name string, null bool, def string) string
- func (p *Sql) Delete(table, where string) string
- func (p *Sql) Drop() string
- func (p *Sql) DropIndex(name string) string
- func (p *Sql) DropTable(table string) string
- func (p *Sql) Float32(name string, def float32) string
- func (p *Sql) Float64(name string, def float64) string
- func (p *Sql) Id(uuid bool) string
- func (p *Sql) Insert(table string, columns []string) string
- func (p *Sql) Int32(name string, null bool, def int) string
- func (p *Sql) Int64(name string, null bool, def int64) string
- func (p *Sql) Select(table string, columns []string, where, order string, offset, limit int) string
- func (p *Sql) Shell() (string, []string)
- func (p *Sql) String(name string, fix bool, size int, big, null bool, def string) string
- func (p *Sql) Time(name string, null bool, def string) string
- func (p *Sql) Update(table, columns, where string) string
- func (p *Sql) Updated() string
Constants ¶
View Source
const VERSION = "v20150510"
Variables ¶
This section is empty.
Functions ¶
func Base64Decode ¶
func Base64Encode ¶
func LoadLocales ¶
func RandomBytes ¶
Types ¶
type Application ¶
type Application interface {
Start() error
Router() Router
Model() Model
Migrator() Migrator
Mount(path string, engine Engine)
}
func New ¶
func New() (Application, error)
type CacheManager ¶
type Controller ¶
type Dialect ¶
type Dialect interface {
SERIAL() string
UUID() string
BOOLEAN() string
FLOAT() string
DOUBLE() string
BLOB() string
BYTES(fix bool, size int) string
DATETIME() string
CurDate() string
CurTime() string
Now() string
Uuid() string
Boolean(val bool) string
CreateDatabase() string
DropDatabase() string
Resource() string
Shell() (string, []string)
Setup() string
String() string
Driver() string
Select(table string, columns []string, where, order string, offset, limit int) string
}
type Migrator ¶
type RedisCacheManager ¶
type RedisCacheManager struct {
// contains filtered or unexported fields
}
func (*RedisCacheManager) Get ¶
func (p *RedisCacheManager) Get(key string, value interface{}) error
type RedisSessionProvider ¶
type RedisSessionProvider struct {
// contains filtered or unexported fields
}
func (*RedisSessionProvider) Destroy ¶
func (rsp *RedisSessionProvider) Destroy(sid string) error
type RedisSessionStore ¶
type RedisSessionStore struct {
SessionStore
// contains filtered or unexported fields
}
func (*RedisSessionStore) Delete ¶
func (rss *RedisSessionStore) Delete(key interface{}) error
func (*RedisSessionStore) Get ¶
func (rss *RedisSessionStore) Get(key interface{}) interface{}
func (*RedisSessionStore) SessionId ¶
func (rss *RedisSessionStore) SessionId() string
func (*RedisSessionStore) Set ¶
func (rss *RedisSessionStore) Set(key, value interface{}) error
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
type Router ¶
type SessionManager ¶
type SessionManager struct {
// contains filtered or unexported fields
}
func (*SessionManager) Destroy ¶
func (sm *SessionManager) Destroy(wrt http.ResponseWriter, req *http.Request)
func (*SessionManager) Start ¶
func (sm *SessionManager) Start(wrt http.ResponseWriter, req *http.Request) (sess Session)
type SessionProvider ¶
type SessionStore ¶
type SessionStore struct {
// contains filtered or unexported fields
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.