-
Notifications
You must be signed in to change notification settings - Fork 0
/
type.go
47 lines (42 loc) · 1.16 KB
/
type.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
46
47
package biu
import (
"github.com/emicklei/go-restful/v3"
)
// NS contains configuration of a namespace
type NS struct {
NameSpace string // url parent of controller
Controller CtlInterface // controller implement CtlInterface
Desc string // description of controller of namespace
ExternalDesc string // external documentation of controller
ExternalURL string // external url of ExternalDesc
}
// WS extends *restful.WebService
type WS struct {
namespace string
*restful.WebService
*Container
errors map[string]map[int]string
}
// CtlInterface is the interface of controllers
type CtlInterface interface {
WebService(WS)
}
// SwaggerInfo contains configuration of swagger documents.
type SwaggerInfo struct {
Title string
Description string
TermsOfService string
ContactName string
ContactURL string
ContactEmail string
LicenseName string
LicenseURL string
Version string
WebServicesURL string
DisableCORS bool
// swagger service will be running under
// http://<api>/<RoutePrefix>/<RouteSuffix>
// by default the RouteSuffix is swagger
RoutePrefix string
RouteSuffix string
}