callpbv1

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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) Descriptor() ([]byte, []int)

Deprecated: Use Argument.ProtoReflect.Descriptor instead.

func (*Argument) GetName

func (x *Argument) GetName() string

func (*Argument) GetValue

func (x *Argument) GetValue() *Literal

func (*Argument) ProtoMessage

func (*Argument) ProtoMessage()

func (*Argument) ProtoReflect

func (x *Argument) ProtoReflect() protoreflect.Message

func (*Argument) Reset

func (x *Argument) Reset()

func (*Argument) String

func (x *Argument) String() string

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"`
	// 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) Decode added in v0.11.0

func (call *Call) Decode(str string) error

func (*Call) Descriptor deprecated

func (*Call) Descriptor() ([]byte, []int)

Deprecated: Use Call.ProtoReflect.Descriptor instead.

func (*Call) Encode added in v0.11.0

func (call *Call) Encode() (string, error)

func (*Call) GetArgs

func (x *Call) GetArgs() []*Argument

func (*Call) GetDigest

func (x *Call) GetDigest() string

func (*Call) GetField

func (x *Call) GetField() string

func (*Call) GetMeta

func (x *Call) GetMeta() bool

func (*Call) GetModule

func (x *Call) GetModule() *Module

func (*Call) GetNth

func (x *Call) GetNth() int64

func (*Call) GetReceiverDigest

func (x *Call) GetReceiverDigest() string

func (*Call) GetTainted

func (x *Call) GetTainted() bool

func (*Call) GetType

func (x *Call) GetType() *Type

func (*Call) ProtoMessage

func (*Call) ProtoMessage()

func (*Call) ProtoReflect

func (x *Call) ProtoReflect() protoreflect.Message

func (*Call) Reset

func (x *Call) Reset()

func (*Call) String

func (x *Call) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use DAG.ProtoReflect.Descriptor instead.

func (*DAG) GetCallsByDigest

func (x *DAG) GetCallsByDigest() map[string]*Call

func (*DAG) GetRootDigest

func (x *DAG) GetRootDigest() string

func (*DAG) ProtoMessage

func (*DAG) ProtoMessage()

func (*DAG) ProtoReflect

func (x *DAG) ProtoReflect() protoreflect.Message

func (*DAG) Reset

func (x *DAG) Reset()

func (*DAG) String

func (x *DAG) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use List.ProtoReflect.Descriptor instead.

func (*List) GetValues

func (x *List) GetValues() []*Literal

func (*List) ProtoMessage

func (*List) ProtoMessage()

func (*List) ProtoReflect

func (x *List) ProtoReflect() protoreflect.Message

func (*List) Reset

func (x *List) Reset()

func (*List) String

func (x *List) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Literal.ProtoReflect.Descriptor instead.

func (*Literal) GetBool

func (x *Literal) GetBool() bool

func (*Literal) GetCallDigest

func (x *Literal) GetCallDigest() string

func (*Literal) GetEnum

func (x *Literal) GetEnum() string

func (*Literal) GetFloat

func (x *Literal) GetFloat() float64

func (*Literal) GetInt

func (x *Literal) GetInt() int64

func (*Literal) GetList

func (x *Literal) GetList() *List

func (*Literal) GetNull

func (x *Literal) GetNull() bool

func (*Literal) GetObject

func (x *Literal) GetObject() *Object

func (*Literal) GetString_

func (x *Literal) GetString_() string

func (*Literal) GetValue

func (m *Literal) GetValue() isLiteral_Value

func (*Literal) ProtoMessage

func (*Literal) ProtoMessage()

func (*Literal) ProtoReflect

func (x *Literal) ProtoReflect() protoreflect.Message

func (*Literal) Reset

func (x *Literal) Reset()

func (*Literal) String

func (x *Literal) String() string

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"`
	// 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) Descriptor() ([]byte, []int)

Deprecated: Use Module.ProtoReflect.Descriptor instead.

func (*Module) GetCallDigest

func (x *Module) GetCallDigest() string

func (*Module) GetName

func (x *Module) GetName() string

func (*Module) GetRef

func (x *Module) GetRef() string

func (*Module) ProtoMessage

func (*Module) ProtoMessage()

func (*Module) ProtoReflect

func (x *Module) ProtoReflect() protoreflect.Message

func (*Module) Reset

func (x *Module) Reset()

func (*Module) String

func (x *Module) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Object.ProtoReflect.Descriptor instead.

func (*Object) GetValues

func (x *Object) GetValues() []*Argument

func (*Object) ProtoMessage

func (*Object) ProtoMessage()

func (*Object) ProtoReflect

func (x *Object) ProtoReflect() protoreflect.Message

func (*Object) Reset

func (x *Object) Reset()

func (*Object) String

func (x *Object) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Type.ProtoReflect.Descriptor instead.

func (*Type) GetElem

func (x *Type) GetElem() *Type

func (*Type) GetNamedType

func (x *Type) GetNamedType() string

func (*Type) GetNonNull

func (x *Type) GetNonNull() bool

func (*Type) ProtoMessage

func (*Type) ProtoMessage()

func (*Type) ProtoReflect

func (x *Type) ProtoReflect() protoreflect.Message

func (*Type) Reset

func (x *Type) Reset()

func (*Type) String

func (x *Type) String() string

func (*Type) ToAST

func (t *Type) ToAST() *ast.Type

Jump to

Keyboard shortcuts

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