Versions in this module Expand all Collapse all v0 v0.12.0 Mar 25, 2015 v0.11.3 Jan 4, 2015 v0.11.2 Nov 23, 2014 v0.11.1 Oct 27, 2014 Changes in this version type Error + Link string v0.11.0 Oct 26, 2014 Changes in this version + var AppRoot string type Error + func (e *Error) SetLink(errorLink string) + type TestRequest struct + func (r *TestRequest) MakeRequest() + func (r *TestRequest) Send() type TestSuite + func (t *TestSuite) AssertNotContains(s string) + func (t *TestSuite) AssertNotEqual(expected, actual interface{}) + func (t *TestSuite) DeleteCustom(uri string) *TestRequest + func (t *TestSuite) GetCustom(uri string) *TestRequest + func (t *TestSuite) PostCustom(uri string, contentType string, reader io.Reader) *TestRequest + func (t *TestSuite) PostFile(path string, params url.Values, filePaths url.Values) + func (t *TestSuite) PostFileCustom(uri string, params url.Values, filePaths url.Values) *TestRequest + func (t *TestSuite) PostFormCustom(uri string, data url.Values) *TestRequest type Watcher + func (w *Watcher) NotifyWhenUpdated(listener Listener, watcher *fsnotify.Watcher) v0.10.0 Aug 10, 2014 Changes in this version + func HttpMethodOverride(c *Controller, fc []Filter) type CompressResponseWriter + func (c *CompressResponseWriter) Close() error + func (c CompressResponseWriter) CloseNotify() <-chan bool type MergedConfig + func NewEmptyConfig() *MergedConfig type TestSuite + func (t *TestSuite) MakeMultipartRequest(method string, path string, fields map[string]string) v0.9.1 Mar 2, 2014 Changes in this version type Email + func ValidEmail() Email v0.9.0 Feb 26, 2014 Changes in this version + const CurrentLocaleRenderArg + const DEFAULT_DATETIME_FORMAT + const DEFAULT_DATE_FORMAT + const DefaultFileContentType + const REVEL_IMPORT_PATH + const SESSION_ID_KEY + const TIMESTAMP_KEY + var AppName string + var AppPath string + var BasePath string + var BoolBinder = Binder + var CodePaths []string + var ConfPaths []string + var Config *MergedConfig + var CookieHttpOnly bool + var CookiePrefix string + var CookieSecure bool + var DateFormat string + var DateTimeFormat string + var DefaultValidationKeys map[string]map[int]string + var DevMode bool + var ERROR = log.New(&error_log, "ERROR ", log.Ldate | log.Ltime | log.Lshortfile) + var ERROR_CLASS = "hasError" + var Filters = []Filter + var FloatBinder = Binder + var HttpAddr string + var HttpPort int + var HttpSsl bool + var HttpSslCert string + var HttpSslKey string + var INFO = log.New(ioutil.Discard, "INFO ", log.Ldate | log.Ltime | log.Lshortfile) + var ImportPath string + var Initialized bool + var IntBinder = Binder + var KindBinders = make(map[reflect.Kind]Binder) + var MainRouter *Router + var MainTemplateLoader *TemplateLoader + var MainWatcher *Watcher + var MapBinder = Binder + var Modules []Module + var NilChain = []Filter + var NilFilter = func(_ *Controller, _ []Filter) + var PointerBinder = Binder + var RevelPath string + var RunMode string + var Server *http.Server + var SourcePath string + var StringBinder = Binder + var TRACE = log.New(ioutil.Discard, "TRACE ", log.Ldate | log.Ltime | log.Lshortfile) + var TemplateDelims string + var TemplateFuncs = map[string]interface + var TemplatePaths []string + var TestSuites []interface + var TimeBinder = Binder + var TimeFormats = []string + var TypeBinders = make(map[reflect.Type]Binder) + var UintBinder = Binder + var ViewsPath string + var WARN = log.New(ioutil.Discard, "WARN ", log.Ldate | log.Ltime | log.Lshortfile) + var WatchFilter = func(c *Controller, fc []Filter) + func ActionInvoker(c *Controller, _ []Filter) + func Bind(params *Params, name string, typ reflect.Type) reflect.Value + func BindFile(fileHeader *multipart.FileHeader, typ reflect.Type) reflect.Value + func BindValue(val string, typ reflect.Type) reflect.Value + func CheckInit() + func CompressFilter(c *Controller, fc []Filter) + func ContainsString(list []string, target string) bool + func ContentTypeByFilename(filename string) string + func DirExists(filename string) bool + func Equal(a, b interface{}) bool + func ExecuteTemplate(tmpl ExecutableTemplate, data interface{}) string + func FilterConfiguringFilter(c *Controller, fc []Filter) + func FilterEq(a, b Filter) bool + func FindMethod(recvType reflect.Type, funcVal reflect.Value) *reflect.Method + func FirstNonEmpty(strs ...string) string + func FlashFilter(c *Controller, fc []Filter) + func I18nFilter(c *Controller, fc []Filter) + func Init(mode, importPath, srcPath string) + func InterceptFunc(intc InterceptorFunc, when When, target interface{}) + func InterceptMethod(intc InterceptorMethod, when When) + func InterceptorFilter(c *Controller, fc []Filter) + func LoadMimeConfig() + func Message(locale, message string, args ...interface{}) string + func MessageLanguages() []string + func MustReadLines(filename string) []string + func OnAppStart(f func()) + func PanicFilter(c *Controller, fc []Filter) + func ParamsFilter(c *Controller, fc []Filter) + func ParseKeyValueCookie(val string, cb func(key, val string)) + func ParseParams(params *Params, req *Request) + func ReadLines(filename string) ([]string, error) + func RegisterController(c interface{}, methods []*MethodType) + func ResolveContentType(req *http.Request) string + func ResolveFormat(req *http.Request) string + func ResolveImportPath(importPath string) (string, error) + func ReverseUrl(args ...interface{}) (string, error) + func RouterFilter(c *Controller, fc []Filter) + func Run(port int) + func SessionFilter(c *Controller, fc []Filter) + func Sign(message string) string + func Slug(text string) string + func Unbind(output map[string]string, name string, val interface{}) + func ValidationFilter(c *Controller, fc []Filter) + func ValueBinder(f func(value string, typ reflect.Type) reflect.Value) func(*Params, string, reflect.Type) reflect.Value + func Verify(message, sig string) bool + type AcceptLanguage struct + Language string + Quality float32 + type AcceptLanguages []AcceptLanguage + func ResolveAcceptLanguage(req *http.Request) AcceptLanguages + func (al AcceptLanguages) Len() int + func (al AcceptLanguages) Less(i, j int) bool + func (al AcceptLanguages) String() string + func (al AcceptLanguages) Swap(i, j int) + type ActionDefinition struct + Action string + Args map[string]string + Host string + Method string + Star bool + Url string + func (a *ActionDefinition) String() string + type BinaryResult struct + Delivery ContentDisposition + Length int64 + ModTime time.Time + Name string + Reader io.Reader + func (r *BinaryResult) Apply(req *Request, resp *Response) + type Binder struct + Bind func(params *Params, name string, typ reflect.Type) reflect.Value + Unbind func(output map[string]string, name string, val interface{}) + type CompressResponseWriter struct + func (c *CompressResponseWriter) DetectCompressionType(req *Request, resp *Response) + func (c *CompressResponseWriter) Write(b []byte) (int, error) + func (c *CompressResponseWriter) WriteHeader(status int) + type ContentDisposition string + var Attachment ContentDisposition = "attachment" + var Inline ContentDisposition = "inline" + type Controller struct + Action string + AppController interface{} + Args map[string]interface{} + Flash Flash + MethodName string + MethodType *MethodType + Name string + Params *Params + RenderArgs map[string]interface{} + Request *Request + Response *Response + Result Result + Session Session + Type *ControllerType + Validation *Validation + func NewController(req *Request, resp *Response) *Controller + func (c *Controller) FlashParams() + func (c *Controller) Forbidden(msg string, objs ...interface{}) Result + func (c *Controller) Message(message string, args ...interface{}) (value string) + func (c *Controller) NotFound(msg string, objs ...interface{}) Result + func (c *Controller) Redirect(val interface{}, args ...interface{}) Result + func (c *Controller) Render(extraRenderArgs ...interface{}) Result + func (c *Controller) RenderBinary(memfile io.Reader, filename string, delivery ContentDisposition, ...) Result + func (c *Controller) RenderError(err error) Result + func (c *Controller) RenderFile(file *os.File, delivery ContentDisposition) Result + func (c *Controller) RenderHtml(html string) Result + func (c *Controller) RenderJson(o interface{}) Result + func (c *Controller) RenderJsonP(callback string, o interface{}) Result + func (c *Controller) RenderTemplate(templatePath string) Result + func (c *Controller) RenderText(text string, objs ...interface{}) Result + func (c *Controller) RenderXml(o interface{}) Result + func (c *Controller) SetAction(controllerName, methodName string) error + func (c *Controller) SetCookie(cookie *http.Cookie) + func (c *Controller) Todo() Result + type ControllerType struct + ControllerIndexes [][]int + Methods []*MethodType + Type reflect.Type + func (ct *ControllerType) Method(name string) *MethodType + type DiscerningListener interface + WatchDir func(info os.FileInfo) bool + WatchFile func(basename string) bool + type Email struct + func VaildEmail() Email + func (e Email) DefaultMessage() string + type Error struct + Column int + Description string + Line int + MetaError string + Path string + SourceLines []string + SourceType string + Stack string + Title string + func NewErrorFromPanic(err interface{}) *Error + func (e *Error) ContextSource() []sourceLine + func (e *Error) Error() string + type ErrorResult struct + Error error + RenderArgs map[string]interface{} + func (r ErrorResult) Apply(req *Request, resp *Response) + type ExecutableTemplate interface + Execute func(io.Writer, interface{}) error + type Field struct + Error *ValidationError + Name string + func NewField(name string, renderArgs map[string]interface{}) *Field + func (f *Field) ErrorClass() string + func (f *Field) Flash() string + func (f *Field) FlashArray() []string + func (f *Field) Id() string + func (f *Field) Value() interface{} + type Filter func(c *Controller, filterChain []Filter) + type FilterConfigurator struct + func FilterAction(methodRef interface{}) FilterConfigurator + func FilterController(controllerInstance interface{}) FilterConfigurator + func (conf FilterConfigurator) Add(f Filter) FilterConfigurator + func (conf FilterConfigurator) Insert(insert Filter, where When, target Filter) FilterConfigurator + func (conf FilterConfigurator) Remove(target Filter) FilterConfigurator + type Flash struct + Data map[string]string + Out map[string]string + func (f Flash) Error(msg string, args ...interface{}) + func (f Flash) Success(msg string, args ...interface{}) + type GoTemplate struct + func (gotmpl GoTemplate) Content() []string + func (gotmpl GoTemplate) Render(wr io.Writer, arg interface{}) error + type InterceptTarget int + const ALL_CONTROLLERS + type Interception struct + When When + func (i Interception) Invoke(val reflect.Value) reflect.Value + type InterceptorFunc func(*Controller) Result + type InterceptorMethod interface + type Length struct + N int + func ValidLength(n int) Length + func (s Length) DefaultMessage() string + func (s Length) IsSatisfied(obj interface{}) bool + type Listener interface + Refresh func() *Error + type Match struct + Regexp *regexp.Regexp + func ValidMatch(regex *regexp.Regexp) Match + func (m Match) DefaultMessage() string + func (m Match) IsSatisfied(obj interface{}) bool + type Max struct + Max int + func ValidMax(max int) Max + func (m Max) DefaultMessage() string + func (m Max) IsSatisfied(obj interface{}) bool + type MaxSize struct + Max int + func ValidMaxSize(max int) MaxSize + func (m MaxSize) DefaultMessage() string + func (m MaxSize) IsSatisfied(obj interface{}) bool + type MergedConfig struct + func LoadConfig(confName string) (*MergedConfig, error) + func (c *MergedConfig) Bool(option string) (result, found bool) + func (c *MergedConfig) BoolDefault(option string, dfault bool) bool + func (c *MergedConfig) HasSection(section string) bool + func (c *MergedConfig) Int(option string) (result int, found bool) + func (c *MergedConfig) IntDefault(option string, dfault int) int + func (c *MergedConfig) Options(prefix string) []string + func (c *MergedConfig) Raw() *config.Config + func (c *MergedConfig) SetOption(name, value string) + func (c *MergedConfig) SetSection(section string) + func (c *MergedConfig) String(option string) (result string, found bool) + func (c *MergedConfig) StringDefault(option, dfault string) string + type MethodArg struct + Name string + Type reflect.Type + type MethodType struct + Args []*MethodArg + Name string + RenderArgNames map[int][]string + type Min struct + Min int + func ValidMin(min int) Min + func (m Min) DefaultMessage() string + func (m Min) IsSatisfied(obj interface{}) bool + type MinSize struct + Min int + func ValidMinSize(min int) MinSize + func (m MinSize) DefaultMessage() string + func (m MinSize) IsSatisfied(obj interface{}) bool + type Module struct + ImportPath string + Name string + Path string + func ModuleByName(name string) (m Module, found bool) + type Params struct + Files map[string][]*multipart.FileHeader + Fixed url.Values + Form url.Values + Query url.Values + Route url.Values + func (p *Params) Bind(dest interface{}, name string) + type PlaintextErrorResult struct + Error error + func (r PlaintextErrorResult) Apply(req *Request, resp *Response) + type Range struct + func ValidRange(min, max int) Range + func (r Range) DefaultMessage() string + func (r Range) IsSatisfied(obj interface{}) bool + type RedirectToActionResult struct + func (r *RedirectToActionResult) Apply(req *Request, resp *Response) + type RedirectToUrlResult struct + func (r *RedirectToUrlResult) Apply(req *Request, resp *Response) + type RenderHtmlResult struct + func (r RenderHtmlResult) Apply(req *Request, resp *Response) + type RenderJsonResult struct + func (r RenderJsonResult) Apply(req *Request, resp *Response) + type RenderTemplateResult struct + RenderArgs map[string]interface{} + Template Template + func (r *RenderTemplateResult) Apply(req *Request, resp *Response) + type RenderTextResult struct + func (r RenderTextResult) Apply(req *Request, resp *Response) + type RenderXmlResult struct + func (r RenderXmlResult) Apply(req *Request, resp *Response) + type Request struct + AcceptLanguages AcceptLanguages + ContentType string + Format string + Locale string + Websocket *websocket.Conn + func NewRequest(r *http.Request) *Request + type Required struct + func ValidRequired() Required + func (r Required) DefaultMessage() string + func (r Required) IsSatisfied(obj interface{}) bool + type Response struct + ContentType string + Out http.ResponseWriter + Status int + func NewResponse(w http.ResponseWriter) *Response + func (resp *Response) WriteHeader(defaultStatusCode int, defaultContentType string) + type Result interface + Apply func(req *Request, resp *Response) + type Route struct + Action string + ControllerName string + FixedParams []string + Method string + MethodName string + Path string + TreePath string + func NewRoute(method, path, action, fixedArgs, routesPath string, line int) (r *Route) + type RouteMatch struct + Action string + ControllerName string + FixedParams []string + MethodName string + Params map[string][]string + type Router struct + Routes []*Route + Tree *pathtree.Node + func NewRouter(routesPath string) *Router + func (router *Router) Refresh() (err *Error) + func (router *Router) Reverse(action string, argValues map[string]string) *ActionDefinition + func (router *Router) Route(req *http.Request) *RouteMatch + type Session map[string]string + func (s Session) Id() string + func (s Session) SetDefaultExpiration() + func (s Session) SetNoExpiration() + type Template interface + Content func() []string + Name func() string + Render func(wr io.Writer, arg interface{}) error + type TemplateLoader struct + func NewTemplateLoader(paths []string) *TemplateLoader + func (loader *TemplateLoader) Refresh() *Error + func (loader *TemplateLoader) Template(name string) (Template, error) + func (loader *TemplateLoader) WatchDir(info os.FileInfo) bool + func (loader *TemplateLoader) WatchFile(basename string) bool + type TestSuite struct + Client *http.Client + Response *http.Response + ResponseBody []byte + Session Session + func NewTestSuite() TestSuite + func (t *TestSuite) Assert(exp bool) + func (t *TestSuite) AssertContains(s string) + func (t *TestSuite) AssertContainsRegex(regex string) + func (t *TestSuite) AssertContentType(contentType string) + func (t *TestSuite) AssertEqual(expected, actual interface{}) + func (t *TestSuite) AssertHeader(name, value string) + func (t *TestSuite) AssertNotFound() + func (t *TestSuite) AssertOk() + func (t *TestSuite) AssertStatus(status int) + func (t *TestSuite) Assertf(exp bool, formatStr string, args ...interface{}) + func (t *TestSuite) BaseUrl() string + func (t *TestSuite) Delete(path string) + func (t *TestSuite) Get(path string) + func (t *TestSuite) Host() string + func (t *TestSuite) MakeRequest(req *http.Request) + func (t *TestSuite) MakeRequestSession(req *http.Request) + func (t *TestSuite) Post(path string, contentType string, reader io.Reader) + func (t *TestSuite) PostForm(path string, data url.Values) + func (t *TestSuite) WebSocket(path string) *websocket.Conn + func (t *TestSuite) WebSocketUrl() string + type Validation struct + Errors []*ValidationError + func (v *Validation) Check(obj interface{}, checks ...Validator) *ValidationResult + func (v *Validation) Clear() + func (v *Validation) Email(str string) *ValidationResult + func (v *Validation) Error(message string, args ...interface{}) *ValidationResult + func (v *Validation) ErrorMap() map[string]*ValidationError + func (v *Validation) HasErrors() bool + func (v *Validation) Keep() + func (v *Validation) Length(obj interface{}, n int) *ValidationResult + func (v *Validation) Match(str string, regex *regexp.Regexp) *ValidationResult + func (v *Validation) Max(n int, max int) *ValidationResult + func (v *Validation) MaxSize(obj interface{}, max int) *ValidationResult + func (v *Validation) Min(n int, min int) *ValidationResult + func (v *Validation) MinSize(obj interface{}, min int) *ValidationResult + func (v *Validation) Range(n, min, max int) *ValidationResult + func (v *Validation) Required(obj interface{}) *ValidationResult + type ValidationError struct + Key string + Message string + func (e *ValidationError) String() string + type ValidationResult struct + Error *ValidationError + Ok bool + func (r *ValidationResult) Key(key string) *ValidationResult + func (r *ValidationResult) Message(message string, args ...interface{}) *ValidationResult + type Validator interface + DefaultMessage func() string + IsSatisfied func(interface{}) bool + type Watcher struct + func NewWatcher() *Watcher + func (w *Watcher) Listen(listener Listener, roots ...string) + func (w *Watcher) Notify() *Error + type When int + const AFTER + const BEFORE + const FINALLY + const PANIC + type WriteFlusher interface + Flush func() error + Write func([]byte) (int, error)