Versions in this module Expand all Collapse all v0 v0.12.5 Mar 4, 2020 v0.12.4 Mar 3, 2020 v0.12.3 Feb 7, 2019 GO-2020-0033 GO-2020-0033: Path Traversal in aahframe.work v0.12.2 Dec 13, 2018 GO-2020-0033 GO-2020-0033: Path Traversal in aahframe.work v0.12.1 Dec 8, 2018 GO-2020-0033 GO-2020-0033: Path Traversal in aahframe.work v0.12.0 Dec 2, 2018 GO-2020-0033 GO-2020-0033: Path Traversal in aahframe.work Changes in this version + const SlashString + var ErrCORSContentTypeNotAllowed = errors.New("cors: content-type not allowed") + var ErrCORSHeaderNotAllowed = errors.New("cors: header not allowed") + var ErrCORSMethodNotAllowed = errors.New("cors: method not allowed") + var ErrCORSOriginIsInvalid = errors.New("cors: invalid origin") + var ErrNoDomainRoutesConfigFound = errors.New("router: no domain routes config found") + var ErrRouteConstraintFailed = errors.New("router: route constraints failed") + var HTTPMethodActionMap = map[string]string + func IsDefaultAction(action string) bool + type CORS struct + AllowCredentials bool + AllowHeaders []string + AllowMethods []string + AllowOrigins []string + ExposeHeaders []string + MaxAge string + func (c *CORS) AddAllowHeaders(hdrs []string) *CORS + func (c *CORS) AddAllowMethods(methods []string) *CORS + func (c *CORS) AddExposeHeaders(hdrs []string) *CORS + func (c *CORS) AddOrigins(origins []string) *CORS + func (c *CORS) IsHeadersAllowed(hdrs string) bool + func (c *CORS) IsMethodAllowed(method string) bool + func (c *CORS) IsOriginAllowed(origin string) bool + func (c *CORS) SetAllowCredentials(b bool) *CORS + func (c *CORS) SetMaxAge(age string) *CORS + func (c CORS) String() string + type Domain struct + AntiCSRFEnabled bool + AutoOptions bool + CORS *CORS + CORSEnabled bool + CatchAllRoute *Route + DefaultAuth string + Host string + IsSubDomain bool + Key string + MethodNotAllowed bool + Name string + Port string + RedirectTrailingSlash bool + func (d *Domain) AddRoute(route *Route) error + func (d *Domain) Allowed(requestMethod, path string) (allowed string) + func (d *Domain) Lookup(req *http.Request) (*Route, ahttp.URLParams, bool) + func (d *Domain) LookupByName(name string) *Route + func (d *Domain) RouteURL(routeName string, args ...interface{}) string + func (d *Domain) RouteURLNamedArgs(routeName string, args map[string]interface{}) string + type Route struct + Action string + Auth string + CORS *CORS + Constraints map[string]string + Dir string + File string + IsAntiCSRFCheck bool + IsStatic bool + ListDir bool + MaxBodySize int64 + Method string + Name string + ParentName string + Path string + Target string + func (r *Route) HasAccess(subject *security.Subject) (bool, []*authz.Reason) + func (r *Route) IsDir() bool + func (r *Route) IsFile() bool + func (r *Route) String() string + type Router struct + Domains []*Domain + func New(configPath string, appCfg *config.Config) *Router + func NewWithApp(app interface{}, configPath string) (*Router, error) + func (r *Router) CreateRouteURL(host, routeName string, margs map[string]interface{}, args ...interface{}) string + func (r *Router) DomainAddresses() []string + func (r *Router) Load() (err error) + func (r *Router) Lookup(host string) *Domain + func (r *Router) RegisteredActions() map[string]map[string]uint8 + func (r *Router) RegisteredWSActions() map[string]map[string]uint8 + func (r *Router) RootDomain() *Domain