Documentation ¶
Index ¶
- type Any
- type Array
- type Assert
- type Cache
- type Chromedp
- type Col
- type CondOp
- type Const
- type Count
- type CrossJoin
- type Entity
- type ExprFlags
- type Factory
- type Field
- type File
- type Find
- type FnOp
- type Functional
- type HTML
- type HTTP
- type Map
- type MapEntry
- type Median
- type Numeric
- type NumericOp
- type Range
- type Regex
- type Remote
- type Repeat
- type Replace
- type ReplaceOp
- type Row
- type Sample
- type Selector
- type Sink
- type SinkOp
- type Source
- type Span
- type String
- type StringOp
- type Table
- type Time
- type TimeOp
- type Type
- type Var
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Array ¶
type Array struct { Type nuggit.Type `json:"type,omitempty"` Entries []any `json:"entries,omitempty"` }
Array creates an array of the same record type.
type Assert ¶
type Assert struct { Lhs *Const `json:"lhs,omitempty"` Op CondOp `json:"op,omitempty"` Rhs *Const `json:"rhs,omitempty"` }
Assert represents an assertion that would cause a program to fail.
A string error message can be passed to input.
type Chromedp ¶
type Chromedp struct {
Source *Source `json:"source,omitempty"`
}
Chromedp runs a chromedp executor which fetches the outer HTML of an HTML document.
type ExprFlags ¶
type ExprFlags int
func (ExprFlags) CaseInsensitive ¶
func (ExprFlags) MarshalJSON ¶
func (*ExprFlags) UnmarshalJSON ¶
type File ¶
type Find ¶
type Find struct { Literal string `json:"literal,omitempty"` Byte *byte `json:"byte,omitempty"` AnyByte []byte `json:"any_byte,omitempty"` AnyRune string `json:"any_rune,omitempty"` Offset int `json:"offset,omitempty"` // Regex is a regular expression pattern. Regex *Regex `json:"regex,omitempty"` Sink *Sink `json:"sink,omitempty"` // All marks whether to find All bool `json:"all,omitempty"` // Submatch marks whether to include matching groups in the results. Submatch bool `json:"submatch,omitempty"` Index bool `json:"index,omitempty"` SubmatchIndex int `json:"submatch_index,omitempty"` GroupName string `json:"group_name,omitempty"` // Reverse marks that the search be conducted in reverse. Reverse bool `json:"reverse,omitempty"` }
type Functional ¶
type Functional struct { Op FnOp `json:"op,omitempty"` Lambda []string `json:"lambda,omitempty"` InputType1 *Type `json:"input_type1,omitempty"` InputType2 *Type `json:"input_type2,omitempty"` OutputType *Type `json:"output_type,omitempty"` Input any `json:"input,omitempty"` Node *nuggit.Node `json:"node,omitempty"` }
TODO(wes): Experimental: Determine interface for arbitrary ops and conditions.
type HTML ¶
type HTML struct { Sink *Sink `json:"sink,omitempty"` String string `json:"string,omitempty"` Bytes []byte `json:"bytes,omitempty"` }
HTML parses an HTML document.
type HTTP ¶
type Median ¶
type Range ¶
Range describes the open interval [Lo, Hi).
ExprConfig.Negate may be set to match all values,
type Regex ¶
type Regex struct {
Pattern string `json:"pattern,omitempty"`
}
Regex defines a Go-style regular expression.
Pattern should be a string input the regular expression.
The pattern can incorporate steps and variables using step inputs.
Syntax: https://golang.org/s/re2syntax.
type Remote ¶
Remote operator specifies a source URL with checksums. Typically used for loading remote Crush programs.
type Replace ¶
type Replace struct { Op ReplaceOp `json:"op,omitempty"` // FindSubmatch is the index of the match to find for regex matching. FindSubmatch int `json:"find_submatch,omitempty"` FindByte byte `json:"find_byte,omitempty"` ReplaceByte byte `json:"replace_byte,omitempty"` // ReplaceSubmatch replaces the matches with the submatch of the previous regex. ReplaceSubmatch int `json:"replace_submatch,omitempty"` }
Replace replaces strings.
type Sample ¶
type Sample struct{}
Sample uses a sampling strategy to select elements from various sources.
type Selector ¶
type Selector struct { All bool `json:"all,omitempty"` Selector string `json:"selector,omitempty"` Sink *Sink `json:"sink,omitempty"` }
Selector implements CSS selectors.
type Sink ¶
type Source ¶
type Source struct { Scheme string `json:"scheme,omitempty"` Host string `json:"host,omitempty"` Path string `json:"path,omitempty"` Query string `json:"query,omitempty"` }
Source defines a Web source with a given host and path.
The path elements are dynamic to support variables and step outputs. The Host is a static variable not changeable through inputs.
type Span ¶
Span is a representation of an entity as indices into a source byte slice.
The entity content is represented by data[Pos:End] where data is a byte slice. The zero entity is used to indicate lack of presence. Entities where Pos == End are not valid.
type String ¶
type String struct { Op StringOp `json:"op,omitempty"` String string `json:"value,omitempty"` Format string `json:"format,omitempty"` Sink *Sink `json:"sink,omitempty"` Args []any `json:"args,omitempty"` Const *Const `json:"const,omitempty"` Sep string `json:"sep,omitempty"` At int `json:"at,omitempty"` Begin int `json:"begin,omitempty"` End int `json:"end,omitempty"` }
type StringOp ¶
type StringOp string
const ( StringUndefined StringOp = "" StringFormat StringOp = "sprintf" StringAggstring StringOp = "aggstring" StringSubstring StringOp = "substring" StringToLower StringOp = "tolower" StringToUpper StringOp = "toupper" StringURLPathEscape StringOp = "urlpathescape" StringURLPathJoin StringOp = "urlpathjoin" StringURLPathUnescape StringOp = "urlpathunescape" StringURLQueryEscape StringOp = "urlqueryescape" StringURLQueryUnescape StringOp = "urlqueryunescape" )
type Time ¶
type Time struct { Op TimeOp `json:"op,omitempty"` Sink *Sink `json:"sink,omitempty"` Layout string `json:"layout,omitempty"` Year int `json:"year,omitempty"` Month time.Month `json:"month,omitempty"` Day int `json:"day,omitempty"` Hour int `json:"hour,omitempty"` Min int `json:"min,omitempty"` Sec int `json:"sec,omitempty"` Nsec int `json:"nsec,omitempty"` Loc string `json:"loc,omitempty"` Weekday time.Weekday `json:"weekday,omitempty"` Time *time.Time `json:"time_value,omitempty"` }