knitv1alpha1

package
v1.33.0-20240111194952... Latest Latest
Warning

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

Go to latest
Published: unknown License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Configuration for the relation that this method resolves. Should only be
	// present for methods that resolve a Knit relation.
	//
	// When this option is present, the name must be non-empty. The entity type
	// for which the relation is resolved is defined as part of the request type.
	// The type of the relation field is defined as part of the response type.
	//
	// Example:
	//
	//	service BarResolverService {
	//	  // By convention, the method is named "Get<Base><Relation>". In this
	//	  // example, the base type is Foo, and the relation is named bars, thus
	//	  // the method is "GetFooBars".
	//	  rpc GetFooBars(GetFooBarsRequest) returns (GetFooBarsResponse) {
	//	    // This method defines the resolver for a relation named "bars".
	//	    option (buf.knit.relation).name = "bars";
	//	    // Relation resolvers may not have side effects.
	//	    option idempotency_level = NO_SIDE_EFFECTS;
	//	  }
	//	}
	//	message GetFooBarsRequest {
	//	  // The request *MUST* have a repeated field with tag number 1 named
	//	  // "bases". The type must be a message, which is the message type into
	//	  // which the relation field will be inserted.
	//	  repeated Foo bases = 1;
	//
	//	  // May contain other fields with tags 2 and up.
	//	}
	//	message GetFooBarsResponse {
	//	  // The response *MUST* have exactly one field, which is a repeated
	//	  // field with tag number 1 named "values". The type must be a wrapper
	//	  // message with exactly one field with tag number 1. (By convention,
	//	  // the wrapper name is "<Base>Result".)
	//	  repeated FooResult values = 1;
	//	  message FooResult {
	//	    // This is the actual field definition that gets injected into the
	//	    // base entity type (an element in field "bases" of the request).
	//	    //
	//	    // This enclosing wrapper message is required in order to support
	//	    // optional, repeated, or map fields here. (Because "values" above is
	//	    // repeated, and you can't have a repeated field whose element type
	//	    // is optional, repeated or map.)
	//	    repeated Bar bars = 1;
	//	    // This field name must match the relation name.
	//	  }
	//	}
	//
	// optional buf.knit.v1alpha1.RelationConfig relation = 1157;
	E_Relation = &file_buf_knit_v1alpha1_options_proto_extTypes[0]
)

Extension fields to descriptorpb.MethodOptions.

View Source
var File_buf_knit_v1alpha1_options_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type RelationConfig

type RelationConfig struct {

	// The name of the relation. This must be non-empty.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

RelationConfig includes details about the relation that a method resolves.

func (*RelationConfig) Descriptor deprecated

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

Deprecated: Use RelationConfig.ProtoReflect.Descriptor instead.

func (*RelationConfig) GetName

func (x *RelationConfig) GetName() string

func (*RelationConfig) ProtoMessage

func (*RelationConfig) ProtoMessage()

func (*RelationConfig) ProtoReflect

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

func (*RelationConfig) Reset

func (x *RelationConfig) Reset()

func (*RelationConfig) String

func (x *RelationConfig) String() string

Jump to

Keyboard shortcuts

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