function

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: BSD-3-Clause Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadArgument    = errors.New("bad argument")
	ErrNoSuchFunction = errors.New("no such function")
	ErrTooFewArgs     = errors.New("too few arguments")
	ErrTooManyArgs    = errors.New("too many arguments")
)

Functions

func CheckArgCount

func CheckArgCount(narg int, argmin int, argmax int) error

func HasBoolResult

func HasBoolResult(name string) bool

HasBoolResult returns true if the function name returns a Boolean value. XXX This is a hack so the semantic compiler can determine if a single call expr is a Filter or Put proc. At some point function declarations should have signatures so the return type can be introspected.

func New

func New(zctx *zed.Context, name string, narg int) (expr.Function, field.Path, error)

Types

type Abs

type Abs struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#abs.md

func (*Abs) Call

func (a *Abs) Call(_ zed.Allocator, args []zed.Value) zed.Value

type Base64

type Base64 struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#base64

func (*Base64) Call

func (b *Base64) Call(_ zed.Allocator, args []zed.Value) zed.Value

type Bucket

type Bucket struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#bucket

func (*Bucket) Call

func (b *Bucket) Call(_ zed.Allocator, args []zed.Value) zed.Value

type CIDRMatch

type CIDRMatch struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#cidr_match

func (*CIDRMatch) Call

func (c *CIDRMatch) Call(_ zed.Allocator, args []zed.Value) zed.Value

type Ceil

type Ceil struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#ceil

func (*Ceil) Call

func (c *Ceil) Call(_ zed.Allocator, args []zed.Value) zed.Value

type Compare

type Compare struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#compare

func NewCompare

func NewCompare(zctx *zed.Context) *Compare

func (*Compare) Call

func (e *Compare) Call(_ zed.Allocator, args []zed.Value) zed.Value

type Error

type Error struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#error

func (*Error) Call

func (e *Error) Call(_ zed.Allocator, args []zed.Value) zed.Value

type Fields

type Fields struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#fields

func NewFields

func NewFields(zctx *zed.Context) *Fields

func (*Fields) Call

func (f *Fields) Call(_ zed.Allocator, args []zed.Value) zed.Value

type Flatten

