Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var JSON = new(_JSONPlugin)
JSON standard JSON plugin JSON 标准JSON服务器 Usage: goblet.Organize("server-name", plugin.JSON)
View Source
var LoginInHead = new(_loginInHead)
Functions ¶
func JWT ¶
func JWT() *_JwtLoginPlugin
New create a new LoginAsJwt plugin, secret is the secret key for jwt, idKey is the key for id in jwt
func SetConfigSuffix ¶
func SetConfigSuffix(suffix string) *_SetConfigSuffixPlugin
Types ¶
type DelimSetter ¶
type DelimSetter struct {
// contains filtered or unexported fields
}
func NewDelimSetter ¶
func NewDelimSetter(strs ...string) *DelimSetter
func (*DelimSetter) SetDelim ¶
func (d *DelimSetter) SetDelim() [2]string
type Html5Router ¶
type Html5Router struct { goblet.Route `/` goblet.Render `html=/` goblet.GroupController // contains filtered or unexported fields }
func Html5RoutePages ¶
func Html5RoutePages(include []string, excluded ...[]string) *Html5Router
type JsonError ¶
type JsonError struct { }
JsonError mark a type as an error which should be used as Json, you can implement a type with RespondAsJson() bool function and respond true or just inherbit JsonError type
func (JsonError) RespondAsJson ¶
type JsonErrorRender ¶
type JsonErrorRender interface {
RespondAsJson() bool
}
type PageRedirector ¶
type PageRedirector struct { goblet.Route `/` goblet.Render `html` goblet.GroupController // contains filtered or unexported fields }
func PageRedirect ¶
func PageRedirect(matcher *regexp.Regexp, target string, withOriginalAsQuery bool) *PageRedirector
PageRedirect Create a page redirector match the matcher and redirect to target, if withOriginalAsQuery is true, the original url will be append to the target url's query part as target?original=original
Source Files ¶
Click to show internal directories.
Click to hide internal directories.