v1

package
v0.0.61 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2022 License: Apache-2.0 Imports: 17 Imported by: 7

Documentation

Overview

Package v1 is the v1 version of the API.

Index

Constants

View Source
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

View Source
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
)
View Source
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",
}
View Source
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 AddToListFromSet(set *Set, list *[]string)

func AddToSetFromList added in v0.0.16

func AddToSetFromList(list []string, set *Set)

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func NameFlags

func NameFlags(f uint32) string

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

func SetFlags

func SetFlags(slots []int) (f uint32)

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) Append added in v0.0.26

func (p *BodyPile) Append(a *BodyPile)

func (*BodyPile) Clear added in v0.0.26

func (p *BodyPile) Clear()

func (*BodyPile) DeepCopy added in v0.0.26

func (in *BodyPile) DeepCopy() *BodyPile

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BodyPile.

func (*BodyPile) DeepCopyInto added in v0.0.26

func (in *BodyPile) DeepCopyInto(out *BodyPile)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BodyPile) Marshal added in v0.0.26

func (config *BodyPile) Marshal(depth int) string

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

type CidrSet []net.IPNet

func GetCidrsFromIpList added in v0.0.16

func GetCidrsFromIpList(list []string) CidrSet

func GetCidrsFromList added in v0.0.14

func GetCidrsFromList(list []string) CidrSet

func (CidrSet) Decide added in v0.0.14

func (cidr CidrSet) Decide(ips *IpSet) string

func (CidrSet) DeepCopy added in v0.0.14

func (in CidrSet) DeepCopy() CidrSet

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CidrSet.

func (CidrSet) DeepCopyInto added in v0.0.14

func (in CidrSet) DeepCopyInto(out *CidrSet)

func (*CidrSet) Merge added in v0.0.17

func (cidrs *CidrSet) Merge(m CidrSet)

func (CidrSet) Strings added in v0.0.16

func (cidrs CidrSet) Strings() (s []string)

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

func (in *Criteria) DeepCopy() *Criteria

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Criteria.

func (*Criteria) DeepCopyInto added in v0.0.26

func (in *Criteria) DeepCopyInto(out *Criteria)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Criteria) Learn added in v0.0.26

func (c *Criteria) Learn(p *Pile)

func (*Criteria) Marshal added in v0.0.26

func (c *Criteria) Marshal(depth int) string

func (*Criteria) Merge added in v0.0.26

func (c *Criteria) Merge(mc *Criteria)

func (*Criteria) Normalize added in v0.0.26

func (c *Criteria) Normalize()

func (*Criteria) Reconcile added in v0.0.26

func (c *Criteria) Reconcile()

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

func (in *Ctrl) DeepCopy() *Ctrl

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Ctrl.

func (*Ctrl) DeepCopyInto added in v0.0.8

func (in *Ctrl) DeepCopyInto(out *Ctrl)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Ctrl) Marshal added in v0.0.8

func (c *Ctrl) Marshal(depth int) string

func (*Ctrl) Reconcile added in v0.0.14

func (c *Ctrl) Reconcile()

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

func (*EnvelopProfile) Profile added in v0.0.26

func (pp *EnvelopProfile) Profile(reqTime time.Time, respTime time.Time, endTime time.Time)

Profile timestamps and /proc

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

func (in *Guardian) DeepCopy() *Guardian

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Guardian.

func (*Guardian) DeepCopyInto

func (in *Guardian) DeepCopyInto(out *Guardian)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Guardian) DeepCopyObject

func (in *Guardian) DeepCopyObject() runtime.Object

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) Add added in v0.0.12

func (ipp *IpPile) Add(ips *IpSet)

func (*IpPile) Append added in v0.0.16

func (ipp *IpPile) Append(a *IpPile)

func (*IpPile) Clear added in v0.0.12

func (ipp *IpPile) Clear()

func (*IpPile) DeepCopy added in v0.0.12