type Flatten struct {
	zcode.Builder
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#flatten

func NewFlatten

func NewFlatten(zctx *zed.Context) *Flatten

func (*Flatten) Call

func (n *Flatten) Call(_ zed.Allocator, args []zed.Value) zed.Value

type Floor

type Floor struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#floor

func (*Floor) Call

func (f *Floor) Call(_ zed.Allocator, args []zed.Value) zed.Value

type Grep

type Grep struct {
	// contains filtered or unexported fields
}

func (*Grep) Call

func (g *Grep) Call(_ zed.Allocator, vals []zed.Value) zed.Value

type Grok

type Grok struct {
	// contains filtered or unexported fields
}

func (*Grok) Call

func (g *Grok) Call(_ zed.Allocator, args []zed.Value) zed.Value

type HasError

type HasError struct {
	// contains filtered or unexported fields
}

func NewHasError

func NewHasError() *HasError

func (*HasError) Call

func (h *HasError) Call(_ zed.Allocator, args []zed.Value) zed.Value

type Hex

type Hex struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#hex

func (*Hex) Call

func (h *Hex) Call(_ zed.Allocator, args []zed.Value) zed.Value

type Is

type Is struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#is

func (*Is) Call

func (i *Is) Call(_ zed.Allocator, args []zed.Value) zed.Value

type Join

type Join struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#join

func (*Join) Call

func (j *Join) Call(_ zed.Allocator, args []zed.Value) zed.Value

type KSUIDToString

type KSUIDToString struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#ksuid

func (*KSUIDToString) Call

func (k *KSUIDToString) Call(_ zed.Allocator, args []zed.Value) zed.Value

type Kind

type Kind struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#kind

func (*Kind) Call

func (k *Kind) Call(_ zed.Allocator, args []zed.Value) zed.Value

type LenFn

type LenFn struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#len

func (*LenFn) Call

func (l *LenFn) Call(_ zed.Allocator, args []zed.Value) zed.Value

type Levenshtein

type Levenshtein struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#levenshtein

func (*Levenshtein) Call

func (l *Levenshtein) Call(_ zed.Allocator, args []zed.Value) zed.Value

type Log

type Log struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#log

func (*Log) Call

func (l *Log) Call(_ zed.Allocator, args []zed.Value) zed.Value

type Missing

type Missing struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#missing

func (*Missing) Call

func (m *Missing) Call(ectx zed.Allocator, args []zed.Value) zed.Value

type NameOf

type NameOf struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#nameof

func (*NameOf) Call

func (n *NameOf) Call(_ zed.Allocator, args []zed.Value) zed.Value

type NestDotted

type NestDotted struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#nest_dotted.md

func NewNestDotted

func NewNestDotted(zctx *zed.Context) *NestDotted

NewNestDotted returns a function that turns successive dotted field names into nested records. For example, unflattening {"a.a": 1, "a.b": 1} results in {a:{a:1,b:1}}. Note that while unflattening is applied recursively from the top-level and applies to arbitrary-depth dotted names, it is not applied to dotted names that start at lower levels (for example {a:{"a.a":1}} is unchanged).

func (*NestDotted) Call

func (n *NestDotted) Call(_ zed.Allocator, args []zed.Value) zed.Value

type NetworkOf

type NetworkOf struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#network_of

func (*NetworkOf) Call

func (n *NetworkOf) Call(_ zed.Allocator, args []zed.Value) zed.Value

type ParseURI

type ParseURI struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#parse_uri

func (*ParseURI) Call

func (p *ParseURI) Call(_ zed.Allocator, args []zed.Value) zed.Value

type ParseZSON

type ParseZSON struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#parse_zson

func (*ParseZSON) Call

func (p *ParseZSON) Call(_ zed.Allocator, args []zed.Value) zed.Value

type Pow

type Pow struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#pow

func (*Pow) Call

func (p *Pow) Call(_ zed.Allocator, args []zed.Value) zed.Value

type Quiet

type Quiet struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#quiet

func (*Quiet) Call

func (q *Quiet) Call(_ zed.Allocator, args []zed.Value) zed.Value

type Regexp

type Regexp struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#regexp

func (*Regexp) Call

func (r *Regexp) Call(_ zed.Allocator, args []zed.Value) zed.Value

type RegexpReplace

type RegexpReplace struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#regexp_replace

func (*RegexpReplace) Call

func (r *RegexpReplace) Call(_ zed.Allocator, args []zed.Value) zed.Value

type Replace

type Replace struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#replace

func (*Replace) Call

func (r *Replace) Call(_ zed.Allocator, args []zed.Value) zed.Value

type Round

type Round struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#round

func (*Round) Call

func (r *Round) Call(_ zed.Allocator, args []zed.Value) zed.Value

type RuneLen

type RuneLen struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#run_len

func (*RuneLen) Call

func (r *RuneLen) Call(_ zed.Allocator, args []zed.Value) zed.Value

type Split

type Split struct {
	// contains filtered or unexported fields
}

// https://github.com/brimdata/zed/blob/main/docs/language/functions.md#split

func (*Split) Call

func (s *Split) Call(_ zed.Allocator, args []zed.Value) zed.Value

type Sqrt

type Sqrt struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#sqrt

func (*Sqrt) Call

func (s *Sqrt) Call(_ zed.Allocator, args []zed.Value) zed.Value

type ToLower

type ToLower struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#lower

func (*ToLower) Call

func (t *ToLower) Call(_ zed.Allocator, args []zed.Value) zed.Value

type ToUpper

type ToUpper struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#upper

func (*ToUpper) Call

func (t *ToUpper) Call(_ zed.Allocator, args []zed.Value) zed.Value

type Trim

type Trim struct {
	// contains filtered or unexported fields
}

type TypeOf

type TypeOf struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#typeof

func (*TypeOf) Call

func (t *TypeOf) Call(_ zed.Allocator, args []zed.Value) zed.Value

type Under

type Under struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#under

func (*Under) Call

func (u *Under) Call(_ zed.Allocator, args []zed.Value) zed.Value

type Unflatten

type Unflatten struct {
	// contains filtered or unexported fields
}

https://github.com/brimdata/zed/blob/main/docs/language/functions.md#unflatten

func NewUnflatten

func NewUnflatten(zctx *zed.Context) *Unflatten

func (*Unflatten) Call

func (u *Unflatten) Call(_ zed.Allocator, args []zed.Value) zed.Value

Jump to

Keyboard shortcuts

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