Documentation
¶
Index ¶
- type Argument
- type ID
- func (id *ID) Append(ret *ast.Type, field string, view string, mod *Module, tainted bool, nth int, ...) *ID
- func (id *ID) Args() []*Argument
- func (id *ID) Call() *callpbv1.Call
- func (id *ID) Decode(str string) error
- func (id *ID) Digest() digest.Digest
- func (id *ID) Display() string
- func (id *ID) DisplaySelf() string
- func (id *ID) Encode() (string, error)
- func (id *ID) Field() string
- func (id *ID) FromAnyPB(data *anypb.Any) error
- func (id *ID) Inputs() ([]digest.Digest, error)
- func (id *ID) IsTainted() bool
- func (id ID) MarshalJSON() ([]byte, error)
- func (id *ID) Module() *Module
- func (id *ID) Modules() []*Module
- func (id *ID) Nth() int64
- func (id *ID) Path() string
- func (id *ID) Receiver() *ID
- func (id *ID) SelectNth(nth int) *ID
- func (id *ID) ToProto() (*callpbv1.DAG, error)
- func (id *ID) Type() *Type
- func (id *ID) UnmarshalJSON(data []byte) error
- func (id *ID) View() string
- func (id *ID) WithMetadata(customDigest digest.Digest, tainted bool) *ID
- type Literal
- type LiteralBool
- type LiteralEnum
- type LiteralFloat
- type LiteralID
- type LiteralInt
- type LiteralList
- func (lit *LiteralList) Display() string
- func (lit *LiteralList) Inputs() ([]digest.Digest, error)
- func (lit *LiteralList) Len() int
- func (lit *LiteralList) Modules() []*Module
- func (lit *LiteralList) Range(fn func(int, Literal) error) error
- func (lit *LiteralList) Tainted() bool
- func (lit *LiteralList) ToAST() *ast.Value
- func (lit *LiteralList) ToInput() any
- type LiteralNull
- type LiteralObject
- func (lit *LiteralObject) Display() string
- func (lit *LiteralObject) Inputs() ([]digest.Digest, error)
- func (lit *LiteralObject) Len() int
- func (lit *LiteralObject) Modules() []*Module
- func (lit *LiteralObject) Range(fn func(int, string, Literal) error) error
- func (lit *LiteralObject) Tainted() bool
- func (lit *LiteralObject) ToAST() *ast.Value
- func (lit *LiteralObject) ToInput() any
- type LiteralPrimitiveType
- func (lit *LiteralPrimitiveType[T, V]) Display() string
- func (lit *LiteralPrimitiveType[T, V]) Inputs() ([]digest.Digest, error)
- func (lit *LiteralPrimitiveType[T, V]) Modules() []*Module
- func (lit *LiteralPrimitiveType[T, V]) Tainted() bool
- func (lit *LiteralPrimitiveType[T, V]) ToAST() *ast.Value
- func (lit *LiteralPrimitiveType[T, V]) ToInput() any
- func (lit *LiteralPrimitiveType[T, V]) Value() T
- type LiteralString
- type Literate
- type Module
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Argument ¶
type Argument struct {
// contains filtered or unexported fields
}
type ID ¶
type ID struct {
// contains filtered or unexported fields
}
ID represents a GraphQL value of a certain type, constructed by evaluating its contained pipeline. In other words, it represents a constructor-addressed value, which may be an object, an array, or a scalar value.
It may be binary=>base64-encoded to be used as a GraphQL ID value for objects. Alternatively it may be stored in a database and referred to via an RFC-6920 ni://sha-256;... URI.
This type wraps the underlying proto DAG+Call types in order to enforce immutability of its fields and give it a name more appropriate for how it's used in the context of dagql + the engine.
IDs are immutable from the consumer's perspective. Rather than mutating an ID, methods on ID can be used to create a new ID on top of an existing (immutable) Receiver ID (e.g. Append, SelectNth, etc.).
func (*ID) Args ¶
GraphQL field arguments, always in alphabetical order. NOTE: use with caution, any inplace writes to elements of the returned slice can corrupt the ID
func (*ID) Call ¶ added in v0.11.0
The root Call of the ID, with its Digest set. Exposed so that Calls can be streamed over the wire one-by-one, rather than emitting full DAGs, which would involve a ton of duplication.
WARRANTY VOID IF MUTATIONS ARE MADE TO THE INNER PROTOBUF. Perform a proto.Clone before mutating.
func (*ID) Digest ¶
func (id *ID) Digest() digest.Digest
Digest returns the digest of the encoded ID. It does NOT canonicalize the ID first.
func (*ID) DisplaySelf ¶
func (*ID) IsTainted ¶
Tainted returns true if the ID contains any tainted selectors. If true, this Selector is not reproducible.
func (ID) MarshalJSON ¶ added in v0.12.0
func (*ID) Nth ¶
If the field returns a list, this is the index of the element to select. Note that this defaults to zero, which means there is no selection of an element in the list. Non-zero indexes are 1-based.
func (*ID) Receiver ¶ added in v0.12.1
The ID of the object that the field selection will be evaluated against.
If nil, the root Query object is implied.
func (*ID) SelectNth ¶
Return a new ID that's the selection of the nth element of the return value of the existing ID. The new digest is derived from the existing ID's digest and the nth index.
func (*ID) UnmarshalJSON ¶ added in v0.12.0
func (*ID) WithMetadata ¶ added in v0.15.3
Return a new ID that's the same as before except with the given metadata changed. customDigest, if not empty string, will become the ID's digest. tainted sets the ID's tainted flag.
type Literal ¶
type LiteralBool ¶
type LiteralBool = LiteralPrimitiveType[bool, *callpbv1.Literal_Bool]
func NewLiteralBool ¶
func NewLiteralBool(val bool) *LiteralBool
type LiteralEnum ¶
type LiteralEnum = LiteralPrimitiveType[string, *callpbv1.Literal_Enum]
func NewLiteralEnum ¶
func NewLiteralEnum(val string) *LiteralEnum
type LiteralFloat ¶
type LiteralFloat = LiteralPrimitiveType[float64, *callpbv1.Literal_Float]
func NewLiteralFloat ¶
func NewLiteralFloat(val float64) *LiteralFloat
type LiteralID ¶
type LiteralID struct {
// contains filtered or unexported fields
}
func NewLiteralID ¶
type LiteralInt ¶
type LiteralInt = LiteralPrimitiveType[int64, *callpbv1.Literal_Int]
func NewLiteralInt ¶
func NewLiteralInt(val int64) *LiteralInt
type LiteralList ¶
type LiteralList struct {
// contains filtered or unexported fields
}
func NewLiteralList ¶
func NewLiteralList(values ...Literal) *LiteralList
func (*LiteralList) Display ¶
func (lit *LiteralList) Display() string
func (*LiteralList) Inputs ¶
func (lit *LiteralList) Inputs() ([]digest.Digest, error)
func (*LiteralList) Len ¶ added in v0.15.3
func (lit *LiteralList) Len() int
func (*LiteralList) Modules ¶
func (lit *LiteralList) Modules() []*Module
func (*LiteralList) Tainted ¶
func (lit *LiteralList) Tainted() bool
func (*LiteralList) ToAST ¶
func (lit *LiteralList) ToAST() *ast.Value
func (*LiteralList) ToInput ¶
func (lit *LiteralList) ToInput() any
type LiteralNull ¶
type LiteralNull = LiteralPrimitiveType[any, *callpbv1.Literal_Null]
func NewLiteralNull ¶
func NewLiteralNull() *LiteralNull
type LiteralObject ¶
type LiteralObject struct {
// contains filtered or unexported fields
}
func NewLiteralObject ¶
func NewLiteralObject(values ...*Argument) *LiteralObject
func (*LiteralObject) Display ¶
func (lit *LiteralObject) Display() string
func (*LiteralObject) Inputs ¶
func (lit *LiteralObject) Inputs() ([]digest.Digest, error)
func (*LiteralObject) Len ¶ added in v0.15.3
func (lit *LiteralObject) Len() int
func (*LiteralObject) Modules ¶
func (lit *LiteralObject) Modules() []*Module
func (*LiteralObject) Tainted ¶
func (lit *LiteralObject) Tainted() bool
func (*LiteralObject) ToAST ¶
func (lit *LiteralObject) ToAST() *ast.Value
func (*LiteralObject) ToInput ¶
func (lit *LiteralObject) ToInput() any
type LiteralPrimitiveType ¶
type LiteralPrimitiveType[T comparable, V callpbv1.LiteralValue[T]] struct { // contains filtered or unexported fields }
func (*LiteralPrimitiveType[T, V]) Display ¶
func (lit *LiteralPrimitiveType[T, V]) Display() string
func (*LiteralPrimitiveType[T, V]) Inputs ¶
func (lit *LiteralPrimitiveType[T, V]) Inputs() ([]digest.Digest, error)
func (*LiteralPrimitiveType[T, V]) Modules ¶
func (lit *LiteralPrimitiveType[T, V]) Modules() []*Module
func (*LiteralPrimitiveType[T, V]) Tainted ¶
func (lit *LiteralPrimitiveType[T, V]) Tainted() bool
func (*LiteralPrimitiveType[T, V]) ToAST ¶
func (lit *LiteralPrimitiveType[T, V]) ToAST() *ast.Value
func (*LiteralPrimitiveType[T, V]) ToInput ¶
func (lit *LiteralPrimitiveType[T, V]) ToInput() any
func (*LiteralPrimitiveType[T, V]) Value ¶
func (lit *LiteralPrimitiveType[T, V]) Value() T
type LiteralString ¶
type LiteralString = LiteralPrimitiveType[string, *callpbv1.Literal_String_]
func NewLiteralString ¶
func NewLiteralString(val string) *LiteralString