func (in *IpPile) DeepCopy() *IpPile

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IpPile.

func (*IpPile) DeepCopyInto added in v0.0.12

func (in *IpPile) DeepCopyInto(out *IpPile)

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 IpSetFromIp(ip net.IP) (ips *IpSet)

func IpSetFromProc added in v0.0.11

func IpSetFromProc(protocol string) (ips *IpSet)

func (*IpSet) DeepCopy added in v0.0.11

func (in *IpSet) DeepCopy() *IpSet

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IpSet.

func (*IpSet) DeepCopyInto added in v0.0.11

func (in *IpSet) DeepCopyInto(out *IpSet)

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

func (*KeyValProfile) Profile

func (kvp *KeyValProfile) Profile(m map[string][]string, exceptions map[string]bool)

Profile a generic map of key vals where we expect: keys belonging to some contstant list of keys vals have some defined charactaristics

type Pile added in v0.0.12

type Pile struct {
	Req      ReqPile
	Resp     RespPile
	ReqBody  BodyPile
	RespBody BodyPile
	Envelop  EnvelopPile
	Pod      PodPile
}

func (*Pile) Append added in v0.0.16

func (p *Pile) Append(a *Pile)

func (*Pile) Clear added in v0.0.12

func (p *Pile) Clear()

func (*Pile) DeepCopy added in v0.0.12

func (in *Pile) DeepCopy() *Pile

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Pile.

func (*Pile) DeepCopyInto added in v0.0.12

func (in *Pile) DeepCopyInto(out *Pile)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Pile) Marshal added in v0.0.16

func (p *Pile) Marshal() string

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

func (in *PodConfig) DeepCopy() *PodConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodConfig.

func (*PodConfig) DeepCopyInto added in v0.0.26

func (in *PodConfig) DeepCopyInto(out *PodConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PodConfig) Learn added in v0.0.26

func (config *PodConfig) Learn(p *PodPile)

func (*PodConfig) Marshal added in v0.0.26

func (config *PodConfig) Marshal(depth int) string

func (*PodConfig) Merge added in v0.0.26

func (config *PodConfig) Merge(m *PodConfig)

func (*PodConfig) Reconcile added in v0.0.26

func (config *PodConfig) Reconcile()

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) Append added in v0.0.26

func (p *PodPile) Append(a *PodPile)

func (*PodPile) Clear added in v0.0.26

func (p *PodPile) Clear()

func (*PodPile) DeepCopy added in v0.0.26

func (in *PodPile) DeepCopy() *PodPile

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodPile.

func (*PodPile) DeepCopyInto added in v0.0.26

func (in *PodPile) DeepCopyInto(out *PodPile)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PodPile) Marshal added in v0.0.26

func (pp *PodPile) Marshal(depth int) string

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) Append added in v0.0.16

func (p *QueryPile) Append(a *QueryPile)

func (*QueryPile) Clear added in v0.0.12

func (p *QueryPile) Clear()

func (*QueryPile) DeepCopy added in v0.0.7

func (in *QueryPile) DeepCopy() *QueryPile

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueryPile.

func (*QueryPile) DeepCopyInto added in v0.0.7

func (in *QueryPile) DeepCopyInto(out *QueryPile)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*QueryPile) Marshal added in v0.0.16

func (q *QueryPile) Marshal(depth int) string

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

func (in *ReqConfig) DeepCopy() *ReqConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReqConfig.

func (*ReqConfig) DeepCopyInto

func (in *ReqConfig) DeepCopyInto(out *ReqConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ReqConfig) Learn added in v0.0.16

func (config *ReqConfig) Learn(p *ReqPile)

func (*ReqConfig) Marshal

func (config *ReqConfig) Marshal(depth int) string

func (*ReqConfig) Merge added in v0.0.17

func (config *ReqConfig) Merge(mc *ReqConfig)

func (*ReqConfig) Normalize added in v0.0.8

