Documentation
¶
Index ¶
- Constants
- Variables
- func AppendSalt(src, salt []byte) []byte
- func Check() error
- func Csha512(d string, p []byte) (bool, error)
- func EnvAction(act func(env string, c *cli.Context) error) func(c *cli.Context)
- func Equal(src []byte, dst []byte) bool
- func FromBase64(s string) ([]byte, error)
- func FromBits(data []byte, obj interface{}) error
- func FromHex(s string) ([]byte, error)
- func FromJson(j []byte, o interface{}) error
- func FromToml(f string, v interface{}) error
- func FuncName(f interface{}) string
- func Get(name string) interface{}
- func In(objects ...interface{}) error
- func Loop(fn func(Engine) error) error
- func Md2Hm(md []byte) ([]byte, error)
- func Md5(p []byte) string
- func Mkdirs(d string, m os.FileMode) error
- func NewAesCipher(key []byte) (cipher.Block, error)
- func NewHmacHash() func() hash.Hash
- func ParseSalt(src []byte, length int) ([]byte, []byte)
- func PkgRoot(o interface{}) string
- func RandomBytes(n int) ([]byte, error)
- func Register(ens ...Engine)
- func Run() error
- func Sha512(p []byte) string
- func Shell(cmd string, args ...string) error
- func Ssha512(p []byte, l int) (string, error)
- func ToBase64(b []byte) string
- func ToBits(obj interface{}) ([]byte, error)
- func ToHex(bs []byte) string
- func ToJson(o interface{}) ([]byte, error)
- func ToToml(f string, v interface{}) error
- func Use(objects map[string]interface{}) error
- func Uuid() string
- type Aes
- type Controller
- func (p *Controller) Abort(w http.ResponseWriter, e error)
- func (p *Controller) Forbidden(w http.ResponseWriter)
- func (p *Controller) Html(w http.ResponseWriter, body string)
- func (p *Controller) Locale(r *http.Request) string
- func (p *Controller) NotFound(w http.ResponseWriter)
- func (p *Controller) Pager(r *render.Render, w http.ResponseWriter, pg *Pager, i interface{})
- type Engine
- type Hmac
- type Model
- type Pager
- type Router
- type Template
Constants ¶
View Source
const JSON = "application/json; charset=UTF-8"
View Source
const PLAIN = "text/plain; charset=UTF-8"
View Source
const XML = "application/xml; charset=UTF-8"
Variables ¶
View Source
var ENV = cli.StringFlag{
Name: "environment, e",
Value: "development",
Usage: "Specifies the environment to run this server under (test/development/production).",
EnvVar: "ITPKG_ENV",
}
Functions ¶
func AppendSalt ¶
func FromBase64 ¶
func NewAesCipher ¶
==============================================================================
func NewHmacHash ¶
=========================================================================
func RandomBytes ¶
Types ¶
type Aes ¶
type Controller ¶
type Controller struct { }
func (*Controller) Abort ¶
func (p *Controller) Abort(w http.ResponseWriter, e error)
func (*Controller) Forbidden ¶
func (p *Controller) Forbidden(w http.ResponseWriter)
func (*Controller) Html ¶
func (p *Controller) Html(w http.ResponseWriter, body string)
func (*Controller) NotFound ¶
func (p *Controller) NotFound(w http.ResponseWriter)
func (*Controller) Pager ¶
func (p *Controller) Pager(r *render.Render, w http.ResponseWriter, pg *Pager, i interface{})
type Hmac ¶
type Pager ¶
type Router ¶
type Router interface { GET(string, httprouter.Handle) POST(string, httprouter.Handle) DELETE(string, httprouter.Handle) PUT(string, httprouter.Handle) PATCH(string, httprouter.Handle) ServeFiles(string, http.FileSystem) }
Click to show internal directories.
Click to hide internal directories.