pbgraphql

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_sf_graphql_v1_graphql_proto protoreflect.FileDescriptor
View Source
var GraphQL_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "sf.graphql.v1.GraphQL",
	HandlerType: (*GraphQLServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Execute",
			Handler:       _GraphQL_Execute_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "sf/graphql/v1/graphql.proto",
}

GraphQL_ServiceDesc is the grpc.ServiceDesc for GraphQL service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterGraphQLServer

func RegisterGraphQLServer(s grpc.ServiceRegistrar, srv GraphQLServer)

Types

type BlockCursor

type BlockCursor struct {
	Ver      int32  `protobuf:"varint,1,opt,name=ver,proto3" json:"ver,omitempty"`
	BlockNum uint64 `protobuf:"varint,2,opt,name=blockNum,proto3" json:"blockNum,omitempty"`
	BlockId  string `protobuf:"bytes,3,opt,name=blockId,proto3" json:"blockId,omitempty"`
	// contains filtered or unexported fields
}

func (*BlockCursor) Descriptor deprecated

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

Deprecated: Use BlockCursor.ProtoReflect.Descriptor instead.

func (*BlockCursor) GetBlockId

func (x *BlockCursor) GetBlockId() string

func (*BlockCursor) GetBlockNum

func (x *BlockCursor) GetBlockNum() uint64

func (*BlockCursor) GetVer

func (x *BlockCursor) GetVer() int32

func (*BlockCursor) ProtoMessage

func (*BlockCursor) ProtoMessage()

func (*BlockCursor) ProtoReflect

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

func (*BlockCursor) Reset

func (x *BlockCursor) Reset()

func (*BlockCursor) String

func (x *BlockCursor) String() string

type Error

type Error struct {

	// Description of the error intended for the developer.
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// The source location for the error.
	Locations []*SourceLocation `protobuf:"bytes,2,rep,name=locations,proto3" json:"locations,omitempty"`
	// Path to the `null` value justified by this error.
	Path *structpb.ListValue `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"`
	// Free-form extensions (starts with a map)
	Extensions *structpb.Struct `protobuf:"bytes,4,opt,name=extensions,proto3" json:"extensions,omitempty"`
	// contains filtered or unexported fields
}

GraphQL Error

func (*Error) Descriptor deprecated

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

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetExtensions

func (x *Error) GetExtensions() *structpb.Struct

func (*Error) GetLocations

func (x *Error) GetLocations() []*SourceLocation

func (*Error) GetMessage

func (x *Error) GetMessage() string

func (*Error) GetPath

func (x *Error) GetPath() *structpb.ListValue

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

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

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type GraphQLClient

type GraphQLClient interface {
	Execute(ctx context.Context, in *Request, opts ...grpc.CallOption) (GraphQL_ExecuteClient, error)
}

GraphQLClient is the client API for GraphQL service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewGraphQLClient

func NewGraphQLClient(cc grpc.ClientConnInterface) GraphQLClient

type GraphQLServer

type GraphQLServer interface {
	Execute(*Request, GraphQL_ExecuteServer) error
}

GraphQLServer is the server API for GraphQL service. All implementations should embed UnimplementedGraphQLServer for forward compatibility

type GraphQL_ExecuteClient

type GraphQL_ExecuteClient interface {
	Recv() (*Response, error)
	grpc.ClientStream
}

type GraphQL_ExecuteServer

type GraphQL_ExecuteServer interface {
	Send(*Response) error
	grpc.ServerStream
}

type Request

type Request struct {
	Query         string           `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	Variables     *structpb.Struct `protobuf:"bytes,2,opt,name=variables,proto3" json:"variables,omitempty"`
	OperationName string           `protobuf:"bytes,3,opt,name=operationName,proto3" json:"operationName,omitempty"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetOperationName

func (x *Request) GetOperationName() string

func (*Request) GetQuery

func (x *Request) GetQuery() string

func (*Request) GetVariables

func (x *Request) GetVariables() *structpb.Struct

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

type Response struct {
	Data   string   `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	Errors []*Error `protobuf:"bytes,2,rep,name=errors,proto3" json:"errors,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetData

func (x *Response) GetData() string

func (*Response) GetErrors

func (x *Response) GetErrors() []*Error

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type SourceLocation

type SourceLocation struct {

	// The line the error occurred at.
	Line int32 `protobuf:"varint,1,opt,name=line,proto3" json:"line,omitempty"`
	// The column the error occurred at.
	Column int32 `protobuf:"varint,2,opt,name=column,proto3" json:"column,omitempty"`
	// contains filtered or unexported fields
}

The source location of an error.

func (*SourceLocation) Descriptor deprecated

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

Deprecated: Use SourceLocation.ProtoReflect.Descriptor instead.

func (*SourceLocation) GetColumn

func (x *SourceLocation) GetColumn() int32

func (*SourceLocation) GetLine

func (x *SourceLocation) GetLine() int32

func (*SourceLocation) ProtoMessage

func (*SourceLocation) ProtoMessage()

func (*SourceLocation) ProtoReflect

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

func (*SourceLocation) Reset

func (x *SourceLocation) Reset()

func (*SourceLocation) String

func (x *SourceLocation) String() string

type TransactionCursor

type TransactionCursor struct {
	Ver              int32  `protobuf:"varint,1,opt,name=ver,proto3" json:"ver,omitempty"`
	TransactionIndex uint32 `protobuf:"varint,2,opt,name=transactionIndex,proto3" json:"transactionIndex,omitempty"`
	TransactionHash  string `protobuf:"bytes,3,opt,name=transactionHash,proto3" json:"transactionHash,omitempty"`
	// contains filtered or unexported fields
}

func (*TransactionCursor) Descriptor deprecated

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

Deprecated: Use TransactionCursor.ProtoReflect.Descriptor instead.

func (*TransactionCursor) GetTransactionHash

func (x *TransactionCursor) GetTransactionHash() string

func (*TransactionCursor) GetTransactionIndex

func (x *TransactionCursor) GetTransactionIndex() uint32

func (*TransactionCursor) GetVer

func (x *TransactionCursor) GetVer() int32

func (*TransactionCursor) Key

func (t *TransactionCursor) Key() string

func (*TransactionCursor) ProtoMessage

func (*TransactionCursor) ProtoMessage()

func (*TransactionCursor) ProtoReflect

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

func (*TransactionCursor) Reset

func (x *TransactionCursor) Reset()

func (*TransactionCursor) String

func (x *TransactionCursor) String() string

type UnimplementedGraphQLServer

type UnimplementedGraphQLServer struct {
}

UnimplementedGraphQLServer should be embedded to have forward compatible implementations.

func (UnimplementedGraphQLServer) Execute

type UnsafeGraphQLServer

type UnsafeGraphQLServer interface {
	// contains filtered or unexported methods
}

UnsafeGraphQLServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GraphQLServer will result in compilation errors.

Jump to

Keyboard shortcuts

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