Versions in this module Expand all Collapse all v1 v1.5.0 Jan 6, 2022 v1.4.0 Nov 16, 2021 v1.3.2 Oct 19, 2021 v1.3.1 Oct 14, 2021 v1.3.0 Oct 11, 2021 v1.3.0-rc Sep 10, 2021 v1.2.2 Sep 7, 2021 v1.2.1 Aug 20, 2021 v1.2.0 Aug 13, 2021 v1.2.0-rc Aug 2, 2021 v1.1.1 Aug 3, 2021 v1.1.0 Jul 31, 2021 v1.1.0-rc Jul 8, 2021 v1.0.1 Jul 5, 2021 v1.0.0 Jun 8, 2021 v1.0.0-rc May 24, 2021 v1.0.0-RC May 21, 2021 v0 v0.0.1 May 21, 2021 Changes in this version + type APIs []Spec + func (o APIs) Find(req *http.Request) *Spec + func (o APIs) FindOriginPath(req *http.Request) *Spec + type AuditContext struct + BeginTime time.Time + Bundle *bundle.Bundle + Cache *sync.Map + ClientIP string + EndTime time.Time + OrgID int64 + Request *http.Request + Response *http.Response + Result apistructs.Result + UrlParams map[string]string + UserAgent string + UserID string + func (ctx *AuditContext) BindRequestData(body interface{}) error + func (ctx *AuditContext) BindResponseData(body interface{}) error + func (ctx *AuditContext) CreateAudit(audit *apistructs.Audit) error + func (ctx *AuditContext) GetApp(idObject interface{}) (*apistructs.ApplicationDTO, error) + func (ctx *AuditContext) GetOrg(idObject interface{}) (*apistructs.OrgDTO, error) + func (ctx *AuditContext) GetParamInt64(key string) (int64, error) + func (ctx *AuditContext) GetParamString(key string) (string, error) + func (ctx *AuditContext) GetParamUInt64(key string) (uint64, error) + func (ctx *AuditContext) GetProject(idObject interface{}) (*apistructs.ProjectDTO, error) + type Matcher struct + func NewMatcher(spec *Spec) *Matcher + func (m *Matcher) MatchBackendPath(path string) bool + func (m *Matcher) MatchMethod(method string) bool + func (m *Matcher) MatchPath(path string) bool + type Path struct + func NewPath(path string) *Path + func (p *Path) Fill(vars map[string]string) string + func (p *Path) Match(realPath string) bool + func (p *Path) String() string + func (p *Path) Vars(realPath string) map[string]string + type Scheme int + const HTTP + const WS + func SchemeFromString(s string) (Scheme, error) + func (t Scheme) String() string + type Spec struct + Audit func(*AuditContext) error + BackendPath *Path + CheckBasicAuth bool + CheckLogin bool + CheckToken bool + ChunkAPI bool + Custom func(rw http.ResponseWriter, req *http.Request) + CustomResponse func(*http.Response) error + Host string + K8SHost string + MarathonHost string + Method string + NeedDesensitize bool + Path *Path + Port int + Scheme Scheme + TryCheckLogin bool + func (s *Spec) Validate() error