api

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: Apache-2.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// optional trpc.api.HttpRule http = 50201;
	E_Http = &file_trpc_api_annotations_proto_extTypes[0]
)

Extension fields to descriptorpb.MethodOptions.

View Source
var File_trpc_api_annotations_proto protoreflect.FileDescriptor
View Source
var File_trpc_api_http_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type CustomHttpPattern

type CustomHttpPattern struct {

	// The name of this custom HTTP verb.
	Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"`
	// The path matched by this custom verb.
	Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	// contains filtered or unexported fields
}

A custom pattern is used for defining custom HTTP verb.

func (*CustomHttpPattern) Descriptor deprecated

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

Deprecated: Use CustomHttpPattern.ProtoReflect.Descriptor instead.

func (*CustomHttpPattern) GetKind

func (x *CustomHttpPattern) GetKind() string

func (*CustomHttpPattern) GetPath

func (x *CustomHttpPattern) GetPath() string

func (*CustomHttpPattern) ProtoMessage

func (*CustomHttpPattern) ProtoMessage()

func (*CustomHttpPattern) ProtoReflect

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

func (*CustomHttpPattern) Reset

func (x *CustomHttpPattern) Reset()

func (*CustomHttpPattern) String

func (x *CustomHttpPattern) String() string

type HttpRule

type HttpRule struct {

	// Selects a method to which this rule applies.
	//
	// Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
	Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"`
	// Determines the URL pattern is matched by this rules. This pattern can be
	// used with any of the {get|put|post|delete|patch} methods. A custom method
	// can be defined using the 'custom' field.
	//
	// Types that are assignable to Pattern:
	//
	//	*HttpRule_Get
	//	*HttpRule_Put
	//	*HttpRule_Post
	//	*HttpRule_Delete
	//	*HttpRule_Patch
	//	*HttpRule_Custom
	Pattern isHttpRule_Pattern `protobuf_oneof:"pattern"`
	// The name of the request field whose value is mapped to the HTTP request
	// body, or `*` for mapping all request fields not captured by the path
	// pattern to the HTTP body, or omitted for not having any HTTP request body.
	//
	// NOTE: the referred field must be present at the top-level of the request
	// message type.
	Body string `protobuf:"bytes,7,opt,name=body,proto3" json:"body,omitempty"`
	// Optional. The name of the response field whose value is mapped to the HTTP
	// response body. When omitted, the entire response message will be used
	// as the HTTP response body.
	//
	// NOTE: The referred field must be present at the top-level of the response
	// message type.
	ResponseBody string `protobuf:"bytes,12,opt,name=response_body,json=responseBody,proto3" json:"response_body,omitempty"`
	// Additional HTTP bindings for the selector. Nested bindings must
	// not contain an `additional_bindings` field themselves (that is,
	// the nesting may only be one level deep).
	AdditionalBindings []*HttpRule `protobuf:"bytes,11,rep,name=additional_bindings,json=additionalBindings,proto3" json:"additional_bindings,omitempty"`
	// contains filtered or unexported fields
}

func (*HttpRule) Descriptor deprecated

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

Deprecated: Use HttpRule.ProtoReflect.Descriptor instead.

func (*HttpRule) GetAdditionalBindings

func (x *HttpRule) GetAdditionalBindings() []*HttpRule

func (*HttpRule) GetBody

func (x *HttpRule) GetBody() string

func (*HttpRule) GetCustom

func (x *HttpRule) GetCustom() *CustomHttpPattern

func (*HttpRule) GetDelete

func (x *HttpRule) GetDelete() string

func (*HttpRule) GetGet

func (x *HttpRule) GetGet() string

func (*HttpRule) GetPatch

func (x *HttpRule) GetPatch() string

func (*HttpRule) GetPattern

func (m *HttpRule) GetPattern() isHttpRule_Pattern

func (*HttpRule) GetPost

func (x *HttpRule) GetPost() string

func (*HttpRule) GetPut

func (x *HttpRule) GetPut() string

func (*HttpRule) GetResponseBody

func (x *HttpRule) GetResponseBody() string

func (*HttpRule) GetSelector

func (x *HttpRule) GetSelector() string

func (*HttpRule) ProtoMessage

func (*HttpRule) ProtoMessage()

func (*HttpRule) ProtoReflect

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

func (*HttpRule) Reset

func (x *HttpRule) Reset()

func (*HttpRule) String

func (x *HttpRule) String() string

type HttpRule_Custom

type HttpRule_Custom struct {
	// The custom pattern is used for specifying an HTTP method that is not
	// included in the `pattern` field, such as HEAD, or "*" to leave the
	// HTTP method unspecified for this rule. The wild-card rule is useful
	// for services that provide content to Web (HTML) clients.
	Custom *CustomHttpPattern `protobuf:"bytes,8,opt,name=custom,proto3,oneof"`
}

type HttpRule_Delete

type HttpRule_Delete struct {
	// Maps to HTTP DELETE. Used for deleting a resource.
	Delete string `protobuf:"bytes,5,opt,name=delete,proto3,oneof"`
}

type HttpRule_Get

type HttpRule_Get struct {
	// Maps to HTTP GET. Used for listing and getting information about
	// resources.
	Get string `protobuf:"bytes,2,opt,name=get,proto3,oneof"`
}

type HttpRule_Patch

type HttpRule_Patch struct {
	// Maps to HTTP PATCH. Used for updating a resource.
	Patch string `protobuf:"bytes,6,opt,name=patch,proto3,oneof"`
}

type HttpRule_Post

type HttpRule_Post struct {
	// Maps to HTTP POST. Used for creating a resource or performing an action.
	Post string `protobuf:"bytes,4,opt,name=post,proto3,oneof"`
}

type HttpRule_Put

type HttpRule_Put struct {
	// Maps to HTTP PUT. Used for replacing a resource.
	Put string `protobuf:"bytes,3,opt,name=put,proto3,oneof"`
}

Jump to

Keyboard shortcuts

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