Documentation
¶
Index ¶
- Variables
- type Argument
- type Call
- func (call *Call) Decode(str string) error
- func (*Call) Descriptor() ([]byte, []int)deprecated
- func (call *Call) Encode() (string, error)
- func (x *Call) GetArgs() []*Argument
- func (x *Call) GetDigest() string
- func (x *Call) GetField() string
- func (x *Call) GetMeta() bool
- func (x *Call) GetModule() *Module
- func (x *Call) GetNth() int64
- func (x *Call) GetReceiverDigest() string
- func (x *Call) GetTainted() bool
- func (x *Call) GetType() *Type
- func (x *Call) GetView() string
- func (*Call) ProtoMessage()
- func (x *Call) ProtoReflect() protoreflect.Message
- func (x *Call) Reset()
- func (x *Call) String() string
- type DAG
- type List
- type Literal
- func (*Literal) Descriptor() ([]byte, []int)deprecated
- func (x *Literal) GetBool() bool
- func (x *Literal) GetCallDigest() string
- func (x *Literal) GetEnum() string
- func (x *Literal) GetFloat() float64
- func (x *Literal) GetInt() int64
- func (x *Literal) GetList() *List
- func (x *Literal) GetNull() bool
- func (x *Literal) GetObject() *Object
- func (x *Literal) GetString_() string
- func (m *Literal) GetValue() isLiteral_Value
- func (*Literal) ProtoMessage()
- func (x *Literal) ProtoReflect() protoreflect.Message
- func (x *Literal) Reset()
- func (x *Literal) String() string
- type LiteralValue
- type Literal_Bool
- type Literal_CallDigest
- type Literal_Enum
- type Literal_Float
- type Literal_Int
- type Literal_List
- type Literal_Null
- type Literal_Object
- type Literal_String_
- type Module
- func (*Module) Descriptor() ([]byte, []int)deprecated
- func (x *Module) GetCallDigest() string
- func (x *Module) GetName() string
- func (x *Module) GetPin() string
- func (x *Module) GetRef() string
- func (*Module) ProtoMessage()
- func (x *Module) ProtoReflect() protoreflect.Message
- func (x *Module) Reset()
- func (x *Module) String() string
- type Object
- type Type
- func (*Type) Descriptor() ([]byte, []int)deprecated
- func (x *Type) GetElem() *Type
- func (x *Type) GetNamedType() string
- func (x *Type) GetNonNull() bool
- func (*Type) ProtoMessage()
- func (x *Type) ProtoReflect() protoreflect.Message
- func (x *Type) Reset()
- func (x *Type) String() string
- func (t *Type) ToAST() *ast.Type
Constants ¶
This section is empty.
Variables ¶
var File_call_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Argument ¶
type Argument struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Value *Literal `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
// contains filtered or unexported fields
}
A named value passed to a GraphQL field or contained in an input object.
func (*Argument) Descriptor
deprecated
func (*Argument) ProtoMessage ¶
func (*Argument) ProtoMessage()
func (*Argument) ProtoReflect ¶
func (x *Argument) ProtoReflect() protoreflect.Message
type Call ¶
type Call struct {
// The receiving object for the Call's field selection. If specified, this is
// the digest of the Call that returns the receiver. If not specified, Query
// is implied.
ReceiverDigest string `protobuf:"bytes,1,opt,name=receiverDigest,proto3" json:"receiverDigest,omitempty"`
// The GraphQL type of the call's return value.
Type *Type `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
// The GraphQL field name to select.
Field string `protobuf:"bytes,3,opt,name=field,proto3" json:"field,omitempty"`
// The arguments to pass to the GraphQL field selection. The order matters;
// if it changes, the digest changes. For optimal readability hese should
// ideally be in the order defined in the schema.
Args []*Argument `protobuf:"bytes,4,rep,name=args,proto3" json:"args,omitempty"`
// If true, this Call is not reproducible; repeated evaluations may return
// different values.
Tainted bool `protobuf:"varint,5,opt,name=tainted,proto3" json:"tainted,omitempty"`
// If true, this Call may be omitted from the DAG without changing
// the final result.
//
// This may be used to prevent meta-queries from busting cache keys when
// desired, if Calls are used as a cache key for persistence.
//
// It is worth noting that we don't store meta information at this level and
// continue to force metadata to be set via GraphQL queries. It makes Calls
// always easy to evaluate.
Meta bool `protobuf:"varint,6,opt,name=meta,proto3" json:"meta,omitempty"`
// If the field selection returns a list, this is the index of the element to
// return from the Call. This value is 1-indexed, hence being call nth (1st,
// not 0th). At the same time that this is set, the Call's Type must also be
// changed to its Elem. If the type does not have an Elem.
//
// Here we're teetering dangerously close to full blown attribute path
// selection, but we're intentionally limiting ourselves instead to cover
// only the common case of returning a list of objects. The only case not
// handled is a nested list. Don't do that; return a list of typed values
// instead.
Nth int64 `protobuf:"varint,7,opt,name=nth,proto3" json:"nth,omitempty"`
// The module that provides the implementation of the field.
//
// The actual usage of this is opaque to the protocol. In Dagger this is
// the module providing the implementation of the field.
Module *Module `protobuf:"bytes,8,opt,name=module,proto3" json:"module,omitempty"`
// A unique digest of this Call. Note that this must not be set when
// calculating the Call's digest.
Digest string `protobuf:"bytes,9,opt,name=digest,proto3" json:"digest,omitempty"`
// The view that this call was made in. Since a graphql server may present
// slightly different views depending on the specified view, to be able to
// evaluate calls wherever, we need to track which view the call was actually
// called in.
View string `protobuf:"bytes,10,opt,name=view,proto3" json:"view,omitempty"`
// contains filtered or unexported fields
}
Call represents a function call, including all inputs necessary to call it again, a hint as to whether you can expect the same result, and the GraphQL return type for runtime type checking.
In GraphQL terms, Call corresponds to a field selection against an object.
func (*Call) Descriptor
deprecated
func (*Call) GetReceiverDigest ¶
func (*Call) GetTainted ¶
func (*Call) ProtoMessage ¶
func (*Call) ProtoMessage()
func (*Call) ProtoReflect ¶
func (x *Call) ProtoReflect() protoreflect.Message
type DAG ¶
type DAG struct {
// The digest of the Call representing the "root" of the DAG. All other Calls
// in this message are referenced through the root Call's receiver, args or
// module.
RootDigest string `protobuf:"bytes,1,opt,name=rootDigest,proto3" json:"rootDigest,omitempty"`
// Map of Call digests to the Calls they represent. This structure
// allows us to deduplicate occurrences of the same Call in the DAG.
CallsByDigest map[string]*Call `` /* 167-byte string literal not displayed */
// contains filtered or unexported fields
}
DAG represents a GraphQL value of a certain type, constructed by evaluating its contained DAG of Calls. 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.
func (*DAG) Descriptor
deprecated
func (*DAG) GetCallsByDigest ¶
func (*DAG) GetRootDigest ¶
func (*DAG) ProtoMessage ¶
func (*DAG) ProtoMessage()
func (*DAG) ProtoReflect ¶
func (x *DAG) ProtoReflect() protoreflect.Message
type List ¶
type List struct {
Values []*Literal `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
// contains filtered or unexported fields
}
A list of values.
func (*List) Descriptor
deprecated
func (*List) ProtoMessage ¶
func (*List) ProtoMessage()
func (*List) ProtoReflect ¶
func (x *List) ProtoReflect() protoreflect.Message
type Literal ¶
type Literal struct {
// Types that are assignable to Value:
//
// *Literal_CallDigest
// *Literal_Null
// *Literal_Bool
// *Literal_Enum
// *Literal_Int
// *Literal_Float
// *Literal_String_
// *Literal_List
// *Literal_Object
Value isLiteral_Value `protobuf_oneof:"value"`
// contains filtered or unexported fields
}
A value passed to an argument or contained in a list.
func (*Literal) Descriptor
deprecated
func (*Literal) GetCallDigest ¶
func (*Literal) GetString_ ¶
func (*Literal) ProtoMessage ¶
func (*Literal) ProtoMessage()
func (*Literal) ProtoReflect ¶
func (x *Literal) ProtoReflect() protoreflect.Message
type LiteralValue ¶
type LiteralValue[T comparable] interface { Value() T ASTKind() ast.ValueKind // contains filtered or unexported methods }
type Literal_Bool ¶
type Literal_Bool struct {
Bool bool `protobuf:"varint,3,opt,name=bool,proto3,oneof"`
}
func (*Literal_Bool) ASTKind ¶
func (pbLit *Literal_Bool) ASTKind() ast.ValueKind
func (*Literal_Bool) Value ¶
func (pbLit *Literal_Bool) Value() bool
type Literal_CallDigest ¶
type Literal_CallDigest struct {
CallDigest string `protobuf:"bytes,1,opt,name=callDigest,proto3,oneof"`
}
type Literal_Enum ¶
type Literal_Enum struct {
Enum string `protobuf:"bytes,4,opt,name=enum,proto3,oneof"`
}
func (*Literal_Enum) ASTKind ¶
func (pbLit *Literal_Enum) ASTKind() ast.ValueKind
func (*Literal_Enum) Value ¶
func (pbLit *Literal_Enum) Value() string
type Literal_Float ¶
type Literal_Float struct {
Float float64 `protobuf:"fixed64,6,opt,name=float,proto3,oneof"`
}
func (*Literal_Float) ASTKind ¶
func (pbLit *Literal_Float) ASTKind() ast.ValueKind
func (*Literal_Float) Value ¶
func (pbLit *Literal_Float) Value() float64
type Literal_Int ¶
type Literal_Int struct {
Int int64 `protobuf:"varint,5,opt,name=int,proto3,oneof"`
}
func (*Literal_Int) ASTKind ¶
func (pbLit *Literal_Int) ASTKind() ast.ValueKind
func (*Literal_Int) Value ¶
func (pbLit *Literal_Int) Value() int64
type Literal_List ¶
type Literal_List struct {
List *List `protobuf:"bytes,8,opt,name=list,proto3,oneof"`
}
type Literal_Null ¶
type Literal_Null struct {
Null bool `protobuf:"varint,2,opt,name=null,proto3,oneof"`
}
func (*Literal_Null) ASTKind ¶
func (pbLit *Literal_Null) ASTKind() ast.ValueKind
func (*Literal_Null) Value ¶
func (pbLit *Literal_Null) Value() any
type Literal_Object ¶
type Literal_Object struct {
Object *Object `protobuf:"bytes,9,opt,name=object,proto3,oneof"`
}
type Literal_String_ ¶
type Literal_String_ struct {
String_ string `protobuf:"bytes,7,opt,name=string,proto3,oneof"`
}
func (*Literal_String_) ASTKind ¶
func (pbLit *Literal_String_) ASTKind() ast.ValueKind
func (*Literal_String_) Value ¶
func (pbLit *Literal_String_) Value() string
type Module ¶
type Module struct {
// The digest of the Call that provides the module.
CallDigest string `protobuf:"bytes,1,opt,name=callDigest,proto3" json:"callDigest,omitempty"`
// The name of the module.
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// A human-readable ref which may be interpreted by an external system to
// yield the same module.
Ref string `protobuf:"bytes,3,opt,name=ref,proto3" json:"ref,omitempty"`
// The pinned version of the module.
Pin string `protobuf:"bytes,4,opt,name=pin,proto3" json:"pin,omitempty"`
// contains filtered or unexported fields
}
Module represents a self-contained logical module that can be dynamically loaded to evaluate an Call that uses it. The details of this task are not defined at the protocol layer.
func (*Module) Descriptor
deprecated
func (*Module) GetCallDigest ¶
func (*Module) ProtoMessage ¶
func (*Module) ProtoMessage()
func (*Module) ProtoReflect ¶
func (x *Module) ProtoReflect() protoreflect.Message
type Object ¶
type Object struct {
Values []*Argument `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
// contains filtered or unexported fields
}
A series of named values.
func (*Object) Descriptor
deprecated
func (*Object) ProtoMessage ¶
func (*Object) ProtoMessage()
func (*Object) ProtoReflect ¶
func (x *Object) ProtoReflect() protoreflect.Message
type Type ¶
type Type struct {
NamedType string `protobuf:"bytes,1,opt,name=namedType,proto3" json:"namedType,omitempty"`
Elem *Type `protobuf:"bytes,2,opt,name=elem,proto3" json:"elem,omitempty"`
NonNull bool `protobuf:"varint,3,opt,name=nonNull,proto3" json:"nonNull,omitempty"`
// contains filtered or unexported fields
}
A GraphQL type reference.
func (*Type) Descriptor
deprecated
func (*Type) GetNamedType ¶
func (*Type) GetNonNull ¶
func (*Type) ProtoMessage ¶
func (*Type) ProtoMessage()
func (*Type) ProtoReflect ¶
func (x *Type) ProtoReflect() protoreflect.Message