Versions in this module Expand all Collapse all v1 v1.1.0 Sep 8, 2026 v1.0.0 Aug 26, 2026 Changes in this version + type AuthorizeFunc func(context.Context, Capability) bool + type Bounds struct + MaxCanonicalBytes int + MaxCost int + MaxCursorBytes int + MaxErrors int + MaxFields int + MaxFilterDepth int + MaxFilterNodes int + MaxIncludeDepth int + MaxIncludes int + MaxMembership int + MaxPageSize int + MaxRequestBytes int + MaxSorts int + MaxStringBytes int + MaxValues int + type Capability struct + Kind CapabilityKind + Name string + type CapabilityKind string + const CapabilityField + const CapabilityFilter + const CapabilityRelationship + const CapabilitySort + type CompileOptions struct + Authorize AuthorizeFunc + CursorDecoder CursorDecoder + MandatoryConstraints []Constraint + type Constraint struct + Name string + Protected bool + Value Value + type CursorDecoder interface + DecodeCursor func(context.Context, string, string, []SortTerm) (CursorState, error) + type CursorDirection string + const CursorBackward + const CursorForward + type CursorState struct + Direction CursorDirection + Policy string + Positions []Value + type Direction string + const Ascending + const Descending + type ErrorCode string + const CodeAuthorization + const CodeConflict + const CodeCostLimit + const CodeCursorFailure + const CodeInvalidElement + const CodeLimitExceeded + const CodeUnsupported + const CodeVersionMismatch + type FieldDefinition struct + Cost int + Default bool + Deprecated bool + Name string + Required bool + Type ValueType + type FilterDefinition struct + AllowEmpty bool + Cost int + Deprecated bool + Name string + Nullable bool + Operators []Operator + Protected bool + Type ValueType + type FilterExpr struct + Children []FilterExpr + Logic Logic + Predicate *Predicate + type Logic string + const LogicAnd + const LogicNot + const LogicOr + type NullOrder string + const NullsFirst + const NullsLast + type Operator string + const OpBetween + const OpContains + const OpEndsWith + const OpEqual + const OpGreater + const OpGreaterOrEqual + const OpIn + const OpIsNull + const OpLess + const OpLessOrEqual + const OpNotEqual + const OpNotIn + const OpStartsWith + type Optional struct + func Present[T any](value T) Optional[T] + func (o Optional[T]) IsPresent() bool + func (o Optional[T]) Value() (T, bool) + type PageMode string + const PageCursor + const PageNone + const PageOffset + type PageRequest struct + After string + Before string + Mode PageMode + Offset int + Size int + type PaginationDefinition struct + Cursor bool + DefaultPageSize int + MaxOffset int + Offset bool + type Plan struct + func Compile(ctx context.Context, schema *Schema, request Request, options CompileOptions) (*Plan, error) + func (p *Plan) Canonical() ([]byte, error) + func (p *Plan) Cost() int + func (p *Plan) Cursor() *CursorState + func (p *Plan) ExecutionFields() []string + func (p *Plan) Filter() *FilterExpr + func (p *Plan) Includes() []string + func (p *Plan) MandatoryConstraints() []Constraint + func (p *Plan) Page() PageRequest + func (p *Plan) Resource() string + func (p *Plan) ResponseFields() []string + func (p *Plan) SchemaRevision() string + func (p *Plan) Sorts() []SortTerm + type Predicate struct + Name string + Operator Operator + Values []Value + type RelationshipDefinition struct + Cost int + Name string + Relationships []RelationshipDefinition + Resource string + type Request struct + Fields Optional[[]string] + Filter *FilterExpr + Includes Optional[[]string] + Page PageRequest + SchemaRevision Optional[string] + Sorts Optional[[]SortTerm] + type Schema struct + func NewSchema(config SchemaConfig) (*Schema, error) + func (s *Schema) Bounds() Bounds + type SchemaConfig struct + AllowedLogic []Logic + Bounds Bounds + DefaultSort []SortTerm + Fields []FieldDefinition + Filters []FilterDefinition + Pagination PaginationDefinition + Relationships []RelationshipDefinition + Resource string + Revision string + Sorts []SortDefinition + type SortDefinition struct + Cost int + Name string + Nulls NullOrder + TieBreaker bool + Type ValueType + type SortTerm struct + Direction Direction + Name string + Nulls NullOrder + type Value struct + func BoolValue(value bool) Value + func BytesValue(value []byte) Value + func FloatValue(value float64) Value + func IntValue(value int64) Value + func NullValue() Value + func StringValue(value string) Value + func TimeValue(value time.Time) Value + func UintValue(value uint64) Value + func (v *Value) UnmarshalJSON(data []byte) error + func (v Value) MarshalJSON() ([]byte, error) + func (v Value) String() string + func (v Value) Type() ValueType + type ValueType string + const TypeBool + const TypeBytes + const TypeFloat + const TypeInt + const TypeNull + const TypeString + const TypeTime + const TypeUint + type Violation struct + Code ErrorCode + Message string + Path string + type Violations struct + func (v *Violations) Error() string + func (v *Violations) Items() []Violation