Documentation
¶
Overview ¶
Package expr contains the expression types for all built in optics, combinators and functions.
Index ¶
- Constants
- func Custom(id string) func(ot OpticTypeExpr) OpticExpression
- func CustomReducer(id string) func(ot ReducerTypeExpr) ReducerExpression
- func GetPurity[ERR any]() bool
- func TODO(id string) func(ot OpticTypeExpr) OpticExpression
- type All
- type Any
- type AppendCol
- type AppendSliceReducerExpr
- type AsReducer
- type AsSeqExpr
- type AtT2
- type Beside
- type BesideEither
- type BinaryExpr
- type BottomUpFiltered
- type BreadthFirstFiltered
- type Bytes
- type CaptureString
- type Case
- type Cast
- type Catch
- type Children
- type Chosen
- type Coalesce
- type ColFocusErr
- type ColSourceErr
- type ColSourceFocusErr
- type CollectionOf
- type Compose
- type Concat
- type Const
- type CustomOptic
- type CustomReducerExpr
- type DecodeFileExpr
- type Desc
- type DiffCol
- type DiffTree
- type EditDistance
- type EditType
- type Empty
- type EncodeString
- type EqDeep
- type EqT2Of
- type ErrDuplicateKeyReducerExpr
- type Error
- type ErrorAs
- type ErrorIs
- type ExtentData
- type FieldLens
- type FilterMode
- type Filtered
- type ForEach
- type FormatFloat
- type FormatInt
- type GoFuncExpr
- type Grouped
- type HtmlChildren
- type Identity
- type Ignore
- type IgnoreWrite
- type Index
- type Indexing
- type IsoOpT2BindExpr
- type IxMap
- type IxMapperType
- type IxMatch
- type JqContains
- type JqObjectsOf
- type JqOrderBy
- type JqPick
- type Last
- type Left
- type Length
- type Lookup
- type Make
- type MapOfReduced
- type MapReduce
- type MatchString
- type Matching
- type MeanReducer
- type MedianReducer
- type MethodGetter
- type MethodLens
- type ModeReducer
- type Modify
- type Non
- type None
- type OpIxGet
- type OpT2BindExpr
- type OpticExpression
- type OpticType
- type OpticTypeExpr
- func (o OpticTypeExpr) OpticA() reflect.Type
- func (o OpticTypeExpr) OpticB() reflect.Type
- func (o OpticTypeExpr) OpticI() reflect.Type
- func (o OpticTypeExpr) OpticS() reflect.Type
- func (o OpticTypeExpr) OpticT() reflect.Type
- func (o OpticTypeExpr) OpticType() OpticType
- func (o OpticTypeExpr) Pure() bool
- func (o OpticTypeExpr) Signature() string
- type OptionOfFirst
- type OrderBy
- type OrderByN
- type Ordered
- type Overwrite
- type ParseFloat
- type ParseFloatP
- type ParseHtml
- type ParseInt
- type ParseJson
- type Polymorphic
- type Prefixed
- type PtrOption
- type ReIndexed
- type ReIndexedCol
- type ReIndexedTree
- type Reader
- type ReducerExpression
- type ReducerN
- type ReducerTypeExpr
- type ResolvePath
- type Reverse
- type ReverseGet
- type Reversed
- type Rewrite
- type Right
- type SelfIndex
- type SeqExpr
- type SeqExprValue
- type SeqOf
- type Set
- type SliceChildren
- type SliceOf
- type Some
- type SplitFileExpr
- type SplitString
- type StatExpr
- type Stop
- type StringBuilderReducerExpr
- type StringHasPrefix
- type StringHasSuffix
- type StringOf
- type SubCol
- type SwapTuple
- type Switch
- type Throw
- type ToCol
- type TopDownFiltered
- type TopDownMatch
- type Traverse
- type TraverseDirExpr
- type TraverseFile
- type TraverseMembers
- type TraverseTreeChildrenExpr
- type TreeMerge
- type TreeOp
- type TupleDup
- type TupleElement
- type TupleOf
- type UnaryExpr
- type Unknown
- type Value
- type Var
- type WithChildPath
- type WithComprehension
- type WithEither
- type WithFunc
- type WithIndex
- type WithMetrics
- type WithOption
- type WithPanic
- type WithValidation
- type WithVar
Constants ¶
View Source
const ( EditInsert EditType = 1 << iota EditDelete EditSubstitute EditTranspose EditLevenshtein = EditInsert | EditDelete | EditSubstitute EditOSA = EditLevenshtein | EditTranspose EditLCS = EditInsert | EditDelete EditAny = 0xFF )
View Source
const ( OpticTypeReturnManyFlag OpticType = 1 << iota OpticTypeReadWriteFlag OpticTypeBiDirFlag OpticTypeIdentityFlag OpticTypeGetter = opticTypeReturnOneFlag | opticTypeReadOnlyFlag | opticTypeUniDirFlag OpticTypeLens = opticTypeReturnOneFlag | OpticTypeReadWriteFlag | opticTypeUniDirFlag OpticTypeIteration = OpticTypeReturnManyFlag | opticTypeReadOnlyFlag | opticTypeUniDirFlag OpticTypeTraversal = OpticTypeReturnManyFlag | OpticTypeReadWriteFlag | opticTypeUniDirFlag OpticTypeIso = opticTypeReturnOneFlag | OpticTypeReadWriteFlag | OpticTypeBiDirFlag OpticTypePrism = OpticTypeReturnManyFlag | OpticTypeReadWriteFlag | OpticTypeBiDirFlag OpticTypeIdentity = opticTypeReturnOneFlag | OpticTypeReadWriteFlag | OpticTypeBiDirFlag | OpticTypeIdentityFlag )
Variables ¶
This section is empty.
Functions ¶
func Custom ¶
func Custom(id string) func(ot OpticTypeExpr) OpticExpression
func CustomReducer ¶
func CustomReducer(id string) func(ot ReducerTypeExpr) ReducerExpression
func TODO ¶
func TODO(id string) func(ot OpticTypeExpr) OpticExpression
Types ¶
type All ¶
type All struct {
OpticTypeExpr
Optic OpticExpression
Pred OpticExpression
}
type Any ¶
type Any struct {
OpticTypeExpr
Optic OpticExpression
Pred OpticExpression
}
type AppendSliceReducerExpr ¶
type AppendSliceReducerExpr struct {
ReducerTypeExpr
}
func (AppendSliceReducerExpr) Short ¶
func (m AppendSliceReducerExpr) Short() string
func (AppendSliceReducerExpr) String ¶
func (m AppendSliceReducerExpr) String() string
type AsReducer ¶
type AsReducer struct {
ReducerTypeExpr
Empty OpticExpression
Append OpticExpression
End OpticExpression
}
type AtT2 ¶
type AtT2 struct {
OpticTypeExpr
V reflect.Type
Equals OpticExpression
}
type Beside ¶
type Beside struct {
OpticTypeExpr
Optic1 OpticExpression
Optic2 OpticExpression
}
type BesideEither ¶
type BesideEither struct {
OpticTypeExpr
OnLeft OpticExpression
OnRight OpticExpression
}
func (BesideEither) Short ¶
func (e BesideEither) Short() string
func (BesideEither) String ¶
func (e BesideEither) String() string
type BinaryExpr ¶
func (BinaryExpr) Short ¶
func (e BinaryExpr) Short() string
func (BinaryExpr) String ¶
func (e BinaryExpr) String() string
type BottomUpFiltered ¶
type BottomUpFiltered struct {
OpticTypeExpr
Children OpticExpression
Pred OpticExpression
}
func (BottomUpFiltered) Short ¶
func (e BottomUpFiltered) Short() string
func (BottomUpFiltered) String ¶
func (e BottomUpFiltered) String() string
type BreadthFirstFiltered ¶
type BreadthFirstFiltered struct {
OpticTypeExpr
Children OpticExpression
Pred OpticExpression
}
func (BreadthFirstFiltered) Short ¶
func (e BreadthFirstFiltered) Short() string
func (BreadthFirstFiltered) String ¶
func (e BreadthFirstFiltered) String() string
type Bytes ¶
type Bytes struct {
OpticTypeExpr
}
type CaptureString ¶
type CaptureString struct {
OpticTypeExpr
MatchOn *regexp.Regexp
}
func (CaptureString) Short ¶
func (e CaptureString) Short() string
func (CaptureString) String ¶
func (e CaptureString) String() string
type Case ¶
type Case struct {
OpticTypeExpr
Condition OpticExpression
Default OpticExpression
}
type Cast ¶
type Cast struct {
OpticTypeExpr
}
type Catch ¶
type Catch struct {
OpticTypeExpr
Optic OpticExpression
CatchA OpticExpression
CatchT OpticExpression
}
type Children ¶
type Children struct {
OpticTypeExpr
}
type Chosen ¶
type Chosen struct {
OpticTypeExpr
}
type Coalesce ¶
type Coalesce struct {
OpticTypeExpr
Optics []OpticExpression
}
type ColFocusErr ¶
type ColFocusErr struct {
OpticTypeExpr
Optic OpticExpression
}
func (ColFocusErr) Short ¶
func (e ColFocusErr) Short() string
func (ColFocusErr) String ¶
func (e ColFocusErr) String() string
type ColSourceErr ¶
type ColSourceErr struct {
OpticTypeExpr
Optic OpticExpression
}
func (ColSourceErr) Short ¶
func (e ColSourceErr) Short() string
func (ColSourceErr) String ¶
func (e ColSourceErr) String() string
type ColSourceFocusErr ¶
type ColSourceFocusErr struct {
OpticTypeExpr
Optic OpticExpression
}
func (ColSourceFocusErr) Short ¶
func (e ColSourceFocusErr) Short() string
func (ColSourceFocusErr) String ¶
func (e ColSourceFocusErr) String() string
type CollectionOf ¶
type CollectionOf struct {
OpticTypeExpr
I reflect.Type
A reflect.Type
B reflect.Type
Optic OpticExpression
}
func (CollectionOf) Short ¶
func (e CollectionOf) Short() string
func (CollectionOf) String ¶
func (e CollectionOf) String() string
type Compose ¶
type Compose struct {
OpticTypeExpr
Left OpticExpression
Right OpticExpression
IxMap OpticExpression
}
type Concat ¶
type Concat struct {
OpticTypeExpr
Optics []OpticExpression
}
type Const ¶
type Const struct {
OpticTypeExpr
Index any
Value any
}
type CustomOptic ¶
type CustomOptic struct {
OpticTypeExpr
Id string
}
func (CustomOptic) Short ¶
func (e CustomOptic) Short() string
func (CustomOptic) String ¶
func (e CustomOptic) String() string
type CustomReducerExpr ¶
type CustomReducerExpr struct {
ReducerTypeExpr
Id string
}
func (CustomReducerExpr) Short ¶
func (m CustomReducerExpr) Short() string
func (CustomReducerExpr) String ¶
func (m CustomReducerExpr) String() string
type DecodeFileExpr ¶
type DecodeFileExpr struct {
OpticTypeExpr
Encoding encoding.Encoding
}
func (DecodeFileExpr) Short ¶
func (e DecodeFileExpr) Short() string
func (DecodeFileExpr) String ¶
func (e DecodeFileExpr) String() string
type Desc ¶
type Desc struct {
OpticTypeExpr
Optic OpticExpression
}
type DiffCol ¶
type DiffCol struct {
OpticTypeExpr
Threshold float64
Distance OpticExpression
IxMatch OpticExpression
}
type DiffTree ¶
type DiffTree struct {
OpticTypeExpr
I reflect.Type
A reflect.Type
Children OpticExpression
Threshold float64
Distance OpticExpression
IxMatch OpticExpression
}
type EditDistance ¶
type EditDistance struct {
OpticTypeExpr
Optic OpticExpression
AllowedEdits EditType
}
func (EditDistance) Short ¶
func (e EditDistance) Short() string
func (EditDistance) String ¶
func (e EditDistance) String() string
type Empty ¶
type Empty struct {
OpticTypeExpr
}
type EncodeString ¶
type EncodeString struct {
OpticTypeExpr
Encoding encoding.Encoding
}
func (EncodeString) Short ¶
func (e EncodeString) Short() string
func (EncodeString) String ¶
func (e EncodeString) String() string
type EqDeep ¶
type EqDeep struct {
OpticTypeExpr
}
type EqT2Of ¶
type EqT2Of struct {
OpticTypeExpr
Optic OpticExpression
Eq OpticExpression
}
type ErrDuplicateKeyReducerExpr ¶
type ErrDuplicateKeyReducerExpr struct {
ReducerTypeExpr
}
func (ErrDuplicateKeyReducerExpr) Short ¶
func (m ErrDuplicateKeyReducerExpr) Short() string
func (ErrDuplicateKeyReducerExpr) String ¶
func (m ErrDuplicateKeyReducerExpr) String() string
type Error ¶
type Error struct {
OpticTypeExpr
Err error
}
type ErrorAs ¶
type ErrorAs struct {
OpticTypeExpr
}
type ErrorIs ¶
type ErrorIs struct {
OpticTypeExpr
Target error
}
type ExtentData ¶
type ExtentData struct {
OpticTypeExpr
}
func (ExtentData) Short ¶
func (e ExtentData) Short() string
func (ExtentData) String ¶
func (e ExtentData) String() string
type FieldLens ¶
type FieldLens struct {
OpticTypeExpr
Field reflect.StructField
FieldNum int
}
type FilterMode ¶
type FilterMode byte
const ( FilterStop FilterMode = iota FilterContinue FilterYieldAll )
func (FilterMode) String ¶
func (f FilterMode) String() string
type Filtered ¶
type Filtered struct {
OpticTypeExpr
PosPred OpticExpression
Pred OpticExpression
Optic OpticExpression
NoMatchMode FilterMode
MatchMode FilterMode
}
type ForEach ¶
type ForEach struct {
OpticTypeExpr
ForEach OpticExpression
Op OpticExpression
}
type FormatFloat ¶
type FormatFloat struct {
OpticTypeExpr
Fmt byte
Prec int
BitSize int
}
func (FormatFloat) Short ¶
func (e FormatFloat) Short() string
func (FormatFloat) String ¶
func (e FormatFloat) String() string
type FormatInt ¶
type FormatInt struct {
OpticTypeExpr
Base int
}
type GoFuncExpr ¶
type GoFuncExpr struct {
OpticTypeExpr
Func reflect.Value
}
func (GoFuncExpr) Short ¶
func (e GoFuncExpr) Short() string
func (GoFuncExpr) String ¶
func (e GoFuncExpr) String() string
type Grouped ¶
type Grouped struct {
OpticTypeExpr
Optic OpticExpression
Reducer ReducerExpression
}
type HtmlChildren ¶
type HtmlChildren struct {
OpticTypeExpr
}
func (HtmlChildren) Short ¶
func (e HtmlChildren) Short() string
func (HtmlChildren) String ¶
func (e HtmlChildren) String() string
type Identity ¶
type Identity struct {
Index any
OpticTypeExpr
}
type Ignore ¶
type Ignore struct {
OpticTypeExpr
Optic OpticExpression
Predicate OpticExpression
}
type IgnoreWrite ¶
type IgnoreWrite struct {
OpticTypeExpr
Optic OpticExpression
}
func (IgnoreWrite) Short ¶
func (e IgnoreWrite) Short() string
func (IgnoreWrite) String ¶
func (e IgnoreWrite) String() string
type Index ¶
type Index struct {
OpticTypeExpr
Index any
Optic OpticExpression
}
type Indexing ¶
type Indexing struct {
OpticTypeExpr
Optic OpticExpression
}
type IsoOpT2BindExpr ¶
type IsoOpT2BindExpr struct {
OpticTypeExpr
Op OpticExpression
InvOp OpticExpression
S reflect.Type
Right any
}
func (IsoOpT2BindExpr) Short ¶
func (e IsoOpT2BindExpr) Short() string
func (IsoOpT2BindExpr) String ¶
func (e IsoOpT2BindExpr) String() string
type IxMap ¶
type IxMap struct {
OpticTypeExpr
Type IxMapperType
}
type IxMapperType ¶
type IxMapperType int
const ( IxMapperCustom IxMapperType = iota IxMapperLeft IxMapperRight IxMapperBoth )
func (IxMapperType) String ¶
func (i IxMapperType) String() string
type IxMatch ¶
type IxMatch struct {
OpticTypeExpr
Optic OpticExpression
}
type JqContains ¶
type JqContains struct {
OpticTypeExpr
}
func (JqContains) Short ¶
func (e JqContains) Short() string
func (JqContains) String ¶
func (e JqContains) String() string
type JqObjectsOf ¶
type JqObjectsOf struct {
OpticTypeExpr
Fields OpticExpression
}
func (JqObjectsOf) Short ¶
func (e JqObjectsOf) Short() string
func (JqObjectsOf) String ¶
func (e JqObjectsOf) String() string
type JqOrderBy ¶
type JqOrderBy struct {
OpticTypeExpr
}
type JqPick ¶
type JqPick struct {
OpticTypeExpr
Paths [][]any
}
type Last ¶
type Last struct {
OpticTypeExpr
Optic OpticExpression
}
type Left ¶
type Left struct {
OpticTypeExpr
B reflect.Type
}
type Length ¶
type Length struct {
OpticTypeExpr
Optic OpticExpression
}
type Lookup ¶
type Lookup struct {
OpticTypeExpr
Optic OpticExpression
Source any
}
type Make ¶
type Make struct {
OpticTypeExpr
Size []int
}
type MapOfReduced ¶
type MapOfReduced struct {
OpticTypeExpr
Optic OpticExpression
Reducer ReducerExpression
}
func (MapOfReduced) Short ¶
func (e MapOfReduced) Short() string
func (MapOfReduced) String ¶
func (e MapOfReduced) String() string
type MapReduce ¶
type MapReduce struct {
OpticTypeExpr
Optic OpticExpression
Reducer ReducerExpression
Mapper OpticExpression
}
type MatchString ¶
type MatchString struct {
OpticTypeExpr
Match *regexp.Regexp
}
func (MatchString) Short ¶
func (e MatchString) Short() string
func (MatchString) String ¶
func (e MatchString) String() string
type Matching ¶
type Matching struct {
OpticTypeExpr
Match OpticExpression
}
type MeanReducer ¶
type MeanReducer struct {
ReducerTypeExpr
}
func (MeanReducer) Short ¶
func (m MeanReducer) Short() string
func (MeanReducer) String ¶
func (m MeanReducer) String() string
type MedianReducer ¶
type MedianReducer struct {
ReducerTypeExpr
}
func (MedianReducer) Short ¶
func (m MedianReducer) Short() string
func (MedianReducer) String ¶
func (m MedianReducer) String() string
type MethodGetter ¶
type MethodGetter struct {
OpticTypeExpr
MethodName string
Method reflect.Type
}
func (MethodGetter) Short ¶
func (e MethodGetter) Short() string
func (MethodGetter) String ¶
func (e MethodGetter) String() string
type MethodLens ¶
type MethodLens struct {
OpticTypeExpr
GetterName string
Getter reflect.Type
SetterName string
Setter reflect.Type
}
func (MethodLens) Short ¶
func (e MethodLens) Short() string
func (MethodLens) String ¶
func (e MethodLens) String() string
type ModeReducer ¶
type ModeReducer struct {
ReducerTypeExpr
}
func (ModeReducer) Short ¶
func (m ModeReducer) Short() string
func (ModeReducer) String ¶
func (m ModeReducer) String() string
type Modify ¶
type Modify struct {
OpticTypeExpr
Optic OpticExpression
Fmap OpticExpression
}
type Non ¶
type Non struct {
OpticTypeExpr
Default any
Equal OpticExpression
}
type None ¶
type None struct {
OpticTypeExpr
}
type OpIxGet ¶
type OpIxGet struct {
OpticTypeExpr
Optic OpticExpression
}
type OpT2BindExpr ¶
type OpT2BindExpr struct {
OpticTypeExpr
Op OpticExpression
S reflect.Type
RightValue any
}
func (OpT2BindExpr) Short ¶
func (e OpT2BindExpr) Short() string
func (OpT2BindExpr) String ¶
func (e OpT2BindExpr) String() string
type OpticExpression ¶
type OpticExpression interface {
OpticI() reflect.Type
OpticS() reflect.Type
OpticT() reflect.Type
OpticA() reflect.Type
OpticB() reflect.Type
// Provides this optics internal type. This indicates which methods have efficient implementations.
OpticType() OpticType
Pure() bool
//Provides a string representation of this Optic for diagnosis/logging purposes.
String() string
Short() string
}
type OpticTypeExpr ¶
type OpticTypeExpr struct {
// contains filtered or unexported fields
}
func NewOpticTypeExpr ¶
func NewOpticTypeExpr[I, S, T, A, B, RET, RW, DIR, ERR any]() OpticTypeExpr
func (OpticTypeExpr) OpticA ¶
func (o OpticTypeExpr) OpticA() reflect.Type
func (OpticTypeExpr) OpticB ¶
func (o OpticTypeExpr) OpticB() reflect.Type
func (OpticTypeExpr) OpticI ¶
func (o OpticTypeExpr) OpticI() reflect.Type
func (OpticTypeExpr) OpticS ¶
func (o OpticTypeExpr) OpticS() reflect.Type
func (OpticTypeExpr) OpticT ¶
func (o OpticTypeExpr) OpticT() reflect.Type
func (OpticTypeExpr) OpticType ¶
func (o OpticTypeExpr) OpticType() OpticType
Provides this optics internal type. This indicates which methods have efficient implementations.
func (OpticTypeExpr) Pure ¶
func (o OpticTypeExpr) Pure() bool
func (OpticTypeExpr) Signature ¶
func (o OpticTypeExpr) Signature() string
type OptionOfFirst ¶
type OptionOfFirst struct {
OpticTypeExpr
Optic OpticExpression
}
func (OptionOfFirst) Short ¶
func (e OptionOfFirst) Short() string
func (OptionOfFirst) String ¶
func (e OptionOfFirst) String() string
type OrderBy ¶
type OrderBy struct {
OpticTypeExpr
Optic OpticExpression
}
type OrderByN ¶
type OrderByN struct {
OpticTypeExpr
Optics []OpticExpression
}
type Ordered ¶
type Ordered struct {
OpticTypeExpr
Optic OpticExpression
OrderBy OpticExpression
}
type Overwrite ¶
type Overwrite struct {
OpticTypeExpr
}
type ParseFloat ¶
type ParseFloat struct {
OpticTypeExpr
Fmt byte
Prec int
BitSize int
}
func (ParseFloat) Short ¶
func (e ParseFloat) Short() string
func (ParseFloat) String ¶
func (e ParseFloat) String() string
type ParseFloatP ¶
type ParseFloatP struct {
OpticTypeExpr
BitSize int
}
func (ParseFloatP) Short ¶
func (e ParseFloatP) Short() string
func (ParseFloatP) String ¶
func (e ParseFloatP) String() string
type ParseHtml ¶
type ParseHtml struct {
OpticTypeExpr
}
type ParseInt ¶
type ParseInt struct {
OpticTypeExpr
Base int
BitSize int
}
type ParseJson ¶
type ParseJson struct {
OpticTypeExpr
}
type Polymorphic ¶
type Polymorphic struct {
OpticTypeExpr
Optic OpticExpression
}
func (Polymorphic) Short ¶
func (e Polymorphic) Short() string
func (Polymorphic) String ¶
func (e Polymorphic) String() string
type Prefixed ¶
type Prefixed struct {
OpticTypeExpr
Path OpticExpression
Val any
ValMatch OpticExpression
}
type ReIndexed ¶
type ReIndexed struct {
OpticTypeExpr
IxMap OpticExpression
IxMatch OpticExpression
Optic OpticExpression
}
type ReIndexedCol ¶
type ReIndexedCol struct {
OpticTypeExpr
IxMap OpticExpression
IxMatchI OpticExpression
IxMatchJ OpticExpression
}
func (ReIndexedCol) Short ¶
func (e ReIndexedCol) Short() string
func (ReIndexedCol) String ¶
func (e ReIndexedCol) String() string
type ReIndexedTree ¶
type ReIndexedTree struct {
OpticTypeExpr
I reflect.Type
A reflect.Type
B reflect.Type
IxMap OpticExpression
}
func (ReIndexedTree) Short ¶
func (e ReIndexedTree) Short() string
func (ReIndexedTree) String ¶
func (e ReIndexedTree) String() string
type Reader ¶
type Reader struct {
OpticTypeExpr
}
type ReducerExpression ¶
type ReducerN ¶
type ReducerN struct {
ReducerTypeExpr
Reducers []ReducerExpression
}
type ReducerTypeExpr ¶
type ReducerTypeExpr struct {
// contains filtered or unexported fields
}
func NewReducerTypeExpr ¶
func NewReducerTypeExpr[S, A, R any]() ReducerTypeExpr
func (ReducerTypeExpr) ReducerE ¶
func (o ReducerTypeExpr) ReducerE() reflect.Type
func (ReducerTypeExpr) ReducerR ¶
func (o ReducerTypeExpr) ReducerR() reflect.Type
func (ReducerTypeExpr) ReducerS ¶
func (o ReducerTypeExpr) ReducerS() reflect.Type
type ResolvePath ¶
type ResolvePath struct {
OpticTypeExpr
Children OpticExpression
Path []any
}
func (ResolvePath) Short ¶
func (e ResolvePath) Short() string
func (ResolvePath) String ¶
func (e ResolvePath) String() string
type ReverseGet ¶
type ReverseGet struct {
OpticTypeExpr
Optic OpticExpression
}
func (ReverseGet) Short ¶
func (e ReverseGet) Short() string
func (ReverseGet) String ¶
func (e ReverseGet) String() string
type Reversed ¶
type Reversed struct {
OpticTypeExpr
Optic OpticExpression
}
type Rewrite ¶
type Rewrite struct {
OpticTypeExpr
Children OpticExpression
RewriteOp OpticExpression
}
type Right ¶
type Right struct {
OpticTypeExpr
A reflect.Type
}
type SelfIndex ¶
type SelfIndex struct {
OpticTypeExpr
IxMatch OpticExpression
Optic OpticExpression
}
type SeqOf ¶
type SeqOf struct {
OpticTypeExpr
I reflect.Type
A reflect.Type
B reflect.Type
Optic OpticExpression
}
type Set ¶
type Set struct {
OpticTypeExpr
Optic OpticExpression
Val any
}
type SliceChildren ¶
type SliceChildren struct {
OpticTypeExpr
A reflect.Type
}
func (SliceChildren) Short ¶
func (e SliceChildren) Short() string
func (SliceChildren) String ¶
func (e SliceChildren) String() string
type SliceOf ¶
type SliceOf struct {
OpticTypeExpr
I reflect.Type
A reflect.Type
B reflect.Type
Optic OpticExpression
}
type Some ¶
type Some struct {
OpticTypeExpr
}
type SplitFileExpr ¶
type SplitFileExpr struct {
OpticTypeExpr
SplitOn byte
}
func (SplitFileExpr) Short ¶
func (e SplitFileExpr) Short() string
func (SplitFileExpr) String ¶
func (e SplitFileExpr) String() string
type SplitString ¶
type SplitString struct {
OpticTypeExpr
SplitOn *regexp.Regexp
}
func (SplitString) Short ¶
func (e SplitString) Short() string
func (SplitString) String ¶
func (e SplitString) String() string
type StatExpr ¶
type StatExpr struct {
OpticTypeExpr
}
type Stop ¶
type Stop struct {
OpticTypeExpr
Optic OpticExpression
Predicate OpticExpression
}
type StringBuilderReducerExpr ¶
type StringBuilderReducerExpr struct {
ReducerTypeExpr
}
func (StringBuilderReducerExpr) Short ¶
func (m StringBuilderReducerExpr) Short() string
func (StringBuilderReducerExpr) String ¶
func (m StringBuilderReducerExpr) String() string
type StringHasPrefix ¶
type StringHasPrefix struct {
OpticTypeExpr
Prefix string
}
func (StringHasPrefix) Short ¶
func (e StringHasPrefix) Short() string
func (StringHasPrefix) String ¶
func (e StringHasPrefix) String() string
type StringHasSuffix ¶
type StringHasSuffix struct {
OpticTypeExpr
Suffix string
}
func (StringHasSuffix) Short ¶
func (e StringHasSuffix) Short() string
func (StringHasSuffix) String ¶
func (e StringHasSuffix) String() string
type StringOf ¶
type StringOf struct {
OpticTypeExpr
Optic OpticExpression
}
type SubCol ¶
type SubCol struct {
OpticTypeExpr
Start int
Length int
}
type Switch ¶
type Switch struct {
OpticTypeExpr
Whens []Case
Default OpticExpression
}
type Throw ¶
type Throw struct {
OpticTypeExpr
}
type TopDownFiltered ¶
type TopDownFiltered struct {
OpticTypeExpr
Children OpticExpression
Pred OpticExpression
}
func (TopDownFiltered) Short ¶
func (e TopDownFiltered) Short() string
func (TopDownFiltered) String ¶
func (e TopDownFiltered) String() string
type TopDownMatch ¶
type TopDownMatch struct {
OpticTypeExpr
Children OpticExpression
Matcher OpticExpression
}
func (TopDownMatch) Short ¶
func (e TopDownMatch) Short() string
func (TopDownMatch) String ¶
func (e TopDownMatch) String() string
type Traverse ¶
type Traverse struct {
OpticTypeExpr
}
type TraverseDirExpr ¶
type TraverseDirExpr struct {
OpticTypeExpr
}
func (TraverseDirExpr) Short ¶
func (e TraverseDirExpr) Short() string
func (TraverseDirExpr) String ¶
func (e TraverseDirExpr) String() string
type TraverseFile ¶
type TraverseFile struct {
OpticTypeExpr
Perm os.FileMode
BufSize int
}
func (TraverseFile) Short ¶
func (e TraverseFile) Short() string
func (TraverseFile) String ¶
func (e TraverseFile) String() string
type TraverseMembers ¶
type TraverseMembers struct {
OpticTypeExpr
}
func (TraverseMembers) Short ¶
func (e TraverseMembers) Short() string
func (TraverseMembers) String ¶
func (e TraverseMembers) String() string
type TraverseTreeChildrenExpr ¶
type TraverseTreeChildrenExpr struct {
OpticTypeExpr
IxMatch OpticExpression
I reflect.Type
A reflect.Type
}
func (TraverseTreeChildrenExpr) Short ¶
func (e TraverseTreeChildrenExpr) Short() string
func (TraverseTreeChildrenExpr) String ¶
func (e TraverseTreeChildrenExpr) String() string
type TreeMerge ¶
type TreeMerge struct {
OpticTypeExpr
Children OpticExpression
ChildrenSeq OpticExpression
}
type TreeOp ¶
type TreeOp struct {
OpticTypeExpr
Children OpticExpression
Op OpticExpression
}
type TupleDup ¶
type TupleDup struct {
OpticTypeExpr
N int
}
type TupleElement ¶
type TupleElement struct {
OpticTypeExpr
Index int
}
func (TupleElement) Short ¶
func (e TupleElement) Short() string
func (TupleElement) String ¶
func (e TupleElement) String() string
type TupleOf ¶
type TupleOf struct {
OpticTypeExpr
Elements []OpticExpression
}
type UnaryExpr ¶
type UnaryExpr struct {
OpticTypeExpr
Op string
}
type Value ¶
type Value struct {
OpticTypeExpr
Value any
}
type Var ¶
type Var struct {
OpticTypeExpr
Name string
}
type WithChildPath ¶
type WithChildPath struct {
OpticTypeExpr
Optic OpticExpression
I reflect.Type
A reflect.Type
}
func (WithChildPath) Short ¶
func (e WithChildPath) Short() string
func (WithChildPath) String ¶
func (e WithChildPath) String() string
type WithComprehension ¶
type WithComprehension struct {
OpticTypeExpr
Optic OpticExpression
}
func (WithComprehension) Short ¶
func (e WithComprehension) Short() string
func (WithComprehension) String ¶
func (e WithComprehension) String() string
type WithEither ¶
type WithEither struct {
OpticTypeExpr
P reflect.Type
Optic OpticExpression
}
func (WithEither) Short ¶
func (e WithEither) Short() string
func (WithEither) String ¶
func (e WithEither) String() string
type WithFunc ¶
type WithFunc struct {
OpticTypeExpr
P reflect.Type
Optic OpticExpression
}
type WithIndex ¶
type WithIndex struct {
OpticTypeExpr
Optic OpticExpression
}
type WithMetrics ¶
type WithMetrics struct {
OpticTypeExpr
Optic OpticExpression
}
func (WithMetrics) Short ¶
func (e WithMetrics) Short() string
func (WithMetrics) String ¶
func (e WithMetrics) String() string
type WithOption ¶
type WithOption struct {
OpticTypeExpr
Optic OpticExpression
}
func (WithOption) Short ¶
func (e WithOption) Short() string
func (WithOption) String ¶
func (e WithOption) String() string
type WithPanic ¶
type WithPanic struct {
OpticTypeExpr
Optic OpticExpression
}
type WithValidation ¶
type WithValidation struct {
OpticTypeExpr
V reflect.Type
Optic OpticExpression
}
func (WithValidation) Short ¶
func (e WithValidation) Short() string
func (WithValidation) String ¶
func (e WithValidation) String() string
type WithVar ¶
type WithVar struct {
OpticTypeExpr
WithVar OpticExpression
Name string
Value OpticExpression
}
Click to show internal directories.
Click to hide internal directories.