Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Policy ¶
type Policy struct {
// contains filtered or unexported fields
}
Policy handles policy checks based on configuration.
func NewPolicy ¶
func NewPolicy(policyType PolicyType, values ...string) *Policy
NewPolicy create a new policy instance with given arguments.
type PolicyType ¶
type PolicyType byte
PolicyType represent policy type values.
const ( // WhitelistPolicy declare a policy // to use whitelist logic. WhitelistPolicy PolicyType = 0 // BlacklistPolicy declare a policy // to use blacklist logic. BlacklistPolicy PolicyType = 1 )
type Tokenizer ¶
type Tokenizer struct {
// contains filtered or unexported fields
}
tokenizer that lazily pulls a token from a stream.
func NewTokenizer ¶
func NewTokenizer(query string, skipTokenType, policyCheckType Type, spec []*Spec, policy *Policy) *Tokenizer
NewTokenizer create a new tokenizer instance with given parameters.
func (*Tokenizer) GetCursorPosition ¶
GetCursorPosition return the position of the cursor.
func (*Tokenizer) GetNextToken ¶
GetNextToken obtains next token.
func (*Tokenizer) HasMoreTokens ¶
HasMoreTokens checks aether we still have more tokens.
Click to show internal directories.
Click to hide internal directories.