Documentation ¶
Index ¶
- Variables
- type Catch
- type DoRequest
- type DoResponse
- type Error
- func (*Error) Descriptor() ([]byte, []int)deprecated
- func (x *Error) GetCode() Error_Code
- func (x *Error) GetDetails() []*Error_Detail
- func (x *Error) GetMessage() string
- func (x *Error) GetPath() string
- func (*Error) ProtoMessage()
- func (x *Error) ProtoReflect() protoreflect.Message
- func (x *Error) Reset()
- func (x *Error) String() string
- type Error_Code
- type Error_Detail
- func (*Error_Detail) Descriptor() ([]byte, []int)deprecated
- func (x *Error_Detail) GetDebug() *structpb.Value
- func (x *Error_Detail) GetType() string
- func (x *Error_Detail) GetValue() []byte
- func (*Error_Detail) ProtoMessage()
- func (x *Error_Detail) ProtoReflect() protoreflect.Message
- func (x *Error_Detail) Reset()
- func (x *Error_Detail) String() string
- type FetchRequest
- type FetchResponse
- type ListenRequest
- type ListenResponse
- type MaskField
- func (*MaskField) Descriptor() ([]byte, []int)deprecated
- func (x *MaskField) GetCatch() *Catch
- func (x *MaskField) GetMask() []*MaskField
- func (x *MaskField) GetName() string
- func (m *MaskField) GetOnError() isMaskField_OnError
- func (x *MaskField) GetParams() *structpb.Value
- func (x *MaskField) GetThrow() *Throw
- func (*MaskField) ProtoMessage()
- func (x *MaskField) ProtoReflect() protoreflect.Message
- func (x *MaskField) Reset()
- func (x *MaskField) String() string
- type MaskField_Catch
- type MaskField_Throw
- type Request
- func (*Request) Descriptor() ([]byte, []int)deprecated
- func (x *Request) GetBody() *structpb.Value
- func (x *Request) GetCatch() *Catch
- func (x *Request) GetMask() []*MaskField
- func (x *Request) GetMethod() string
- func (m *Request) GetOnError() isRequest_OnError
- func (x *Request) GetThrow() *Throw
- func (*Request) ProtoMessage()
- func (x *Request) ProtoReflect() protoreflect.Message
- func (x *Request) Reset()
- func (x *Request) String() string
- type Request_Catch
- type Request_Throw
- type Response
- func (*Response) Descriptor() ([]byte, []int)deprecated
- func (x *Response) GetBody() *structpb.Value
- func (x *Response) GetMethod() string
- func (x *Response) GetSchema() *Schema
- func (*Response) ProtoMessage()
- func (x *Response) ProtoReflect() protoreflect.Message
- func (x *Response) Reset()
- func (x *Response) String() string
- type Schema
- type Schema_Field
- func (*Schema_Field) Descriptor() ([]byte, []int)deprecated
- func (x *Schema_Field) GetJsonName() string
- func (x *Schema_Field) GetName() string
- func (x *Schema_Field) GetType() *Schema_Field_Type
- func (*Schema_Field) ProtoMessage()
- func (x *Schema_Field) ProtoReflect() protoreflect.Message
- func (x *Schema_Field) Reset()
- func (x *Schema_Field) String() string
- type Schema_Field_Type
- func (*Schema_Field_Type) Descriptor() ([]byte, []int)deprecated
- func (x *Schema_Field_Type) GetMap() *Schema_Field_Type_MapType
- func (x *Schema_Field_Type) GetMessage() *Schema
- func (x *Schema_Field_Type) GetRepeated() *Schema_Field_Type_RepeatedType
- func (x *Schema_Field_Type) GetScalar() Schema_Field_Type_ScalarType
- func (m *Schema_Field_Type) GetValue() isSchema_Field_Type_Value
- func (*Schema_Field_Type) ProtoMessage()
- func (x *Schema_Field_Type) ProtoReflect() protoreflect.Message
- func (x *Schema_Field_Type) Reset()
- func (x *Schema_Field_Type) String() string
- type Schema_Field_Type_Map
- type Schema_Field_Type_MapType
- func (*Schema_Field_Type_MapType) Descriptor() ([]byte, []int)deprecated
- func (x *Schema_Field_Type_MapType) GetKey() Schema_Field_Type_ScalarType
- func (x *Schema_Field_Type_MapType) GetMessage() *Schema
- func (x *Schema_Field_Type_MapType) GetScalar() Schema_Field_Type_ScalarType
- func (m *Schema_Field_Type_MapType) GetValue() isSchema_Field_Type_MapType_Value
- func (*Schema_Field_Type_MapType) ProtoMessage()
- func (x *Schema_Field_Type_MapType) ProtoReflect() protoreflect.Message
- func (x *Schema_Field_Type_MapType) Reset()
- func (x *Schema_Field_Type_MapType) String() string
- type Schema_Field_Type_MapType_Message
- type Schema_Field_Type_MapType_Scalar
- type Schema_Field_Type_Message
- type Schema_Field_Type_Repeated
- type Schema_Field_Type_RepeatedType
- func (*Schema_Field_Type_RepeatedType) Descriptor() ([]byte, []int)deprecated
- func (m *Schema_Field_Type_RepeatedType) GetElement() isSchema_Field_Type_RepeatedType_Element
- func (x *Schema_Field_Type_RepeatedType) GetMessage() *Schema
- func (x *Schema_Field_Type_RepeatedType) GetScalar() Schema_Field_Type_ScalarType
- func (*Schema_Field_Type_RepeatedType) ProtoMessage()
- func (x *Schema_Field_Type_RepeatedType) ProtoReflect() protoreflect.Message
- func (x *Schema_Field_Type_RepeatedType) Reset()
- func (x *Schema_Field_Type_RepeatedType) String() string
- type Schema_Field_Type_RepeatedType_Message
- type Schema_Field_Type_RepeatedType_Scalar
- type Schema_Field_Type_Scalar
- type Schema_Field_Type_ScalarType
- func (Schema_Field_Type_ScalarType) Descriptor() protoreflect.EnumDescriptor
- func (x Schema_Field_Type_ScalarType) Enum() *Schema_Field_Type_ScalarType
- func (Schema_Field_Type_ScalarType) EnumDescriptor() ([]byte, []int)deprecated
- func (x Schema_Field_Type_ScalarType) Number() protoreflect.EnumNumber
- func (x Schema_Field_Type_ScalarType) String() string
- func (Schema_Field_Type_ScalarType) Type() protoreflect.EnumType
- type Throw
Constants ¶
This section is empty.
Variables ¶
var ( Schema_Field_Type_ScalarType_name = map[int32]string{ 0: "SCALAR_TYPE_UNSPECIFIED", 1: "SCALAR_TYPE_ENUM", 2: "SCALAR_TYPE_INT32", 3: "SCALAR_TYPE_UINT32", 4: "SCALAR_TYPE_INT64", 5: "SCALAR_TYPE_UINT64", 6: "SCALAR_TYPE_FLOAT", 7: "SCALAR_TYPE_DOUBLE", 8: "SCALAR_TYPE_BOOL", 9: "SCALAR_TYPE_STRING", 10: "SCALAR_TYPE_BYTES", 11: "SCALAR_TYPE_NULL", } Schema_Field_Type_ScalarType_value = map[string]int32{ "SCALAR_TYPE_UNSPECIFIED": 0, "SCALAR_TYPE_ENUM": 1, "SCALAR_TYPE_INT32": 2, "SCALAR_TYPE_UINT32": 3, "SCALAR_TYPE_INT64": 4, "SCALAR_TYPE_UINT64": 5, "SCALAR_TYPE_FLOAT": 6, "SCALAR_TYPE_DOUBLE": 7, "SCALAR_TYPE_BOOL": 8, "SCALAR_TYPE_STRING": 9, "SCALAR_TYPE_BYTES": 10, "SCALAR_TYPE_NULL": 11, } )
Enum value maps for Schema_Field_Type_ScalarType.
var ( Error_Code_name = map[int32]string{ 0: "UNSPECIFIED", 1: "CANCELED", 2: "UNKNOWN", 3: "INVALID_ARGUMENT", 4: "DEADLINE_EXCEEDED", 5: "NOT_FOUND", 6: "ALREADY_EXISTS", 7: "PERMISSION_DENIED", 8: "RESOURCE_EXHAUSTED", 9: "FAILED_PRECONDITION", 10: "ABORTED", 11: "OUT_OF_RANGE", 12: "UNIMPLEMENTED", 13: "INTERNAL", 14: "UNAVAILABLE", 15: "DATA_LOSS", 16: "UNAUTHENTICATED", } Error_Code_value = map[string]int32{ "UNSPECIFIED": 0, "CANCELED": 1, "UNKNOWN": 2, "INVALID_ARGUMENT": 3, "DEADLINE_EXCEEDED": 4, "NOT_FOUND": 5, "ALREADY_EXISTS": 6, "PERMISSION_DENIED": 7, "RESOURCE_EXHAUSTED": 8, "FAILED_PRECONDITION": 9, "ABORTED": 10, "OUT_OF_RANGE": 11, "UNIMPLEMENTED": 12, "INTERNAL": 13, "UNAVAILABLE": 14, "DATA_LOSS": 15, "UNAUTHENTICATED": 16, } )
Enum value maps for Error_Code.
var File_buf_knit_gateway_v1alpha1_knit_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Catch ¶
type Catch struct {
// contains filtered or unexported fields
}
Catch is one of the error handling strategies.
It tells the KnitService to catch the error and return it as part of the response.
func (*Catch) ProtoReflect ¶
func (x *Catch) ProtoReflect() protoreflect.Message
type DoRequest ¶
type DoRequest struct { Requests []*Request `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"` // contains filtered or unexported fields }
The request for the `Do` method.
func (*DoRequest) ProtoReflect ¶
func (x *DoRequest) ProtoReflect() protoreflect.Message
type DoResponse ¶
type DoResponse struct { Responses []*Response `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` // contains filtered or unexported fields }
The response of the `Do` method.
func (*DoResponse) Descriptor
deprecated
func (*DoResponse) Descriptor() ([]byte, []int)
Deprecated: Use DoResponse.ProtoReflect.Descriptor instead.
func (*DoResponse) GetResponses ¶
func (x *DoResponse) GetResponses() []*Response
func (*DoResponse) ProtoMessage ¶
func (*DoResponse) ProtoMessage()
func (*DoResponse) ProtoReflect ¶
func (x *DoResponse) ProtoReflect() protoreflect.Message
func (*DoResponse) Reset ¶
func (x *DoResponse) Reset()
func (*DoResponse) String ¶
func (x *DoResponse) String() string
type Error ¶
type Error struct { // The error code. Code Error_Code `protobuf:"varint,1,opt,name=code,proto3,enum=buf.knit.gateway.v1alpha1.Error_Code" json:"code,omitempty"` // The error message. Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // The error details if any. Details []*Error_Detail `protobuf:"bytes,3,rep,name=details,proto3" json:"details,omitempty"` // The dot separated path to the field that caused the error. // // Eg: foo.v1.FooService.getFoo.foo.bars Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"` // contains filtered or unexported fields }
Error is the error representation used by a Knit gateway for errors that are caught (because of an `on_error: catch` in the request) and rendered into the response body.
func (*Error) GetCode ¶
func (x *Error) GetCode() Error_Code
func (*Error) GetDetails ¶
func (x *Error) GetDetails() []*Error_Detail
func (*Error) ProtoReflect ¶
func (x *Error) ProtoReflect() protoreflect.Message
type Error_Code ¶
type Error_Code int32
The canonical error codes for Connect and gRPC APIs.
Based on https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto. We rename `OK` to `UNSPECIFIED` and `CANCELLED` to `CANCELED` buf:lint:ignore ENUM_VALUE_PREFIX buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX
const ( Error_UNSPECIFIED Error_Code = 0 Error_CANCELED Error_Code = 1 Error_UNKNOWN Error_Code = 2 Error_INVALID_ARGUMENT Error_Code = 3 Error_DEADLINE_EXCEEDED Error_Code = 4 Error_NOT_FOUND Error_Code = 5 Error_ALREADY_EXISTS Error_Code = 6 Error_PERMISSION_DENIED Error_Code = 7 Error_RESOURCE_EXHAUSTED Error_Code = 8 Error_FAILED_PRECONDITION Error_Code = 9 Error_ABORTED Error_Code = 10 Error_OUT_OF_RANGE Error_Code = 11 Error_UNIMPLEMENTED Error_Code = 12 Error_INTERNAL Error_Code = 13 Error_UNAVAILABLE Error_Code = 14 Error_DATA_LOSS Error_Code = 15 Error_UNAUTHENTICATED Error_Code = 16 )
func (Error_Code) Descriptor ¶
func (Error_Code) Descriptor() protoreflect.EnumDescriptor
func (Error_Code) Enum ¶
func (x Error_Code) Enum() *Error_Code
func (Error_Code) EnumDescriptor
deprecated
func (Error_Code) EnumDescriptor() ([]byte, []int)
Deprecated: Use Error_Code.Descriptor instead.
func (Error_Code) Number ¶
func (x Error_Code) Number() protoreflect.EnumNumber
func (Error_Code) String ¶
func (x Error_Code) String() string
func (Error_Code) Type ¶
func (Error_Code) Type() protoreflect.EnumType
type Error_Detail ¶
type Error_Detail struct { // The fully qualified message name. Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // The protobuf encoded message. Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // Optional json encoded form of value. Debug *structpb.Value `protobuf:"bytes,3,opt,name=debug,proto3" json:"debug,omitempty"` // contains filtered or unexported fields }
func (*Error_Detail) Descriptor
deprecated
func (*Error_Detail) Descriptor() ([]byte, []int)
Deprecated: Use Error_Detail.ProtoReflect.Descriptor instead.
func (*Error_Detail) GetDebug ¶
func (x *Error_Detail) GetDebug() *structpb.Value
func (*Error_Detail) GetType ¶
func (x *Error_Detail) GetType() string
func (*Error_Detail) GetValue ¶
func (x *Error_Detail) GetValue() []byte
func (*Error_Detail) ProtoMessage ¶
func (*Error_Detail) ProtoMessage()
func (*Error_Detail) ProtoReflect ¶
func (x *Error_Detail) ProtoReflect() protoreflect.Message
func (*Error_Detail) Reset ¶
func (x *Error_Detail) Reset()
func (*Error_Detail) String ¶
func (x *Error_Detail) String() string
type FetchRequest ¶
type FetchRequest struct { Requests []*Request `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"` // contains filtered or unexported fields }
The request for the `Fetch` method.
func (*FetchRequest) Descriptor
deprecated
func (*FetchRequest) Descriptor() ([]byte, []int)
Deprecated: Use FetchRequest.ProtoReflect.Descriptor instead.
func (*FetchRequest) GetRequests ¶
func (x *FetchRequest) GetRequests() []*Request
func (*FetchRequest) ProtoMessage ¶
func (*FetchRequest) ProtoMessage()
func (*FetchRequest) ProtoReflect ¶
func (x *FetchRequest) ProtoReflect() protoreflect.Message
func (*FetchRequest) Reset ¶
func (x *FetchRequest) Reset()
func (*FetchRequest) String ¶
func (x *FetchRequest) String() string
type FetchResponse ¶
type FetchResponse struct { Responses []*Response `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` // contains filtered or unexported fields }
The response of the `Fetch` method.
func (*FetchResponse) Descriptor
deprecated
func (*FetchResponse) Descriptor() ([]byte, []int)
Deprecated: Use FetchResponse.ProtoReflect.Descriptor instead.
func (*FetchResponse) GetResponses ¶
func (x *FetchResponse) GetResponses() []*Response
func (*FetchResponse) ProtoMessage ¶
func (*FetchResponse) ProtoMessage()
func (*FetchResponse) ProtoReflect ¶
func (x *FetchResponse) ProtoReflect() protoreflect.Message
func (*FetchResponse) Reset ¶
func (x *FetchResponse) Reset()
func (*FetchResponse) String ¶
func (x *FetchResponse) String() string
type ListenRequest ¶
type ListenRequest struct { Request *Request `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` // contains filtered or unexported fields }
The request for the `Listen` method.
func (*ListenRequest) Descriptor
deprecated
func (*ListenRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListenRequest.ProtoReflect.Descriptor instead.
func (*ListenRequest) GetRequest ¶
func (x *ListenRequest) GetRequest() *Request
func (*ListenRequest) ProtoMessage ¶
func (*ListenRequest) ProtoMessage()
func (*ListenRequest) ProtoReflect ¶
func (x *ListenRequest) ProtoReflect() protoreflect.Message
func (*ListenRequest) Reset ¶
func (x *ListenRequest) Reset()
func (*ListenRequest) String ¶
func (x *ListenRequest) String() string
type ListenResponse ¶
type ListenResponse struct { Response *Response `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` // contains filtered or unexported fields }
The response of the `Listen` method.
func (*ListenResponse) Descriptor
deprecated
func (*ListenResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListenResponse.ProtoReflect.Descriptor instead.
func (*ListenResponse) GetResponse ¶
func (x *ListenResponse) GetResponse() *Response
func (*ListenResponse) ProtoMessage ¶
func (*ListenResponse) ProtoMessage()
func (*ListenResponse) ProtoReflect ¶
func (x *ListenResponse) ProtoReflect() protoreflect.Message
func (*ListenResponse) Reset ¶
func (x *ListenResponse) Reset()
func (*ListenResponse) String ¶
func (x *ListenResponse) String() string
type MaskField ¶
type MaskField struct { // The name of the field. This is the CamelCase name (aka default JSON name) of // the field or relation. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Params for Knit relation fields. // // It should only be present for relation fields that are computed via joining // a response with other RPC responses. The value is the JSON-encoding of // the relation's request message type, but *without* the `bases` field (which // is populated by a Knit gateway, not by the Knit query). The JSON value is // encoded as a google.protobuf.Value (which can model arbitrary JSON data). // // See [Request.body] for more information about wny this format is used. Params *structpb.Value `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` // The mask to be applied to this field. // // It should only be set for fields that are one of the following: // - Message types. // - Repeated message types. // - Map types with message values. Mask []*MaskField `protobuf:"bytes,3,rep,name=mask,proto3" json:"mask,omitempty"` // The error handling strategy. The default and allowed value varies by RPC method. // // It should only be present for relation fields that are computed via joining // a response with other RPC responses. // // Types that are assignable to OnError: // // *MaskField_Catch // *MaskField_Throw OnError isMaskField_OnError `protobuf_oneof:"on_error"` // contains filtered or unexported fields }
MaskField describes a requested field. This also includes Knit relation fields.
If the requested field is a Knit relation field, the `params` field can be used to pass parameters to the relation field.
If the requested field is a message type, the `mask` field can be used to specify the fields that should be included.
func (*MaskField) ProtoReflect ¶
func (x *MaskField) ProtoReflect() protoreflect.Message
type MaskField_Catch ¶
type MaskField_Catch struct { // Catch indicates that errors should be caught and returned as part of the response. Catch *Catch `protobuf:"bytes,4,opt,name=catch,proto3,oneof"` }
type MaskField_Throw ¶
type MaskField_Throw struct { // Throw indicates that errors should be thrown and not returned as part of the response. // // This bubbles up the error to the top level response until it sees a catch. If there // is no catch in the query, and the default error handling strategy is not catch, this // results in the Knit operation failing and returning no data. Throw *Throw `protobuf:"bytes,5,opt,name=throw,proto3,oneof"` }
type Request ¶
type Request struct { // Fully qualified method name. // // Eg: pets.v1.PetService.GetPet. Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` // The request body. // // The value is the JSON-encoding of the request message for the named RPC method. // // This format is used so that the JSON form of this message includes the request // body naturally, instead of being obfuscated in a string or bytes field. This // makes a browser's network inspector much more useful. // // We rely on JSON, instead of tag numbers and Protobuf's normal binary encoding, // to enable a client that does not need any runtime code for translating Knit // queries into these Protobuf requests. Knit is powered largely by TypeScript // types, so it has minimal overhead in terms of transpiled JS bundles. Body *structpb.Value `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` // The field mask that should be applied to the response. Mask []*MaskField `protobuf:"bytes,3,rep,name=mask,proto3" json:"mask,omitempty"` // The error handling strategy. The default strategy varies by RPC method. // // Types that are assignable to OnError: // // *Request_Catch // *Request_Throw OnError isRequest_OnError `protobuf_oneof:"on_error"` // contains filtered or unexported fields }
The top level request definition.
It contains an entry point method to be executed along with a mask for the fields to include. The mask fields can include the relationships that should be recursively fetched.
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type Request_Catch ¶
type Request_Catch struct { // Catch indicates that errors should be caught and returned as part of the response. Catch *Catch `protobuf:"bytes,4,opt,name=catch,proto3,oneof"` }
type Request_Throw ¶
type Request_Throw struct { // Throw indicates that errors should be thrown, so that the entire Knit operation // fails and returns no data. Throw *Throw `protobuf:"bytes,5,opt,name=throw,proto3,oneof"` }
type Response ¶
type Response struct { // Fully qualified method name. // // Eg: pets.v1.PetService.GetPet. Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` // The response body. It includes the fetched relations. // // The value is the JSON-encoding of the RPC response, but with fetched relations // merged in. So relations are serialized as if they were defined in the base message. // // Errors are JSON-encoded form of `Error` with a special `[@error]` field that is // used to indicate that part of the response is an error instead of the type indicated // in the corresponding schema. The `[@error]` field is an empty struct that marks the // containing struct as an error. This can happen whenever an error is caught either // because of an `on_error: catch` or because the default error handling strategy is // `catch` (such as for "Do" operations). Body *structpb.Value `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` // Schema is the complete schema of the response including relations. This is required // by Knit clients that do not have runtime type information. Without runtime type // information, this schema is needed to process the response body. TS/JS Knit clients // do not have runtime type information in order to reduce JS bundles sizes. Schema *Schema `protobuf:"bytes,3,opt,name=schema,proto3" json:"schema,omitempty"` // contains filtered or unexported fields }
Response is the aggregated response of executing a `Request`.
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type Schema ¶
type Schema struct { // Fully qualified message name. // // Eg: pets.v1.Pet, google.protobuf.Any Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The list of fields. // // Fields are not populated for WKTs that have a custom JSON format: // - google.protobuf.Any // - google.protobuf.Timestamp, google.protobuf.Duration // - google.protobuf.BoolValue // - google.protobuf.Int32Value, google.protobuf.Int64Value // - google.protobuf.Uint32Value, google.protobuf.Uint32Value // - google.protobuf.FloatValue, google.protobuf.DoubleValue // - google.protobuf.StringValue, google.protobuf.BytesValue // - google.protobuf.Value, google.protobuf.ListValue, google.protobuf.Struct // - google.protobuf.FieldMask Fields []*Schema_Field `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"` // contains filtered or unexported fields }
Schema describes the schema of a protobuf message. This is mostly a subset of the corresponding descriptors for the response message. It is drastically smaller and has only what the client needs. But it also includes information about relation fields that have been joined into the response (which would not be part of the response message's descriptors).
func (*Schema) GetFields ¶
func (x *Schema) GetFields() []*Schema_Field
func (*Schema) ProtoReflect ¶
func (x *Schema) ProtoReflect() protoreflect.Message
type Schema_Field ¶
type Schema_Field struct { // The localCamelCase form of the field name. This is also the field's // default JSON name. Importantly: this is not necessarily the field // name as it appears in the proto source file. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The JSON name of the field. This is only set if it differs from name. JsonName string `protobuf:"bytes,2,opt,name=json_name,json=jsonName,proto3" json:"json_name,omitempty"` // The type of this field. Type *Schema_Field_Type `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` // contains filtered or unexported fields }
Field holds the type information for a field. It also includes Knit relation fields.
func (*Schema_Field) Descriptor
deprecated
func (*Schema_Field) Descriptor() ([]byte, []int)
Deprecated: Use Schema_Field.ProtoReflect.Descriptor instead.
func (*Schema_Field) GetJsonName ¶
func (x *Schema_Field) GetJsonName() string
func (*Schema_Field) GetName ¶
func (x *Schema_Field) GetName() string
func (*Schema_Field) GetType ¶
func (x *Schema_Field) GetType() *Schema_Field_Type
func (*Schema_Field) ProtoMessage ¶
func (*Schema_Field) ProtoMessage()
func (*Schema_Field) ProtoReflect ¶
func (x *Schema_Field) ProtoReflect() protoreflect.Message
func (*Schema_Field) Reset ¶
func (x *Schema_Field) Reset()
func (*Schema_Field) String ¶
func (x *Schema_Field) String() string
type Schema_Field_Type ¶
type Schema_Field_Type struct { // The type of the field. // // Types that are assignable to Value: // // *Schema_Field_Type_Message // *Schema_Field_Type_Scalar // *Schema_Field_Type_Repeated // *Schema_Field_Type_Map Value isSchema_Field_Type_Value `protobuf_oneof:"value"` // contains filtered or unexported fields }
func (*Schema_Field_Type) Descriptor
deprecated
func (*Schema_Field_Type) Descriptor() ([]byte, []int)
Deprecated: Use Schema_Field_Type.ProtoReflect.Descriptor instead.
func (*Schema_Field_Type) GetMap ¶
func (x *Schema_Field_Type) GetMap() *Schema_Field_Type_MapType
func (*Schema_Field_Type) GetMessage ¶
func (x *Schema_Field_Type) GetMessage() *Schema
func (*Schema_Field_Type) GetRepeated ¶
func (x *Schema_Field_Type) GetRepeated() *Schema_Field_Type_RepeatedType
func (*Schema_Field_Type) GetScalar ¶
func (x *Schema_Field_Type) GetScalar() Schema_Field_Type_ScalarType
func (*Schema_Field_Type) GetValue ¶
func (m *Schema_Field_Type) GetValue() isSchema_Field_Type_Value
func (*Schema_Field_Type) ProtoMessage ¶
func (*Schema_Field_Type) ProtoMessage()
func (*Schema_Field_Type) ProtoReflect ¶
func (x *Schema_Field_Type) ProtoReflect() protoreflect.Message
func (*Schema_Field_Type) Reset ¶
func (x *Schema_Field_Type) Reset()
func (*Schema_Field_Type) String ¶
func (x *Schema_Field_Type) String() string
type Schema_Field_Type_Map ¶
type Schema_Field_Type_Map struct { // The schema of the map field. Map *Schema_Field_Type_MapType `protobuf:"bytes,4,opt,name=map,proto3,oneof"` }
type Schema_Field_Type_MapType ¶
type Schema_Field_Type_MapType struct { // The kind of the map key. Limited to: // SCALAR_TYPE_INT32, SCALAR_TYPE_UINT32, // SCALAR_TYPE_INT64, SCALAR_TYPE_UINT64, // SCALAR_TYPE_BOOL, SCALAR_TYPE_STRING Key Schema_Field_Type_ScalarType `protobuf:"varint,1,opt,name=key,proto3,enum=buf.knit.gateway.v1alpha1.Schema_Field_Type_ScalarType" json:"key,omitempty"` // The kind of the map value. // // Types that are assignable to Value: // // *Schema_Field_Type_MapType_Message // *Schema_Field_Type_MapType_Scalar Value isSchema_Field_Type_MapType_Value `protobuf_oneof:"value"` // contains filtered or unexported fields }
func (*Schema_Field_Type_MapType) Descriptor
deprecated
func (*Schema_Field_Type_MapType) Descriptor() ([]byte, []int)
Deprecated: Use Schema_Field_Type_MapType.ProtoReflect.Descriptor instead.
func (*Schema_Field_Type_MapType) GetKey ¶
func (x *Schema_Field_Type_MapType) GetKey() Schema_Field_Type_ScalarType
func (*Schema_Field_Type_MapType) GetMessage ¶
func (x *Schema_Field_Type_MapType) GetMessage() *Schema
func (*Schema_Field_Type_MapType) GetScalar ¶
func (x *Schema_Field_Type_MapType) GetScalar() Schema_Field_Type_ScalarType
func (*Schema_Field_Type_MapType) GetValue ¶
func (m *Schema_Field_Type_MapType) GetValue() isSchema_Field_Type_MapType_Value
func (*Schema_Field_Type_MapType) ProtoMessage ¶
func (*Schema_Field_Type_MapType) ProtoMessage()
func (*Schema_Field_Type_MapType) ProtoReflect ¶
func (x *Schema_Field_Type_MapType) ProtoReflect() protoreflect.Message
func (*Schema_Field_Type_MapType) Reset ¶
func (x *Schema_Field_Type_MapType) Reset()
func (*Schema_Field_Type_MapType) String ¶
func (x *Schema_Field_Type_MapType) String() string
type Schema_Field_Type_MapType_Message ¶
type Schema_Field_Type_MapType_Message struct { // The schema of the message map value. Message *Schema `protobuf:"bytes,2,opt,name=message,proto3,oneof"` }
type Schema_Field_Type_MapType_Scalar ¶
type Schema_Field_Type_MapType_Scalar struct { // The primitive type of the map value. Scalar Schema_Field_Type_ScalarType `protobuf:"varint,3,opt,name=scalar,proto3,enum=buf.knit.gateway.v1alpha1.Schema_Field_Type_ScalarType,oneof"` }
type Schema_Field_Type_Message ¶
type Schema_Field_Type_Message struct { // The schema of the message field. Message *Schema `protobuf:"bytes,1,opt,name=message,proto3,oneof"` }
type Schema_Field_Type_Repeated ¶
type Schema_Field_Type_Repeated struct { // The schema of the repeated field. Repeated *Schema_Field_Type_RepeatedType `protobuf:"bytes,3,opt,name=repeated,proto3,oneof"` }
type Schema_Field_Type_RepeatedType ¶
type Schema_Field_Type_RepeatedType struct { // Types that are assignable to Element: // // *Schema_Field_Type_RepeatedType_Message // *Schema_Field_Type_RepeatedType_Scalar Element isSchema_Field_Type_RepeatedType_Element `protobuf_oneof:"element"` // contains filtered or unexported fields }
RepeatedType holds the type information for a repeated field.
func (*Schema_Field_Type_RepeatedType) Descriptor
deprecated
func (*Schema_Field_Type_RepeatedType) Descriptor() ([]byte, []int)
Deprecated: Use Schema_Field_Type_RepeatedType.ProtoReflect.Descriptor instead.
func (*Schema_Field_Type_RepeatedType) GetElement ¶
func (m *Schema_Field_Type_RepeatedType) GetElement() isSchema_Field_Type_RepeatedType_Element
func (*Schema_Field_Type_RepeatedType) GetMessage ¶
func (x *Schema_Field_Type_RepeatedType) GetMessage() *Schema
func (*Schema_Field_Type_RepeatedType) GetScalar ¶
func (x *Schema_Field_Type_RepeatedType) GetScalar() Schema_Field_Type_ScalarType
func (*Schema_Field_Type_RepeatedType) ProtoMessage ¶
func (*Schema_Field_Type_RepeatedType) ProtoMessage()
func (*Schema_Field_Type_RepeatedType) ProtoReflect ¶
func (x *Schema_Field_Type_RepeatedType) ProtoReflect() protoreflect.Message
func (*Schema_Field_Type_RepeatedType) Reset ¶
func (x *Schema_Field_Type_RepeatedType) Reset()
func (*Schema_Field_Type_RepeatedType) String ¶
func (x *Schema_Field_Type_RepeatedType) String() string
type Schema_Field_Type_RepeatedType_Message ¶
type Schema_Field_Type_RepeatedType_Message struct { // The schema of the message element. Message *Schema `protobuf:"bytes,1,opt,name=message,proto3,oneof"` }
type Schema_Field_Type_RepeatedType_Scalar ¶
type Schema_Field_Type_RepeatedType_Scalar struct { // The primitive type of the repeated element. Scalar Schema_Field_Type_ScalarType `protobuf:"varint,2,opt,name=scalar,proto3,enum=buf.knit.gateway.v1alpha1.Schema_Field_Type_ScalarType,oneof"` }
type Schema_Field_Type_Scalar ¶
type Schema_Field_Type_Scalar struct { // The primitive type of the field. Scalar Schema_Field_Type_ScalarType `protobuf:"varint,2,opt,name=scalar,proto3,enum=buf.knit.gateway.v1alpha1.Schema_Field_Type_ScalarType,oneof"` }
type Schema_Field_Type_ScalarType ¶
type Schema_Field_Type_ScalarType int32
const ( Schema_Field_Type_SCALAR_TYPE_UNSPECIFIED Schema_Field_Type_ScalarType = 0 Schema_Field_Type_SCALAR_TYPE_ENUM Schema_Field_Type_ScalarType = 1 Schema_Field_Type_SCALAR_TYPE_INT32 Schema_Field_Type_ScalarType = 2 Schema_Field_Type_SCALAR_TYPE_UINT32 Schema_Field_Type_ScalarType = 3 Schema_Field_Type_SCALAR_TYPE_INT64 Schema_Field_Type_ScalarType = 4 Schema_Field_Type_SCALAR_TYPE_UINT64 Schema_Field_Type_ScalarType = 5 Schema_Field_Type_SCALAR_TYPE_FLOAT Schema_Field_Type_ScalarType = 6 Schema_Field_Type_SCALAR_TYPE_DOUBLE Schema_Field_Type_ScalarType = 7 Schema_Field_Type_SCALAR_TYPE_BOOL Schema_Field_Type_ScalarType = 8 Schema_Field_Type_SCALAR_TYPE_STRING Schema_Field_Type_ScalarType = 9 Schema_Field_Type_SCALAR_TYPE_BYTES Schema_Field_Type_ScalarType = 10 Schema_Field_Type_SCALAR_TYPE_NULL Schema_Field_Type_ScalarType = 11 // reserved for google.protobuf.NullValue )
func (Schema_Field_Type_ScalarType) Descriptor ¶
func (Schema_Field_Type_ScalarType) Descriptor() protoreflect.EnumDescriptor
func (Schema_Field_Type_ScalarType) Enum ¶
func (x Schema_Field_Type_ScalarType) Enum() *Schema_Field_Type_ScalarType
func (Schema_Field_Type_ScalarType) EnumDescriptor
deprecated
func (Schema_Field_Type_ScalarType) EnumDescriptor() ([]byte, []int)
Deprecated: Use Schema_Field_Type_ScalarType.Descriptor instead.
func (Schema_Field_Type_ScalarType) Number ¶
func (x Schema_Field_Type_ScalarType) Number() protoreflect.EnumNumber
func (Schema_Field_Type_ScalarType) String ¶
func (x Schema_Field_Type_ScalarType) String() string
func (Schema_Field_Type_ScalarType) Type ¶
func (Schema_Field_Type_ScalarType) Type() protoreflect.EnumType
type Throw ¶
type Throw struct {
// contains filtered or unexported fields
}
Throw is one of the error handling strategies.
It tells the KnitService to propagate the error up the query chain.
func (*Throw) ProtoReflect ¶
func (x *Throw) ProtoReflect() protoreflect.Message