v1

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2022 License: Apache-2.0 Imports: 8 Imported by: 7

Documentation

Overview

Package v1 is the v1 version of the API.

Index

Constants

View Source
const (
	SpaceSlot           = iota // 32
	ExclamationSlot            // 33
	DoubleQouteSlot            // 34
	NumberSlot                 // 35
	DollarSlot                 // 36
	PrecentSlot                // 37
	AmpersandSlot              // 38
	SingleQouteSlot            // 39
	RoundBrecketSlot           // 40, 41
	AsteriskSlot               // 42
	PlusSlot                   // 43 (10)
	CommaSlot                  // 44
	MinusSlot                  // 45
	PeriodSlot                 // 46
	SlashSlot                  // 47
	ColonSlot                  // 58 (15)
	SemiSlot                   // 59
	LtGtSlot                   // 60, 62
	EqualSlot                  //61
	QuestionSlot               // 63
	AtSlot                     // 64 (20)
	BackslashSlot              // 92 (21)
	SquareBrecketSlot          // 91, 93
	PowerSlot                  // 94
	UnderscoreSlot             // 95
	AccentSlot                 // 96
	PipeSlot                   // 124 (26)
	CurlyBrecketSlot           // 123, 125
	HomeSlot                   // 126
	NonReadableCharSlot        // 0-31, 127 (29)
	CommentsSlot
	HexSlot // (31)
)

Slots and counters for AsciiDaya: 0-31 (32) nonReadableRCharCounter 32-47 (16) slots 0-15 respectivly 48-57 (10) digitCounter 58-64 (6) slots 16-22 65-90 (26) smallLetterCounter 91-96 (6) slots 23-28 97-122 (26) capitalLetterCounter 123-126 (4) slots 29-32 127 (1) nonReadableRCharCounter Slots: <SPACE> ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~

0    1 2 3 4 5 6 7 8 8 9 0 1 2 3 4 5 6 7 8 7 9 0 1 2 1 3 4 5 6 7 6 9 0 1 2
View Source
const (
	TotalCounter = iota
	LetterCounter
	DigitCounter
	SpecialCharCounter
	WordCounter
	NumberCounter
	SpareCounter1__
	SpareCounter2__
)

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 CounterName = map[int]string{
	TotalCounter:       "TotalCounter",
	LetterCounter:      "LetterCounter",
	DigitCounter:       "DigitCounter",
	SpecialCharCounter: "SpecialCharCounter",
	WordCounter:        "WordCounter",
	NumberCounter:      "NumberCounter",
	SpareCounter1__:    "<UnusedCounter>",
	SpareCounter2__:    "<UnusedCounter>",
}
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",
	NonReadableCharSlot: "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 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 Critiria added in v0.0.8

type Critiria struct {
	Req     ReqConfig     `json:"req"`     // Request critiria for blocking/allowing
	Resp    RespConfig    `json:"resp"`    // Response critiria for blocking/allowing
	Process ProcessConfig `json:"process"` // Processing critiria for blocking/allowing
}

func (*Critiria) DeepCopy added in v0.0.8

func (in *Critiria) DeepCopy() *Critiria

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

func (*Critiria) DeepCopyInto added in v0.0.8

func (in *Critiria) DeepCopyInto(out *Critiria)

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

func (*Critiria) Marshal added in v0.0.8

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

func (*Critiria) Normalize added in v0.0.8

func (c *Critiria) Normalize()

type Ctrl added in v0.0.8

type Ctrl struct {
	Consult            bool   `json:"consult"` // False means never consult guard, all decissions are local
	RequestsPerMinuete uint16 `json:"rpm"`     // Maximum rpm allows for consulting guard
	Block              bool   `json:"block"`   // If false, alert only
	Learn              bool   `json:"learn"`   // If false, allowed piles are not processed
	Auto               bool   `json:"auto"`    // If true, use learned critiria rather than configured critiria
}

Decission process If request profile allowed by ReqConfig: - Main Critiria

<Allow> + Log and gather statistics

If Consult.Active and did not cross Consult.RequestsPerMinuete

If request profile allowed by Guard:  - Secondary Critiria
       <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

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) Marshal

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

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) 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.

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 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) Marshal

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

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) 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.

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)

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

type ProcessConfig added in v0.0.8

type ProcessConfig struct {
	ResponseTime   U8MinmaxSlice `json:"responsetime"`
	CompletionTime U8MinmaxSlice `json:"completiontime"`
}

func (*ProcessConfig) AddTypicalVal added in v0.0.8

func (config *ProcessConfig) AddTypicalVal()

Allow typical values - use for development but not in production

func (*ProcessConfig) Decide added in v0.0.8

func (config *ProcessConfig) Decide(pp *ProcessProfile) string

func (*ProcessConfig) DeepCopy added in v0.0.8

func (in *ProcessConfig) DeepCopy() *ProcessConfig

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

func (*ProcessConfig) DeepCopyInto added in v0.0.8

func (in *ProcessConfig) DeepCopyInto(out *ProcessConfig)

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

func (*ProcessConfig) Marshal added in v0.0.8

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

func (*ProcessConfig) Normalize added in v0.0.8

