forked from extrame/goblet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugin.go
45 lines (35 loc) · 873 Bytes
/
plugin.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package goblet
type NewPlugin interface {
AddCfgAndInit(server *Server) error
}
//DbPwdPlugin Change the db connection password
type DbPwdPlugin interface {
SetPwd(origin string) string
}
//ChangeSuffixOfConfig Change the config file suffix, default is conf
type ChangeSuffixOfConfig interface {
GetConfigSuffix() string
}
//DbPwdPlugin Change the db connection name
type dbUserNamePlugin interface {
SetName(origin string) string
}
//RequestPlugin Called on the request built
type onNewRequestPlugin interface {
OnNewRequest(*Context) error
}
type OkFuncSetter interface {
RespendOk(*Context)
}
type ErrFuncSetter interface {
RespondError(*Context, error, ...string)
}
type DefaultRenderSetter interface {
DefaultRender() string
}
type SilenceUrlSetter interface {
SetSilenceUrls() map[string]bool
}
type DelimSetter interface {
SetDelim() [2]string
}