sys

package
v0.0.0-...-70fceca Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2015 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewApp

func NewApp() *application

Types

type AsyncJob

type AsyncJob struct {
	Result chan interface{}
	// contains filtered or unexported fields
}

func NewAsyncJob

func NewAsyncJob(c chan interface{}) *AsyncJob

func (*AsyncJob) Get

func (a *AsyncJob) Get(k string) interface{}

func (*AsyncJob) Set

func (a *AsyncJob) Set(k string, v interface{})

type AsyncWorker

type AsyncWorker func(p JobParams) interface{}

type Controller

type Controller struct {
}

func (*Controller) AddJob

func (ct *Controller) AddJob(n string, j *AsyncJob) error

func (*Controller) GetConfig

func (ct *Controller) GetConfig(c web.C) *toml.TomlTree

func (*Controller) GetPlugin

func (ct *Controller) GetPlugin(name string, c web.C) interface{}

func (*Controller) GetSession

func (ct *Controller) GetSession(c web.C) *sessions.Session

func (*Controller) IsXhr

func (ct *Controller) IsXhr(c web.C) bool

func (*Controller) NewJobQueue

func (ct *Controller) NewJobQueue(n string, w AsyncWorker, c int) error

func (*Controller) Render

func (ct *Controller) Render(c web.C) *render.Render

type CsrfProtection

type CsrfProtection struct {
	Key    string
	Cookie string
	Header string
	Secure bool
}

type JobParams

type JobParams map[string]interface{}

type Permission

type Permission int

type Plugin

type Plugin interface {
	Init() error
	Close() error
	Get() interface{}
}

type StaticOptions

type StaticOptions struct {
	Prefix    string
	IndexFile string
	Logging   bool
	// Expires defines which user-defined function to use for producing a HTTP Expires Header
	Expires func() string
}

type User

type User interface {
	IsAuthenticated() bool
	IsActive() bool
	IsAnonymous() bool
	IsAdmin() bool
	Can(p Permission) bool
}

Jump to

Keyboard shortcuts

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