func (config *ProcessConfig) Normalize()

type ProcessPile added in v0.0.8

type ProcessPile struct {
	ResponseTime   []uint8 `json:"responsetime"`
	CompletionTime []uint8 `json:"completiontime"`
}

func (*ProcessPile) DeepCopy added in v0.0.8

func (in *ProcessPile) DeepCopy() *ProcessPile

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

func (*ProcessPile) DeepCopyInto added in v0.0.8

func (in *ProcessPile) DeepCopyInto(out *ProcessPile)

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

type ProcessProfile added in v0.0.8

type ProcessProfile struct {
	ResponseTime   uint8 `json:"responsetime"`
	CompletionTime uint8 `json:"completiontime"`
}

func (*ProcessProfile) DeepCopy added in v0.0.8

func (in *ProcessProfile) DeepCopy() *ProcessProfile

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

func (*ProcessProfile) DeepCopyInto added in v0.0.8

func (in *ProcessProfile) DeepCopyInto(out *ProcessProfile)

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

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) Marshal

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

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

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.

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 {
	Url     UrlConfig     `json:"url"`
	Qs      QueryConfig   `json:"qs"`
	Headers HeadersConfig `json:"headers"`
}

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) Marshal

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

func (*ReqConfig) Normalize added in v0.0.8

func (config *ReqConfig) Normalize()

type ReqPile added in v0.0.7

type ReqPile struct {
	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

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.

type ReqProfile

type ReqProfile struct {
	//ClientIP      string          `json:"cip"`           // 127.0.0.1
	//ClientPort    string          `json:"cport"`         // 53592
	Method        string          `json:"method"`        // GET
	Proto         string          `json:"proto"`         // "HTTP/1.1"
	ContentLength uint32          `json:"contentlength"` // 0
	Url           *UrlProfile     `json:"url"`
	Qs            *QueryProfile   `json:"qs"`
	Headers       *HeadersProfile `json:"headers"`
}

pi.Log.Debugf("Client: %s port %s", cip, cport) pi.Log.Debugf("Server: %s port %s", sip, sport)

pi.Log.Debugf("req.Method %s", req. ) pi.Log.Debugf("req.Proto %s", req.Proto) pi.Log.Debugf("scheme: %s", req.URL.Scheme) pi.Log.Debugf("opaque: %s", req.URL.Opaque)

pi.Log.Debugf("ContentLength: %d", req.ContentLength) pi.Log.Debugf("Trailer: %#v", req.Trailer)

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)

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 *ReqProfile) 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) Marshal added in v0.0.8

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

func (*RespConfig) Normalize added in v0.0.8

func (config *RespConfig) Normalize()

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 *ReqProfile)

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.

type RespProfile added in v0.0.8

type RespProfile struct {
	Headers *HeadersProfile `json:"headers"`
}

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(req *http.Request)

type SimpleValConfig

type SimpleValConfig struct {
	Flags        uint32        `json:"flags"`
	Runes        U8MinmaxSlice `json:"runes"`
	Digits       U8MinmaxSlice `json:"digits"`
	Letters      U8MinmaxSlice `json:"letters"`
	SpecialChars U8MinmaxSlice `json:"schars"`
	Words        U8MinmaxSlice `json:"words"`
	Numbers      U8MinmaxSlice `json:"numbers"`
	UnicodeFlags Uint32Slice   `json:"unicodeFlags"` //[]uint32
	Mandatory    bool          `json:"mandatory"`
}

func NewSimpleValConfig

func NewSimpleValConfig(runes, letters, digits, specialChars, words, numbers 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) Marshal

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

func (*SimpleValConfig) NameFlags

func (config *SimpleValConfig) NameFlags() string

func (*SimpleValConfig) Normalize added in v0.0.8

func (config *SimpleValConfig) Normalize()
func convert64To32(v uint64) (vL uint32, vH uint32) {
	vL = uint32(v)
	vH = uint32(v >> 32)
	return
}
func convert32To64(vL uint32, vH uint32) (v uint64) {
	v = (uint64(vH) << 32) & uint64(vL)
	return
}

type SimpleValPile added in v0.0.7

type SimpleValPile struct {
	Flags        uint32
	Runes        []uint8
	Digits       []uint8
	Letters      []uint8
	SpecialChars []uint8
	Words        []uint8
	Numbers      []uint8
	UnicodeFlags Uint32Slice //[]uint32
}

func (*SimpleValPile) Add added in v0.0.7

func (p *SimpleValPile) Add(svp *SimpleValProfile)

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.

type SimpleValProfile

type SimpleValProfile struct {
	Flags        uint32
	Runes        uint8
	Digits       uint8
	Letters      uint8
	SpecialChars uint8
	Words        uint8
	Numbers      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 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.

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) Marshal

func (mms U8MinmaxSlice) Marshal() string

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) Marshal

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

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) 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.

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 {
	Contigured *Critiria `json:"configured"`        // configrued critiria
	Learned    *Critiria `json:"learned,omitempty"` // Learned citiria
	Control    Ctrl      `json:"control"`           // Control
}

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

Jump to

Keyboard shortcuts

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