Documentation
¶
Index ¶
- Constants
- Variables
- func ClearFlowCache(flow string)
- func GetAllFlows() map[string]FilterFlow
- func GetFlowProcess(flowID string) func(ctx *fasthttp.RequestCtx)
- func GetLDAPGroupsMappingRoles(str []string) []string
- func GetScrollHitsTotal(version elastic.Version, data []byte) (int64, error)
- func RegisterFlowConfig(flow FlowConfig)
- func RegisterRouterConfig(config RouterConfig)
- type ClusterPermission
- type EntryConfig
- type FieldPermission
- type FilterConfig
- type FilterFlow
- type FlowConfig
- type IPAccessRules
- type IndexPermission
- type Role
- type Roles
- type RouterConfig
- type RuleConfig
Constants ¶
View Source
const CACHEABLE = "request_cacheable"
View Source
const CACHEHASH = "request_cache_hash"
Variables ¶
View Source
var FaviconPath = []byte("/favicon.ico")
Functions ¶
func ClearFlowCache ¶
func ClearFlowCache(flow string)
func GetAllFlows ¶
func GetAllFlows() map[string]FilterFlow
func GetFlowProcess ¶
func GetFlowProcess(flowID string) func(ctx *fasthttp.RequestCtx)
func GetScrollHitsTotal ¶
func RegisterFlowConfig ¶
func RegisterFlowConfig(flow FlowConfig)
func RegisterRouterConfig ¶
func RegisterRouterConfig(config RouterConfig)
Types ¶
type ClusterPermission ¶
type EntryConfig ¶
type EntryConfig struct {
orm.ORMObjectBase
Name string `config:"name" json:"name,omitempty" elastic_mapping:"name:{type:keyword,fields:{text: {type: text}}}"`
Enabled bool `config:"enabled" json:"enabled,omitempty" elastic_mapping:"enabled: { type: boolean }"`
DirtyShutdown bool `config:"dirty_shutdown" json:"dirty_shutdown,omitempty" elastic_mapping:"dirty_shutdown: { type: boolean }"`
SkipReduceMemoryUsage bool `config:"skip_reduce_memory" json:"skip_reduce_memory,omitempty" elastic_mapping:"skip_reduce_memory: { type: boolean }"`
ReadTimeout int `config:"read_timeout" json:"read_timeout,omitempty" elastic_mapping:"read_timeout: { type: integer }"`
WriteTimeout int `config:"write_timeout" json:"write_timeout,omitempty" elastic_mapping:"write_timeout: { type: integer }"`
DisableTCPKeepalive bool `` /* 128-byte string literal not displayed */
TCPKeepaliveSeconds int `` /* 137-byte string literal not displayed */
IdleTimeout int `config:"idle_timeout" json:"idle_timeout,omitempty" elastic_mapping:"idle_timeout: { type: integer }"`
MaxIdleWorkerDurationSeconds int `` /* 170-byte string literal not displayed */
SleepWhenConcurrencyLimitsExceeded int `` /* 212-byte string literal not displayed */
ReadBufferSize int `config:"read_buffer_size" json:"read_buffer_size,omitempty" elastic_mapping:"read_buffer_size: { type: integer }"`
WriteBufferSize int `config:"write_buffer_size" json:"write_buffer_size,omitempty" elastic_mapping:"write_buffer_size: { type: integer }"`
MaxRequestBodySize int `` /* 128-byte string literal not displayed */
MaxInflightRequestSize int `` /* 130-byte string literal not displayed */
MaxConcurrency int `config:"max_concurrency" json:"max_concurrency,omitempty" elastic_mapping:"max_concurrency: { type: integer }"`
MaxConnsPerIP int `config:"max_conns_per_ip" json:"max_conns_per_ip,omitempty" elastic_mapping:"max_conns_per_ip: { type: integer }"`
TLSConfig config.TLSConfig `config:"tls" json:"tls,omitempty" elastic_mapping:"tls: { type: object }"`
NetworkConfig config.NetworkConfig `config:"network" json:"network,omitempty" elastic_mapping:"network: { type: object }"`
RouterConfigName string `config:"router" json:"router,omitempty" elastic_mapping:"router: { type: keyword }"`
}
func (*EntryConfig) Equals ¶
func (this *EntryConfig) Equals(target *EntryConfig) bool
type FieldPermission ¶
type FilterConfig ¶
type FilterFlow ¶
type FilterFlow struct {
orm.ORMObjectBase
Filters []pipeline.Filter `json:"filters,omitempty"`
}
func GetFlow ¶
func GetFlow(flowID string) (FilterFlow, error)
func MustGetFlow ¶
func MustGetFlow(flowID string) FilterFlow
func (*FilterFlow) JoinFilter ¶
func (flow *FilterFlow) JoinFilter(filter pipeline.Filter) *FilterFlow
func (*FilterFlow) Process ¶
func (flow *FilterFlow) Process(ctx *fasthttp.RequestCtx)
func (*FilterFlow) ToString ¶
func (flow *FilterFlow) ToString() string
type FlowConfig ¶
type FlowConfig struct {
orm.ORMObjectBase
Name string `config:"name" json:"name,omitempty" elastic_mapping:"name:{type:keyword,fields:{text: {type: text}}}"`
Filters []*config.Config `config:"filter" json:"-"`
JsonFilters []map[string]interface{} `json:"filter,omitempty"`
}
func GetFlowConfig ¶
func GetFlowConfig(id string) (FlowConfig, error)
func (*FlowConfig) GetConfig ¶
func (flow *FlowConfig) GetConfig() []*config.Config
type IPAccessRules ¶
type IPAccessRules struct {
Enabled bool `config:"enabled" json:"enabled,omitempty" elastic_mapping:"enabled: { type: boolean }"`
ClientIP struct {
DeniedList []string `config:"denied" json:"denied,omitempty" elastic_mapping:"denied: { type: keyword }"`
PermittedList []string `config:"permitted" json:"permitted,omitempty" elastic_mapping:"permitted: { type: keyword }"`
} `config:"client_ip" json:"client_ip,omitempty" elastic_mapping:"client_ip: { type: object }"`
}
type IndexPermission ¶
type Role ¶
type Role struct {
Cluster []ClusterPermission //A list of cluster privileges.
Indices []IndexPermission //A list of indices permissions entries.
}
type RouterConfig ¶
type RouterConfig struct {
orm.ORMObjectBase
Name string `config:"name" json:"name,omitempty" elastic_mapping:"name:{type:keyword,fields:{text: {type: text}}}"`
DefaultFlow string `config:"default_flow" json:"default_flow,omitempty" elastic_mapping:"default_flow: { type: keyword }"`
TracingFlow string `config:"tracing_flow" json:"tracing_flow,omitempty" elastic_mapping:"tracing_flow: { type: keyword }"`
RuleToggleEnabled bool `config:"rule_toggle_enabled" json:"rule_toggle_enabled,omitempty" elastic_mapping:"rule_toggle_enabled: { type: boolean }"`
Rules []RuleConfig `config:"rules" json:"rules,omitempty" elastic_mapping:"rules: { type: object }"`
IPAccessRules IPAccessRules `config:"ip_access_control" json:"ip_access_rules,omitempty" elastic_mapping:"ip_access_rules: { type: object }"`
}
func GetRouter ¶
func GetRouter(name string) RouterConfig
type RuleConfig ¶
type RuleConfig struct {
Enabled bool `config:"enabled" json:"enabled,omitempty" elastic_mapping:"enabled: { type: boolean }"`
Method []string `config:"method" json:"method,omitempty" elastic_mapping:"method: { type: keyword }"`
PathPattern []string `config:"pattern" json:"pattern,omitempty" elastic_mapping:"pattern: { type: keyword }"`
Flow []string `config:"flow" json:"flow,omitempty" elastic_mapping:"flow: { type: keyword }"`
Description string `config:"description" json:"description,omitempty" elastic_mapping:"description: { type: keyword }"`
}
Click to show internal directories.
Click to hide internal directories.