Documentation ¶
Overview ¶
Package v1 is the v1 version of the API.
Index ¶
- Constants
- Variables
- func AddToListFromSet(set *Set, list *[]string)
- func AddToSetFromList(list []string, set *Set)
- func Kind(kind string) schema.GroupKind
- func NameFlags(f uint32) string
- func Resource(resource string) schema.GroupResource
- func SetFlags(slots []int) (f uint32)
- type BodyConfig
- func (config *BodyConfig) Decide(bp *BodyProfile) string
- func (in *BodyConfig) DeepCopy() *BodyConfig
- func (in *BodyConfig) DeepCopyInto(out *BodyConfig)
- func (config *BodyConfig) Learn(p *BodyPile)
- func (config *BodyConfig) Marshal(depth int) string
- func (config *BodyConfig) Merge(m *BodyConfig)
- func (config *BodyConfig) Reconcile()
- type BodyPile
- type BodyProfile
- type CidrSet
- type Criteria
- type Ctrl
- type EnvelopConfig
- func (config *EnvelopConfig) AddTypicalVal()
- func (config *EnvelopConfig) Decide(pp *EnvelopProfile) string
- func (in *EnvelopConfig) DeepCopy() *EnvelopConfig
- func (in *EnvelopConfig) DeepCopyInto(out *EnvelopConfig)
- func (config *EnvelopConfig) Learn(p *EnvelopPile)
- func (config *EnvelopConfig) Marshal(depth int) string
- func (config *EnvelopConfig) Merge(m *EnvelopConfig)
- func (config *EnvelopConfig) Normalize()
- func (config *EnvelopConfig) Reconcile()
- type EnvelopPile
- type EnvelopProfile
- type Guardian
- type GuardianList
- type GuardianSpec
- type HeadersConfig
- func (config *HeadersConfig) AddTypicalVal()
- func (config *HeadersConfig) Decide(h *HeadersProfile) string
- func (in *HeadersConfig) DeepCopy() *HeadersConfig
- func (in *HeadersConfig) DeepCopyInto(out *HeadersConfig)
- func (config *HeadersConfig) Learn(p *HeadersPile)
- func (config *HeadersConfig) Marshal(depth int) string
- func (config *HeadersConfig) Merge(m *HeadersConfig)
- func (config *HeadersConfig) Normalize()
- type HeadersPile
- type HeadersProfile
- type IpPile
- type IpSet
- type KeyValConfig
- func (config *KeyValConfig) Decide(kvp *KeyValProfile) string
- func (in *KeyValConfig) DeepCopy() *KeyValConfig
- func (in *KeyValConfig) DeepCopyInto(out *KeyValConfig)
- func (config *KeyValConfig) Describe() string
- func (config *KeyValConfig) Learn(p *KeyValPile)
- func (config *KeyValConfig) Marshal(depth int) string
- func (config *KeyValConfig) Merge(m *KeyValConfig)
- func (config *KeyValConfig) Normalize()
- func (config *KeyValConfig) SetMandatoryKeys(minimalSet []string)
- func (config *KeyValConfig) WhitelistByExample(k string, v string)
- func (config *KeyValConfig) WhitelistKnownKeys(m map[string]string)
- type KeyValPile
- type KeyValProfile
- type Pile
- type PodConfig
- func (config *PodConfig) Decide(pp *PodProfile) string
- func (in *PodConfig) DeepCopy() *PodConfig
- func (in *PodConfig) DeepCopyInto(out *PodConfig)
- func (config *PodConfig) Learn(p *PodPile)
- func (config *PodConfig) Marshal(depth int) string
- func (config *PodConfig) Merge(m *PodConfig)
- func (config *PodConfig) Reconcile()
- type PodPile
- type PodProfile
- type QueryConfig
- func (config *QueryConfig) AddTypicalVal()
- func (config *QueryConfig) Decide(q *QueryProfile) string
- func (in *QueryConfig) DeepCopy() *QueryConfig
- func (in *QueryConfig) DeepCopyInto(out *QueryConfig)
- func (config *QueryConfig) Learn(p *QueryPile)
- func (config *QueryConfig) Marshal(depth int) string
- func (config *QueryConfig) Merge(m *QueryConfig)
- func (config *QueryConfig) Normalize()
- type QueryPile
- type QueryProfile
- type ReqConfig
- func (config *ReqConfig) AddTypicalVal()
- func (config *ReqConfig) Decide(rp *ReqProfile) string
- func (in *ReqConfig) DeepCopy() *ReqConfig
- func (in *ReqConfig) DeepCopyInto(out *ReqConfig)
- func (config *ReqConfig) Learn(p *ReqPile)
- func (config *ReqConfig) Marshal(depth int) string
- func (config *ReqConfig) Merge(mc *ReqConfig)
- func (config *ReqConfig) Normalize()
- func (config *ReqConfig) Reconcile()
- type ReqPile
- type ReqProfile
- type RespConfig
- func (config *RespConfig) AddTypicalVal()
- func (config *RespConfig) Decide(rp *RespProfile) string
- func (in *RespConfig) DeepCopy() *RespConfig
- func (in *RespConfig) DeepCopyInto(out *RespConfig)
- func (config *RespConfig) Learn(p *RespPile)
- func (config *RespConfig) Marshal(depth int) string
- func (config *RespConfig) Merge(mc *RespConfig)
- func (config *RespConfig) Normalize()
- func (config *RespConfig) Reconcile()
- type RespPile
- type RespProfile
- type SessionProfile
- type Set
- type SimpleValConfig
- func (config *SimpleValConfig) AddValExample(str string)
- func (config *SimpleValConfig) Decide(svp *SimpleValProfile) string
- func (in *SimpleValConfig) DeepCopy() *SimpleValConfig
- func (in *SimpleValConfig) DeepCopyInto(out *SimpleValConfig)
- func (config *SimpleValConfig) Describe() string
- func (config *SimpleValConfig) Learn(p *SimpleValPile)
- func (config *SimpleValConfig) Marshal(depth int) string
- func (config *SimpleValConfig) Merge(m *SimpleValConfig)
- func (config *SimpleValConfig) NameFlags() string
- func (config *SimpleValConfig) Normalize()
- type SimpleValPile
- type SimpleValProfile
- func (in *SimpleValProfile) DeepCopy() *SimpleValProfile
- func (in *SimpleValProfile) DeepCopyInto(out *SimpleValProfile)
- func (svp *SimpleValProfile) Describe() string
- func (svp *SimpleValProfile) Marshal(depth int) string
- func (svp *SimpleValProfile) NameFlags() string
- func (svp *SimpleValProfile) Profile(str string)
- type StructuredConfig
- func (config *StructuredConfig) Decide(jp *StructuredProfile) string
- func (in *StructuredConfig) DeepCopy() *StructuredConfig
- func (in *StructuredConfig) DeepCopyInto(out *StructuredConfig)
- func (config *StructuredConfig) Learn(p *StructuredPile)
- func (config *StructuredConfig) Merge(m *StructuredConfig)
- type StructuredPile
- type StructuredProfile
- type U8Minmax
- type U8MinmaxSlice
- func (mms U8MinmaxSlice) AddValExample(v uint8) U8MinmaxSlice
- func (mms U8MinmaxSlice) Decide(v uint8) string
- func (in U8MinmaxSlice) DeepCopy() U8MinmaxSlice
- func (in U8MinmaxSlice) DeepCopyInto(out *U8MinmaxSlice)
- func (mms U8MinmaxSlice) Describe() string
- func (mms *U8MinmaxSlice) Learn(list []uint8)
- func (mms U8MinmaxSlice) Marshal() string
- func (mms *U8MinmaxSlice) Merge(m U8MinmaxSlice)
- type Uint32Slice
- func (base Uint32Slice) Add(val Uint32Slice) Uint32Slice
- func (base Uint32Slice) Decide(val Uint32Slice) string
- func (in Uint32Slice) DeepCopy() Uint32Slice
- func (in Uint32Slice) DeepCopyInto(out *Uint32Slice)
- func (uint64Slice Uint32Slice) Describe() string
- func (uint64Slice Uint32Slice) Marshal() string
- type UrlConfig
- func (config *UrlConfig) AddTypicalVal()
- func (config *UrlConfig) Decide(u *UrlProfile) string
- func (in *UrlConfig) DeepCopy() *UrlConfig
- func (in *UrlConfig) DeepCopyInto(out *UrlConfig)
- func (config *UrlConfig) Learn(p *UrlPile)
- func (config *UrlConfig) Marshal(depth int) string
- func (config *UrlConfig) Merge(m *UrlConfig)
- func (config *UrlConfig) Normalize()
- type UrlPile
- type UrlProfile
- type WsGate
Constants ¶
const ( ExclamationSlot = iota // 33 (0) DoubleQouteSlot // 34 (1) NumberSlot // 35 DollarSlot // 36 PrecentSlot // 37 AmpersandSlot // 38 SingleQouteSlot // 39 RoundBrecketSlot // 40, 41 AsteriskSlot // 42 PlusSlot // 43 (9) CommaSlot // 44 (10) MinusSlot // 45 PeriodSlot // 46 SlashSlot // 47 ColonSlot // 58 (14) SemiSlot // 59 LtGtSlot // 60, 62 EqualSlot // 61 QuestionSlot // 63 AtSlot // 64 (19) BackslashSlot // 92 (20) SquareBrecketSlot // 91, 93 (21) PowerSlot // 94 UnderscoreSlot // 95 AccentSlot // 96 PipeSlot // 124 (25) CurlyBrecketSlot // 123, 125 (26) HomeSlot // 126 (27) Unused_1_Slot // (28) Unused_2_Slot // (29) CommentsSlot // (30) HexSlot // (31) // --------------------------- up to here are flags LetterSlot // (32) DigitSlot // (33) NonReadableSlot // (34) SpaceSlot // (35) )
Variables ¶
var ( // SchemeBuilder initializes a scheme builder SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme is a global function that registers this API group & version to a scheme AddToScheme = SchemeBuilder.AddToScheme )
var FlagName = map[int]string{ SpaceSlot: "Space", ExclamationSlot: "Exclamation", DoubleQouteSlot: "DoubleQoute", NumberSlot: "NumberSign", DollarSlot: "DollarSign", PrecentSlot: "PrecentSign", SingleQouteSlot: "SingleQoute", RoundBrecketSlot: "RoundBrecket", AsteriskSlot: "MultiplySign", PlusSlot: "PlusSign", AtSlot: "CommentSign", MinusSlot: "MinusSign", PeriodSlot: "DotSign", SlashSlot: "DivideSign", ColonSlot: "ColonSign", SemiSlot: "SemicolonSign", LtGtSlot: "Less/GreaterThanSign", EqualSlot: "EqualSign", QuestionSlot: "QuestionMark", CommaSlot: "CommaSign", SquareBrecketSlot: "SquareBrecket", BackslashSlot: "ReverseDivideSign", PowerSlot: "PowerSign", UnderscoreSlot: "UnderscoreSign", AccentSlot: "AccentSign", CurlyBrecketSlot: "CurlyBrecket", PipeSlot: "PipeSign", NonReadableSlot: "NonReadableChar", CommentsSlot: "CommentsCombination", HexSlot: "HexCombination", }
var SchemeGroupVersion = schema.GroupVersion{Group: wsecurity.GroupName, Version: "v1"}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func AddToListFromSet ¶ added in v0.0.16
func AddToSetFromList ¶ added in v0.0.16
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type BodyConfig ¶ added in v0.0.23
type BodyConfig struct { Unstructured *SimpleValConfig `json:"unstructured"` Structured *StructuredConfig `json:"structured"` }
func (*BodyConfig) Decide ¶ added in v0.0.23
func (config *BodyConfig) Decide(bp *BodyProfile) string
func (*BodyConfig) DeepCopy ¶ added in v0.0.23
func (in *BodyConfig) DeepCopy() *BodyConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BodyConfig.
func (*BodyConfig) DeepCopyInto ¶ added in v0.0.23
func (in *BodyConfig) DeepCopyInto(out *BodyConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BodyConfig) Learn ¶ added in v0.0.26
func (config *BodyConfig) Learn(p *BodyPile)
func (*BodyConfig) Marshal ¶ added in v0.0.26
func (config *BodyConfig) Marshal(depth int) string
func (*BodyConfig) Merge ¶ added in v0.0.26
func (config *BodyConfig) Merge(m *BodyConfig)
func (*BodyConfig) Reconcile ¶ added in v0.0.26
func (config *BodyConfig) Reconcile()
type BodyPile ¶ added in v0.0.26
type BodyPile struct { Unstructured *SimpleValPile `json:"unstructured"` Structured *StructuredPile `json:"structured"` }
func (*BodyPile) Add ¶ added in v0.0.26
func (p *BodyPile) Add(h *BodyProfile)
func (*BodyPile) DeepCopy ¶ added in v0.0.26
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BodyPile.
func (*BodyPile) DeepCopyInto ¶ added in v0.0.26
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BodyProfile ¶ added in v0.0.23
type BodyProfile struct { Unstructured *SimpleValProfile `json:"unstructured"` Structured *StructuredProfile `json:"structured"` }
func (*BodyProfile) DeepCopy ¶ added in v0.0.23
func (in *BodyProfile) DeepCopy() *BodyProfile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BodyProfile.
func (*BodyProfile) DeepCopyInto ¶ added in v0.0.23
func (in *BodyProfile) DeepCopyInto(out *BodyProfile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CidrSet ¶ added in v0.0.14
func GetCidrsFromIpList ¶ added in v0.0.16
func GetCidrsFromList ¶ added in v0.0.14
func (CidrSet) DeepCopy ¶ added in v0.0.14
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CidrSet.
func (CidrSet) DeepCopyInto ¶ added in v0.0.14
type Criteria ¶ added in v0.0.26
type Criteria struct { Active bool `json:"active"` // If not active, criteria ignored Req ReqConfig `json:"req"` // Request criteria for blocking/allowing Resp RespConfig `json:"resp"` // Response criteria for blocking/allowing ReqBody BodyConfig `json:"reqbody"` // Request body criteria for blocking/allowing RespBody BodyConfig `json:"respbody"` // Response body criteria for blocking/allowing Envelop EnvelopConfig `json:"envelop"` // Envelop criteria for blocking/allowing Pod PodConfig `json:"pod"` // Pod criteria for blocking/allowing }
func (*Criteria) DeepCopy ¶ added in v0.0.26
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Criteria.
func (*Criteria) DeepCopyInto ¶ added in v0.0.26
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Ctrl ¶ added in v0.0.8
type Ctrl struct { Alert bool `json:"alert"` // If true, use criteria to identify alerts Block bool `json:"block"` // If true, block on alert. Learn bool `json:"learn"` // If true, and no alert idetified, report piles Force bool `json:"force"` // If true, learning is done even when alert idetified, report piles Auto bool `json:"auto"` // If true, use learned criteria rather than configured criteria Consult bool `json:"consult"` // False means never consult guard, all decissions are local RequestsPerMinuete uint16 `json:"rpm"` // Maximum rpm allows for consulting guard }
Decission process If request profile allowed by ReqConfig: - Main Criteria
<Allow> + Log and gather statistics
If Consult.Active and did not cross Consult.RequestsPerMinuete
If request profile allowed by Guard: - Secondary Criteria <Allow> + Log and gather statistics
Log and gather statistics about request not allowed If ForceAllow
<Allow> // used for example when ReqConfig is not ready
<Block>
func (*Ctrl) DeepCopy ¶ added in v0.0.8
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Ctrl.
func (*Ctrl) DeepCopyInto ¶ added in v0.0.8
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EnvelopConfig ¶ added in v0.0.26
type EnvelopConfig struct { ResponseTime U8MinmaxSlice `json:"responsetime"` CompletionTime U8MinmaxSlice `json:"completiontime"` }
func (*EnvelopConfig) AddTypicalVal ¶ added in v0.0.26
func (config *EnvelopConfig) AddTypicalVal()
Allow typical values - use for development but not in production
func (*EnvelopConfig) Decide ¶ added in v0.0.26
func (config *EnvelopConfig) Decide(pp *EnvelopProfile) string
func (*EnvelopConfig) DeepCopy ¶ added in v0.0.26
func (in *EnvelopConfig) DeepCopy() *EnvelopConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvelopConfig.
func (*EnvelopConfig) DeepCopyInto ¶ added in v0.0.26
func (in *EnvelopConfig) DeepCopyInto(out *EnvelopConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EnvelopConfig) Learn ¶ added in v0.0.26
func (config *EnvelopConfig) Learn(p *EnvelopPile)
func (*EnvelopConfig) Marshal ¶ added in v0.0.26
func (config *EnvelopConfig) Marshal(depth int) string
func (*EnvelopConfig) Merge ¶ added in v0.0.26
func (config *EnvelopConfig) Merge(m *EnvelopConfig)
func (*EnvelopConfig) Normalize ¶ added in v0.0.26
func (config *EnvelopConfig) Normalize()
func (*EnvelopConfig) Reconcile ¶ added in v0.0.26
func (config *EnvelopConfig) Reconcile()
type EnvelopPile ¶ added in v0.0.26
type EnvelopPile struct { ResponseTime []uint8 `json:"responsetime"` CompletionTime []uint8 `json:"completiontime"` }
func (*EnvelopPile) Add ¶ added in v0.0.26
func (p *EnvelopPile) Add(ep *EnvelopProfile)
func (*EnvelopPile) Append ¶ added in v0.0.26
func (p *EnvelopPile) Append(a *EnvelopPile)
func (*EnvelopPile) Clear ¶ added in v0.0.26
func (p *EnvelopPile) Clear()
func (*EnvelopPile) DeepCopy ¶ added in v0.0.26
func (in *EnvelopPile) DeepCopy() *EnvelopPile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvelopPile.
func (*EnvelopPile) DeepCopyInto ¶ added in v0.0.26
func (in *EnvelopPile) DeepCopyInto(out *EnvelopPile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EnvelopPile) Marshal ¶ added in v0.0.26
func (pp *EnvelopPile) Marshal(depth int) string
type EnvelopProfile ¶ added in v0.0.26
type EnvelopProfile struct { ResponseTime uint8 `json:"responsetime"` CompletionTime uint8 `json:"completiontime"` }
func (*EnvelopProfile) DeepCopy ¶ added in v0.0.26
func (in *EnvelopProfile) DeepCopy() *EnvelopProfile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvelopProfile.
func (*EnvelopProfile) DeepCopyInto ¶ added in v0.0.26
func (in *EnvelopProfile) DeepCopyInto(out *EnvelopProfile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EnvelopProfile) Marshal ¶ added in v0.0.26
func (pp *EnvelopProfile) Marshal(depth int) string
type Guardian ¶
type Guardian struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec *GuardianSpec `json:"spec"` }
Guardian is a specification for a Guaerdian resource
func (*Guardian) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Guardian.
func (*Guardian) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Guardian) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type GuardianList ¶
type GuardianList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Guardian `json:"items"` }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object GuardianList is a list of Guaerdian resources
func (*GuardianList) DeepCopy ¶
func (in *GuardianList) DeepCopy() *GuardianList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GuardianList.
func (*GuardianList) DeepCopyInto ¶
func (in *GuardianList) DeepCopyInto(out *GuardianList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GuardianList) DeepCopyObject ¶
func (in *GuardianList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type GuardianSpec ¶
type GuardianSpec WsGate
func (*GuardianSpec) DeepCopy ¶
func (in *GuardianSpec) DeepCopy() *GuardianSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GuardianSpec.
func (*GuardianSpec) DeepCopyInto ¶
func (in *GuardianSpec) DeepCopyInto(out *GuardianSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HeadersConfig ¶
type HeadersConfig struct {
Kv KeyValConfig `json:"kv"`
}
func (*HeadersConfig) AddTypicalVal ¶
func (config *HeadersConfig) AddTypicalVal()
Allow typical values - use for development but not in production
func (*HeadersConfig) Decide ¶
func (config *HeadersConfig) Decide(h *HeadersProfile) string
func (*HeadersConfig) DeepCopy ¶
func (in *HeadersConfig) DeepCopy() *HeadersConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeadersConfig.
func (*HeadersConfig) DeepCopyInto ¶
func (in *HeadersConfig) DeepCopyInto(out *HeadersConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HeadersConfig) Learn ¶ added in v0.0.16
func (config *HeadersConfig) Learn(p *HeadersPile)
func (*HeadersConfig) Marshal ¶
func (config *HeadersConfig) Marshal(depth int) string
func (*HeadersConfig) Merge ¶ added in v0.0.17
func (config *HeadersConfig) Merge(m *HeadersConfig)
func (*HeadersConfig) Normalize ¶ added in v0.0.8
func (config *HeadersConfig) Normalize()
type HeadersPile ¶ added in v0.0.7
type HeadersPile struct {
Kv *KeyValPile `json:"kv"`
}
func (*HeadersPile) Add ¶ added in v0.0.7
func (p *HeadersPile) Add(h *HeadersProfile)
func (*HeadersPile) Append ¶ added in v0.0.16
func (p *HeadersPile) Append(a *HeadersPile)
func (*HeadersPile) Clear ¶ added in v0.0.12
func (p *HeadersPile) Clear()
func (*HeadersPile) DeepCopy ¶ added in v0.0.7
func (in *HeadersPile) DeepCopy() *HeadersPile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeadersPile.
func (*HeadersPile) DeepCopyInto ¶ added in v0.0.7
func (in *HeadersPile) DeepCopyInto(out *HeadersPile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HeadersPile) Marshal ¶ added in v0.0.16
func (h *HeadersPile) Marshal(depth int) string
type HeadersProfile ¶
type HeadersProfile struct {
Kv *KeyValProfile `json:"kv"`
}
func (*HeadersProfile) DeepCopy ¶
func (in *HeadersProfile) DeepCopy() *HeadersProfile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeadersProfile.
func (*HeadersProfile) DeepCopyInto ¶
func (in *HeadersProfile) DeepCopyInto(out *HeadersProfile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HeadersProfile) Marshal ¶ added in v0.0.8
func (h *HeadersProfile) Marshal(depth int) string
func (*HeadersProfile) Profile ¶
func (h *HeadersProfile) Profile(m map[string][]string)
type IpPile ¶ added in v0.0.12
type IpPile struct { List []string // contains filtered or unexported fields }
func (*IpPile) DeepCopy ¶ added in v0.0.12
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IpPile.
func (*IpPile) DeepCopyInto ¶ added in v0.0.12
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IpSet ¶ added in v0.0.11
type IpSet struct {
// contains filtered or unexported fields
}
func IpSetFromIp ¶ added in v0.0.11
func IpSetFromProc ¶ added in v0.0.11
func (*IpSet) DeepCopy ¶ added in v0.0.11
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IpSet.
func (*IpSet) DeepCopyInto ¶ added in v0.0.11
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KeyValConfig ¶
type KeyValConfig struct { Vals map[string]*SimpleValConfig `json:"vals"` // Profile the value of whitelisted keys //MinimalSet map[string]void `json:"minimalSet,omitempty"` // Mandatory keys //MinimalSet map[string]struct{} `json:"minimalSet,omitempty"` // Mandatory keys OtherVals *SimpleValConfig `json:"otherVals"` // Profile the values of other keys OtherKeynames *SimpleValConfig `json:"otherKeynames"` // Profile the keynames of other keys }
func (*KeyValConfig) Decide ¶
func (config *KeyValConfig) Decide(kvp *KeyValProfile) string
func (*KeyValConfig) DeepCopy ¶
func (in *KeyValConfig) DeepCopy() *KeyValConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyValConfig.
func (*KeyValConfig) DeepCopyInto ¶
func (in *KeyValConfig) DeepCopyInto(out *KeyValConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KeyValConfig) Describe ¶
func (config *KeyValConfig) Describe() string
func (*KeyValConfig) Learn ¶ added in v0.0.16
func (config *KeyValConfig) Learn(p *KeyValPile)
func (*KeyValConfig) Marshal ¶
func (config *KeyValConfig) Marshal(depth int) string
func (*KeyValConfig) Merge ¶ added in v0.0.17
func (config *KeyValConfig) Merge(m *KeyValConfig)
func (*KeyValConfig) Normalize ¶ added in v0.0.8
func (config *KeyValConfig) Normalize()
func (*KeyValConfig) SetMandatoryKeys ¶
func (config *KeyValConfig) SetMandatoryKeys(minimalSet []string)
Define which of the known keynames is mandatory (if any) Must call WhitelistKnownKeys before setting keys as Mandatory
func (*KeyValConfig) WhitelistByExample ¶
func (config *KeyValConfig) WhitelistByExample(k string, v string)
Allow keynames and their values based on examples Can be called multiple times to add examples for keynames or values Use this when the keynames are not known in advance Call multiple times to show the entire range of keynames and values When keys are known in advance, use WhitelistKnownKeys() instead
func (*KeyValConfig) WhitelistKnownKeys ¶
func (config *KeyValConfig) WhitelistKnownKeys(m map[string]string)
Allow a list of specific keys and an example of their values Can be called multiple times to add keys or to add examples for values Use this when the keynames are known in advance Call multiple times to show the entire range of values per key For keys not known in advance, use WhitelistByExample() instead
type KeyValPile ¶ added in v0.0.7
type KeyValPile struct {
Vals map[string]*SimpleValPile
}
func (*KeyValPile) Add ¶ added in v0.0.7
func (p *KeyValPile) Add(kv *KeyValProfile)
func (*KeyValPile) Append ¶ added in v0.0.16
func (p *KeyValPile) Append(a *KeyValPile)
func (*KeyValPile) Clear ¶ added in v0.0.12
func (p *KeyValPile) Clear()
func (*KeyValPile) DeepCopy ¶ added in v0.0.7
func (in *KeyValPile) DeepCopy() *KeyValPile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyValPile.
func (*KeyValPile) DeepCopyInto ¶ added in v0.0.7
func (in *KeyValPile) DeepCopyInto(out *KeyValPile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KeyValPile) Marshal ¶ added in v0.0.16
func (kvp *KeyValPile) Marshal(depth int) string
type KeyValProfile ¶
type KeyValProfile struct {
Vals map[string]*SimpleValProfile
}
func (*KeyValProfile) DeepCopy ¶
func (in *KeyValProfile) DeepCopy() *KeyValProfile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyValProfile.
func (*KeyValProfile) DeepCopyInto ¶
func (in *KeyValProfile) DeepCopyInto(out *KeyValProfile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KeyValProfile) Marshal ¶ added in v0.0.8
func (kvp *KeyValProfile) Marshal(depth int) string
type Pile ¶ added in v0.0.12
type Pile struct { Req ReqPile Resp RespPile ReqBody BodyPile RespBody BodyPile Envelop EnvelopPile Pod PodPile }
func (*Pile) DeepCopy ¶ added in v0.0.12
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Pile.
func (*Pile) DeepCopyInto ¶ added in v0.0.12
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Pile) Pile ¶ added in v0.0.16
func (p *Pile) Pile(sp *SessionProfile, pp *PodProfile)
type PodConfig ¶ added in v0.0.26
type PodConfig struct { Tcp4Peers []string `json:"tcp4peers"` // from /proc/net/tcp Udp4Peers []string `json:"udp4peers"` // from /proc/net/udp Udplite4Peers []string `json:"udplite4peers"` // from /proc/udpline Tcp6Peers []string `json:"tcp6peers"` // from /proc/net/tcp6 Udp6Peers []string `json:"udp6peers"` // from /proc/net/udp6 Udplite6Peers []string `json:"udplite6peers"` // from /proc/net/udpline6 // contains filtered or unexported fields }
func (*PodConfig) Decide ¶ added in v0.0.26
func (config *PodConfig) Decide(pp *PodProfile) string
func (*PodConfig) DeepCopy ¶ added in v0.0.26
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodConfig.
func (*PodConfig) DeepCopyInto ¶ added in v0.0.26
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodPile ¶ added in v0.0.26
type PodPile struct { Tcp4Peers IpPile `json:"tcp4peers"` // from /proc/net/tcp Udp4Peers IpPile `json:"udp4peers"` // from /proc/net/udp Udplite4Peers IpPile `json:"udplite4peers"` // from /proc/udpline Tcp6Peers IpPile `json:"tcp6peers"` // from /proc/net/tcp6 Udp6Peers IpPile `json:"udp6peers"` // from /proc/net/udp6 Udplite6Peers IpPile `json:"udplite6peers"` // from /proc/net/udpline6 }
func (*PodPile) Add ¶ added in v0.0.26
func (p *PodPile) Add(pp *PodProfile)
func (*PodPile) DeepCopy ¶ added in v0.0.26
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodPile.
func (*PodPile) DeepCopyInto ¶ added in v0.0.26
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodProfile ¶ added in v0.0.26
type PodProfile struct { // from local /proc/net (same net namespace) Tcp4Peers *IpSet `json:"tcp4peers"` // from /proc/net/tcp Udp4Peers *IpSet `json:"udp4peers"` // from /proc/net/udp Udplite4Peers *IpSet `json:"udplite4peers"` // from /proc/udpline Tcp6Peers *IpSet `json:"tcp6peers"` // from /proc/net/tcp6 Udp6Peers *IpSet `json:"udp6peers"` // from /proc/net/udp6 Udplite6Peers *IpSet `json:"udplite6peers"` // from /proc/net/udpline6 // The below requires sharing Process Namespace... ProcessCount uint32 `json:"processcount"` // from /proc/[1-9] - require ssh to container Processes []string `json:"processes"` // from /proc/*/cmdline - require ssh to container FdCount uint32 `json:"fdcount"` // from /proc/<PID>/fd - require ssh to container IoRchar KeyValProfile `json:"iorchar"` // from /proc/<PID>/io - cycled on 32 bits - require ssh to container IoWchar KeyValProfile `json:"iowchar"` // from /proc/<PID>/io - cycled on 32 bits - require ssh to container }
func (*PodProfile) DeepCopy ¶ added in v0.0.26
func (in *PodProfile) DeepCopy() *PodProfile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodProfile.
func (*PodProfile) DeepCopyInto ¶ added in v0.0.26
func (in *PodProfile) DeepCopyInto(out *PodProfile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodProfile) Marshal ¶ added in v0.0.26
func (pp *PodProfile) Marshal(depth int) string
func (*PodProfile) Profile ¶ added in v0.0.26
func (pp *PodProfile) Profile()
Profile timestamps and /proc
type QueryConfig ¶
type QueryConfig struct {
Kv KeyValConfig `json:"kv"`
}
func (*QueryConfig) AddTypicalVal ¶
func (config *QueryConfig) AddTypicalVal()
Allow typical query string values - use for development but not in production
func (*QueryConfig) Decide ¶
func (config *QueryConfig) Decide(q *QueryProfile) string
func (*QueryConfig) DeepCopy ¶
func (in *QueryConfig) DeepCopy() *QueryConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueryConfig.
func (*QueryConfig) DeepCopyInto ¶
func (in *QueryConfig) DeepCopyInto(out *QueryConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*QueryConfig) Learn ¶ added in v0.0.16
func (config *QueryConfig) Learn(p *QueryPile)
func (*QueryConfig) Marshal ¶
func (config *QueryConfig) Marshal(depth int) string
func (*QueryConfig) Merge ¶ added in v0.0.17
func (config *QueryConfig) Merge(m *QueryConfig)
func (*QueryConfig) Normalize ¶ added in v0.0.8
func (config *QueryConfig) Normalize()
type QueryPile ¶ added in v0.0.7
type QueryPile struct {
Kv *KeyValPile `json:"kv"`
}
func (*QueryPile) Add ¶ added in v0.0.7
func (p *QueryPile) Add(q *QueryProfile)
func (*QueryPile) DeepCopy ¶ added in v0.0.7
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueryPile.
func (*QueryPile) DeepCopyInto ¶ added in v0.0.7
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type QueryProfile ¶
type QueryProfile struct {
Kv *KeyValProfile `json:"kv"`
}
func (*QueryProfile) DeepCopy ¶
func (in *QueryProfile) DeepCopy() *QueryProfile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueryProfile.
func (*QueryProfile) DeepCopyInto ¶
func (in *QueryProfile) DeepCopyInto(out *QueryProfile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*QueryProfile) Marshal ¶ added in v0.0.8
func (q *QueryProfile) Marshal(depth int) string
func (*QueryProfile) Profile ¶
func (q *QueryProfile) Profile(m map[string][]string)
type ReqConfig ¶
type ReqConfig struct { ClientIp []string `json:"cip"` // subnets for external IPs (normally empty) HopIp []string `json:"hopip"` // subnets for external IPs Method []string `json:"method"` // GET Proto []string `json:"proto"` // "HTTP/1.1" MediaType []string `json:"mediatype"` // "text/html" ContentLength U8MinmaxSlice `json:"contentlength"` // 0 Url UrlConfig `json:"url"` Qs QueryConfig `json:"qs"` Headers HeadersConfig `json:"headers"` // contains filtered or unexported fields }
func (*ReqConfig) AddTypicalVal ¶
func (config *ReqConfig) AddTypicalVal()
Allow typical values - use for development but not in production
func (*ReqConfig) Decide ¶
func (config *ReqConfig) Decide(rp *ReqProfile) string
func (*ReqConfig) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReqConfig.
func (*ReqConfig) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReqPile ¶ added in v0.0.7
type ReqPile struct { ClientIp IpPile `json:"cip"` // 192.168.32.1 HopIp IpPile `json:"hopip"` // 1.2.3.4 Method Set `json:"method"` // GET Proto Set `json:"proto"` // "HTTP/1.1" MediaType Set `json:"mediatype"` // "text/html" ContentLength []uint8 `json:"contentlength"` // 0 Url UrlPile `json:"url"` Qs QueryPile `json:"qs"` Headers HeadersPile `json:"headers"` }
func (*ReqPile) Add ¶ added in v0.0.7
func (p *ReqPile) Add(rp *ReqProfile)
func (*ReqPile) DeepCopy ¶ added in v0.0.7
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReqPile.
func (*ReqPile) DeepCopyInto ¶ added in v0.0.7
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReqProfile ¶
type ReqProfile struct { ClientIp *IpSet `json:"cip"` // 192.168.32.1 HopIp *IpSet `json:"hopip"` // 1.2.3.4 Method string `json:"method"` // GET Proto string `json:"proto"` // "HTTP/1.1" MediaType string `json:"mediatype"` // "text/html" ContentLength uint8 `json:"contentlength"` // 0 Url *UrlProfile `json:"url"` Qs *QueryProfile `json:"qs"` Headers *HeadersProfile `json:"headers"` }
func (*ReqProfile) DeepCopy ¶
func (in *ReqProfile) DeepCopy() *ReqProfile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReqProfile.
func (*ReqProfile) DeepCopyInto ¶
func (in *ReqProfile) DeepCopyInto(out *ReqProfile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ReqProfile) Marshal ¶ added in v0.0.8
func (rp *ReqProfile) Marshal(depth int) string
type RespConfig ¶ added in v0.0.8
type RespConfig struct {
Headers HeadersConfig `json:"headers"`
}
func (*RespConfig) AddTypicalVal ¶ added in v0.0.8
func (config *RespConfig) AddTypicalVal()
Allow typical values - use for development but not in production
func (*RespConfig) Decide ¶ added in v0.0.8
func (config *RespConfig) Decide(rp *RespProfile) string
func (*RespConfig) DeepCopy ¶ added in v0.0.8
func (in *RespConfig) DeepCopy() *RespConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RespConfig.
func (*RespConfig) DeepCopyInto ¶ added in v0.0.8
func (in *RespConfig) DeepCopyInto(out *RespConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RespConfig) Learn ¶ added in v0.0.16
func (config *RespConfig) Learn(p *RespPile)
func (*RespConfig) Marshal ¶ added in v0.0.8
func (config *RespConfig) Marshal(depth int) string
func (*RespConfig) Merge ¶ added in v0.0.17
func (config *RespConfig) Merge(mc *RespConfig)
func (*RespConfig) Normalize ¶ added in v0.0.8
func (config *RespConfig) Normalize()
func (*RespConfig) Reconcile ¶ added in v0.0.14
func (config *RespConfig) Reconcile()
type RespPile ¶ added in v0.0.8
type RespPile struct {
Headers HeadersPile `json:"headers"`
}
func (*RespPile) Add ¶ added in v0.0.8
func (p *RespPile) Add(rp *RespProfile)
func (*RespPile) DeepCopy ¶ added in v0.0.8
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RespPile.
func (*RespPile) DeepCopyInto ¶ added in v0.0.8
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RespProfile ¶ added in v0.0.8
type RespProfile struct {
Headers *HeadersProfile `json:"headers"`
}
func (*RespProfile) DeepCopy ¶ added in v0.0.9
func (in *RespProfile) DeepCopy() *RespProfile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RespProfile.
func (*RespProfile) DeepCopyInto ¶ added in v0.0.9
func (in *RespProfile) DeepCopyInto(out *RespProfile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RespProfile) Marshal ¶ added in v0.0.8
func (rp *RespProfile) Marshal(depth int) string
func (*RespProfile) Profile ¶ added in v0.0.8
func (rp *RespProfile) Profile(resp *http.Response)
type SessionProfile ¶ added in v0.0.16
type SessionProfile struct { Alert string Cancel context.CancelFunc SecurityMonitorTicker *time.Ticker ReqTime time.Time Req ReqProfile Resp RespProfile ReqBody BodyProfile RespBody BodyProfile Envelop EnvelopProfile }
func (*SessionProfile) DeepCopy ¶ added in v0.0.16
func (in *SessionProfile) DeepCopy() *SessionProfile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SessionProfile.
func (*SessionProfile) DeepCopyInto ¶ added in v0.0.16
func (in *SessionProfile) DeepCopyInto(out *SessionProfile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Set ¶ added in v0.0.9
type Set struct { List []string // contains filtered or unexported fields }
func (*Set) DeepCopy ¶ added in v0.0.9
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Set.
func (*Set) DeepCopyInto ¶ added in v0.0.9
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SimpleValConfig ¶
type SimpleValConfig struct { Flags uint32 `json:"flags"` NonReadables U8MinmaxSlice `json:"nonreadables"` Spaces U8MinmaxSlice `json:"spaces"` Unicodes U8MinmaxSlice `json:"unicodes"` Digits U8MinmaxSlice `json:"digits"` Letters U8MinmaxSlice `json:"letters"` SpecialChars U8MinmaxSlice `json:"schars"` Sequences U8MinmaxSlice `json:"sequences"` UnicodeFlags Uint32Slice `json:"unicodeFlags"` //[]uint32 Mandatory bool `json:"mandatory"` }
func NewSimpleValConfig ¶
func NewSimpleValConfig(spaces, unicodes, nonreadables, letters, digits, specialChars, sequences uint8) *SimpleValConfig
func (*SimpleValConfig) AddValExample ¶
func (config *SimpleValConfig) AddValExample(str string)
Allow generic value based on example (whitelisting) Call multiple times top present multiple examples
func (*SimpleValConfig) Decide ¶
func (config *SimpleValConfig) Decide(svp *SimpleValProfile) string
func (*SimpleValConfig) DeepCopy ¶
func (in *SimpleValConfig) DeepCopy() *SimpleValConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SimpleValConfig.
func (*SimpleValConfig) DeepCopyInto ¶
func (in *SimpleValConfig) DeepCopyInto(out *SimpleValConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SimpleValConfig) Describe ¶
func (config *SimpleValConfig) Describe() string
func (*SimpleValConfig) Learn ¶ added in v0.0.16
func (config *SimpleValConfig) Learn(p *SimpleValPile)
func (*SimpleValConfig) Marshal ¶
func (config *SimpleValConfig) Marshal(depth int) string
func (*SimpleValConfig) Merge ¶ added in v0.0.17
func (config *SimpleValConfig) Merge(m *SimpleValConfig)
func (*SimpleValConfig) NameFlags ¶
func (config *SimpleValConfig) NameFlags() string
func (*SimpleValConfig) Normalize ¶ added in v0.0.8
func (config *SimpleValConfig) Normalize()
type SimpleValPile ¶ added in v0.0.7
type SimpleValPile struct { Flags uint32 NonReadables []uint8 Spaces []uint8 Unicodes []uint8 Digits []uint8 Letters []uint8 SpecialChars []uint8 //Words []uint8 //Numbers []uint8 Sequences []uint8 UnicodeFlags Uint32Slice //[]uint32 }
func (*SimpleValPile) Add ¶ added in v0.0.7
func (p *SimpleValPile) Add(svp *SimpleValProfile)
func (*SimpleValPile) Append ¶ added in v0.0.16
func (p *SimpleValPile) Append(a *SimpleValPile)
func (*SimpleValPile) DeepCopy ¶ added in v0.0.7
func (in *SimpleValPile) DeepCopy() *SimpleValPile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SimpleValPile.
func (*SimpleValPile) DeepCopyInto ¶ added in v0.0.7
func (in *SimpleValPile) DeepCopyInto(out *SimpleValPile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SimpleValPile) Marshal ¶ added in v0.0.16
func (svp *SimpleValPile) Marshal(depth int) string
type SimpleValProfile ¶
type SimpleValProfile struct { Flags uint32 NonReadables uint8 Spaces uint8 Unicodes uint8 Digits uint8 Letters uint8 SpecialChars uint8 //Words uint8 //Numbers uint8 Sequences uint8 UnicodeFlags Uint32Slice //[]uint32 }
func (*SimpleValProfile) DeepCopy ¶
func (in *SimpleValProfile) DeepCopy() *SimpleValProfile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SimpleValProfile.
func (*SimpleValProfile) DeepCopyInto ¶
func (in *SimpleValProfile) DeepCopyInto(out *SimpleValProfile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SimpleValProfile) Describe ¶
func (svp *SimpleValProfile) Describe() string
func (*SimpleValProfile) Marshal ¶ added in v0.0.8
func (svp *SimpleValProfile) Marshal(depth int) string
func (*SimpleValProfile) NameFlags ¶
func (svp *SimpleValProfile) NameFlags() string
func (*SimpleValProfile) Profile ¶
func (svp *SimpleValProfile) Profile(str string)
Profile generic value where we expect: some short combination of chars mainly english letters and/or digits (ascii) potentially some small content of special chars typically no unicode
type StructuredConfig ¶ added in v0.0.23
type StructuredConfig struct { Kind string `json:"kind"` // boolean, number, string, skip, array, object Val *SimpleValConfig `json:"val"` // used for: array, boolean, number, string items Kv map[string]*StructuredConfig `json:"kv"` // used for: object items }
type ConfigInterface interface { Learn(p *PileInterface) Merge(m *ConfigInterface) Normalize() Decide(kvp *ProfileInterface) string Marshal(depth int) string Describe() string Clear() }
type PileInterface interface { Append(*PileInterface) Marshal(depth int) string Pile(*ProfileInterface) Add(*ProfileInterface) Clear() }
type ProfileInterface interface { Marshal(depth int) string DeepCopyInto(*ProfileInterface) }
func (*StructuredConfig) Decide ¶ added in v0.0.23
func (config *StructuredConfig) Decide(jp *StructuredProfile) string
func (*StructuredConfig) DeepCopy ¶ added in v0.0.23
func (in *StructuredConfig) DeepCopy() *StructuredConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StructuredConfig.
func (*StructuredConfig) DeepCopyInto ¶ added in v0.0.23
func (in *StructuredConfig) DeepCopyInto(out *StructuredConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*StructuredConfig) Learn ¶ added in v0.0.26
func (config *StructuredConfig) Learn(p *StructuredPile)
func (*StructuredConfig) Merge ¶ added in v0.0.26
func (config *StructuredConfig) Merge(m *StructuredConfig)
type StructuredPile ¶ added in v0.0.23
type StructuredPile struct { Kind string `json:"kind"` // bool, float64, string, array, map Val *SimpleValPile `json:"val"` // used for: array, boolean, number, string items Kv map[string]*StructuredPile `json:"kv"` // used for: object items }
func (*StructuredPile) Append ¶ added in v0.0.26
func (p *StructuredPile) Append(a *StructuredPile)
func (*StructuredPile) DeepCopy ¶ added in v0.0.23
func (in *StructuredPile) DeepCopy() *StructuredPile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StructuredPile.
func (*StructuredPile) DeepCopyInto ¶ added in v0.0.23
func (in *StructuredPile) DeepCopyInto(out *StructuredPile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StructuredProfile ¶ added in v0.0.23
type StructuredProfile struct { Kind string `json:"kind"` // bool, float64, string, array, map Vals []SimpleValProfile `json:"vals"` // used for: array, boolean, number, string items Kv map[string]*StructuredProfile `json:"kv"` // used for: object items }
JsonProfile struct - maintain the profile of a json with some structure Data Types: The default Golang data types for decoding and encoding JSON are as follows: bool for JSON booleans. float64 for JSON numbers. string for JSON strings. nil for JSON null. array as JSON array. map or struct as JSON Object.
func (*StructuredProfile) DeepCopy ¶ added in v0.0.23
func (in *StructuredProfile) DeepCopy() *StructuredProfile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StructuredProfile.
func (*StructuredProfile) DeepCopyInto ¶ added in v0.0.23
func (in *StructuredProfile) DeepCopyInto(out *StructuredProfile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*StructuredProfile) Marshal ¶ added in v0.0.23
func (jp *StructuredProfile) Marshal(depth int) string
func (*StructuredProfile) Profile ¶ added in v0.0.23
func (jp *StructuredProfile) Profile(o interface{})
Profile a generic json
func (*StructuredProfile) ProfilePostForm ¶ added in v0.0.23
func (jp *StructuredProfile) ProfilePostForm(m map[string][]string)
Profile a PostForm
type U8Minmax ¶
func (*U8Minmax) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new U8Minmax.
func (*U8Minmax) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type U8MinmaxSlice ¶
type U8MinmaxSlice []U8Minmax
func (U8MinmaxSlice) AddValExample ¶
func (mms U8MinmaxSlice) AddValExample(v uint8) U8MinmaxSlice
func (U8MinmaxSlice) Decide ¶
func (mms U8MinmaxSlice) Decide(v uint8) string
func (U8MinmaxSlice) DeepCopy ¶
func (in U8MinmaxSlice) DeepCopy() U8MinmaxSlice
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new U8MinmaxSlice.
func (U8MinmaxSlice) DeepCopyInto ¶
func (in U8MinmaxSlice) DeepCopyInto(out *U8MinmaxSlice)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (U8MinmaxSlice) Describe ¶
func (mms U8MinmaxSlice) Describe() string
func (*U8MinmaxSlice) Learn ¶ added in v0.0.16
func (mms *U8MinmaxSlice) Learn(list []uint8)
func (U8MinmaxSlice) Marshal ¶
func (mms U8MinmaxSlice) Marshal() string
func (*U8MinmaxSlice) Merge ¶ added in v0.0.17
func (mms *U8MinmaxSlice) Merge(m U8MinmaxSlice)
type Uint32Slice ¶ added in v0.0.7
type Uint32Slice []uint32
func (Uint32Slice) Add ¶ added in v0.0.7
func (base Uint32Slice) Add(val Uint32Slice) Uint32Slice
func (Uint32Slice) Decide ¶ added in v0.0.7
func (base Uint32Slice) Decide(val Uint32Slice) string
func (Uint32Slice) DeepCopy ¶ added in v0.0.7
func (in Uint32Slice) DeepCopy() Uint32Slice
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Uint32Slice.
func (Uint32Slice) DeepCopyInto ¶ added in v0.0.7
func (in Uint32Slice) DeepCopyInto(out *Uint32Slice)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (Uint32Slice) Describe ¶ added in v0.0.7
func (uint64Slice Uint32Slice) Describe() string
func (Uint32Slice) Marshal ¶ added in v0.0.7
func (uint64Slice Uint32Slice) Marshal() string
type UrlConfig ¶
type UrlConfig struct { Val SimpleValConfig `json:"val"` Segments U8MinmaxSlice `json:"segments"` }
func (*UrlConfig) AddTypicalVal ¶
func (config *UrlConfig) AddTypicalVal()
Allow typical URL values - use for development but not in production
func (*UrlConfig) Decide ¶
func (config *UrlConfig) Decide(u *UrlProfile) string
func (*UrlConfig) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UrlConfig.
func (*UrlConfig) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UrlPile ¶ added in v0.0.7
type UrlPile struct { Val *SimpleValPile `json:"val"` Segments []uint8 `json:"segments"` }
func (*UrlPile) Add ¶ added in v0.0.7
func (p *UrlPile) Add(u *UrlProfile)
func (*UrlPile) DeepCopy ¶ added in v0.0.7
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UrlPile.
func (*UrlPile) DeepCopyInto ¶ added in v0.0.7
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UrlProfile ¶
type UrlProfile struct { Scheme string `json:"scheme"` // http Val *SimpleValProfile `json:"val"` Segments uint8 `json:"segments"` }
func (*UrlProfile) DeepCopy ¶
func (in *UrlProfile) DeepCopy() *UrlProfile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UrlProfile.
func (*UrlProfile) DeepCopyInto ¶
func (in *UrlProfile) DeepCopyInto(out *UrlProfile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*UrlProfile) Marshal ¶ added in v0.0.8
func (u *UrlProfile) Marshal(depth int) string
func (*UrlProfile) Profile ¶
func (u *UrlProfile) Profile(path string)
type WsGate ¶
type WsGate struct { Configured *Criteria `json:"configured"` // configrued criteria Learned *Criteria `json:"learned,omitempty"` // Learned citeria Control *Ctrl `json:"control"` // Control }
func (*WsGate) AutoActivate ¶ added in v0.0.26
func (g *WsGate) AutoActivate()
func (*WsGate) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WsGate.
func (*WsGate) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.