func (config *ReqConfig) Normalize()

func (*ReqConfig) Reconcile added in v0.0.14

func (config *ReqConfig) Reconcile()

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) Append added in v0.0.16

func (p *ReqPile) Append(a *ReqPile)

func (*ReqPile) Clear added in v0.0.12

func (p *ReqPile) Clear()

func (*ReqPile) DeepCopy added in v0.0.7

func (in *ReqPile) DeepCopy() *ReqPile

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReqPile.

func (*ReqPile) DeepCopyInto added in v0.0.7

func (in *ReqPile) DeepCopyInto(out *ReqPile)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ReqPile) Marshal added in v0.0.16

func (rp *ReqPile) Marshal(depth int) string

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

func (*ReqProfile) Profile

func (rp *ReqProfile) Profile(req *http.Request, cip net.IP)

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) Append added in v0.0.16

func (p *RespPile) Append(a *RespPile)

func (*RespPile) Clear added in v0.0.12

func (p *RespPile) Clear()

func (*RespPile) DeepCopy added in v0.0.8

func (in *RespPile) DeepCopy() *RespPile

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RespPile.

func (*RespPile) DeepCopyInto added in v0.0.8

func (in *RespPile) DeepCopyInto(out *RespPile)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RespPile) Marshal added in v0.0.16

func (rp *RespPile) Marshal(depth int) string

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) Add added in v0.0.16

func (p *Set) Add(v string)

func (*Set) Append added in v0.0.16

func (p *Set) Append(a *Set)

func (*Set) Clear added in v0.0.16

func (p *Set) Clear()

func (Set) Decide added in v0.0.9

func (p Set) Decide(s string) string

func (*Set) DeepCopy added in v0.0.9

func (in *Set) DeepCopy() *Set

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Set.

func (*Set) DeepCopyInto added in v0.0.9

func (in *Set) DeepCopyInto(out *Set)

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

type U8Minmax struct {
	Min uint8 `json:"min"`
	Max uint8 `json:"max"`
}

func (*U8Minmax) DeepCopy

func (in *U8Minmax) DeepCopy() *U8Minmax

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new U8Minmax.

func (*U8Minmax) DeepCopyInto

func (in *U8Minmax) DeepCopyInto(out *U8Minmax)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*U8Minmax) Merge added in v0.0.17

func (mms *U8Minmax) Merge(m *U8Minmax)

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

func (in *UrlConfig) DeepCopy() *UrlConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UrlConfig.

func (*UrlConfig) DeepCopyInto

func (in *UrlConfig) DeepCopyInto(out *UrlConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*UrlConfig) Learn added in v0.0.16

func (config *UrlConfig) Learn(p *UrlPile)

func (*UrlConfig) Marshal

func (config *UrlConfig) Marshal(depth int) string

func (*UrlConfig) Merge added in v0.0.17

func (config *UrlConfig) Merge(m *UrlConfig)

func (*UrlConfig) Normalize added in v0.0.8

func (config *UrlConfig) Normalize()

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) Append added in v0.0.16

func (p *UrlPile) Append(a *UrlPile)

func (*UrlPile) Clear added in v0.0.12

func (p *UrlPile) Clear()

func (*UrlPile) DeepCopy added in v0.0.7

func (in *UrlPile) DeepCopy() *UrlPile

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UrlPile.

func (*UrlPile) DeepCopyInto added in v0.0.7

func (in *UrlPile) DeepCopyInto(out *UrlPile)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*UrlPile) Marshal added in v0.0.16

func (u *UrlPile) Marshal(depth int) string

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

func (in *WsGate) DeepCopy() *WsGate

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WsGate.

func (*WsGate) DeepCopyInto

func (in *WsGate) DeepCopyInto(out *WsGate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*WsGate) Marshal

func (g *WsGate) Marshal(depth int) string

func (*WsGate) Reconcile added in v0.0.14

func (g *WsGate) Reconcile()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL