plugin

package
v0.0.0-...-16f3fb8 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 11 Imported by: 2

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

func Silent

func Silent(url ...string) *_SilenceSetter

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

func (*Html5Router) Get

func (p *Html5Router) Get(ctx *goblet.Context) error

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

func (j JsonError) RespondAsJson() bool

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

func (*PageRedirector) Get

func (p *PageRedirector) Get(ctx *goblet.Context) error

type User

type User struct {
	//用于启动或者不启动Create方法,当网站不需要新建用户时,
	CreateOnlyByName    string
	CreateOnlyByPermits []string
}

func (*User) Create

func (u *User) Create(cx *goblet.Context)

func (*User) New

func (u *User) New(cx *goblet.Context)

func (*User) UpdateMany

func (u *User) UpdateMany(cx *goblet.Context)

type UserModule

type UserModule struct {
	Id      int64
	Name    string `xorm:"unique" goblet:"name"`
	Pwd     string `goblet:"pwd,md5"`
	Permits map[string]bool
}

func (*UserModule) TableName

func (u *UserModule) TableName() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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