rename ngin to rest

This commit is contained in:
kevin
2020-07-31 11:14:48 +08:00
parent e133ffd820
commit 0897f60c5d
78 changed files with 118 additions and 111 deletions

31
rest/types.go Normal file
View File

@@ -0,0 +1,31 @@
package rest
import "net/http"
type (
Route struct {
Method string
Path string
Handler http.HandlerFunc
}
jwtSetting struct {
enabled bool
secret string
prevSecret string
}
signatureSetting struct {
SignatureConf
enabled bool
}
featuredRoutes struct {
priority bool
jwt jwtSetting
signature signatureSetting
routes []Route
}
RouteOption func(r *featuredRoutes)
)