userpb

package
v0.0.0-...-48c4086 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Overview

Package userpb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const ABitOfEverythingServicePathPrefix = "/twirp/gid.ABitOfEverythingService/"

ABitOfEverythingServicePathPrefix is a convenience constant that may identify URL paths. Should be used with caution, it only matches routes generated by Twirp Go clients, with the default "/twirp" prefix and default CamelCase service and method names. More info: https://twitchtv.github.io/twirp/docs/routing.html

View Source
const AnotherServiceWithNoBindingsPathPrefix = "/twirp/gid.AnotherServiceWithNoBindings/"

AnotherServiceWithNoBindingsPathPrefix is a convenience constant that may identify URL paths. Should be used with caution, it only matches routes generated by Twirp Go clients, with the default "/twirp" prefix and default CamelCase service and method names. More info: https://twitchtv.github.io/twirp/docs/routing.html

View Source
const CamelCaseServiceNamePathPrefix = "/twirp/gid.CamelCaseServiceName/"

CamelCaseServiceNamePathPrefix is a convenience constant that may identify URL paths. Should be used with caution, it only matches routes generated by Twirp Go clients, with the default "/twirp" prefix and default CamelCase service and method names. More info: https://twitchtv.github.io/twirp/docs/routing.html

View Source
const UserPathPrefix = "/twirp/gid.User/"

UserPathPrefix is a convenience constant that may identify URL paths. Should be used with caution, it only matches routes generated by Twirp Go clients, with the default "/twirp" prefix and default CamelCase service and method names. More info: https://twitchtv.github.io/twirp/docs/routing.html

Variables

View Source
var (
	NumericEnum_name = map[int32]string{
		0: "ZERO",
		1: "ONE",
	}
	NumericEnum_value = map[string]int32{
		"ZERO": 0,
		"ONE":  1,
	}
)

Enum value maps for NumericEnum.

View Source
var (
	ABitOfEverything_Nested_DeepEnum_name = map[int32]string{
		0: "FALSE",
		1: "TRUE",
	}
	ABitOfEverything_Nested_DeepEnum_value = map[string]int32{
		"FALSE": 0,
		"TRUE":  1,
	}
)

Enum value maps for ABitOfEverything_Nested_DeepEnum.

View Source
var ABitOfEverythingService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gid.ABitOfEverythingService",
	HandlerType: (*ABitOfEverythingServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _ABitOfEverythingService_Create_Handler,
		},
		{
			MethodName: "CreateBody",
			Handler:    _ABitOfEverythingService_CreateBody_Handler,
		},
		{
			MethodName: "CreateBook",
			Handler:    _ABitOfEverythingService_CreateBook_Handler,
		},
		{
			MethodName: "UpdateBook",
			Handler:    _ABitOfEverythingService_UpdateBook_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _ABitOfEverythingService_Update_Handler,
		},
		{
			MethodName: "UpdateV2",
			Handler:    _ABitOfEverythingService_UpdateV2_Handler,
		},
		{
			MethodName: "GetQuery",
			Handler:    _ABitOfEverythingService_GetQuery_Handler,
		},
		{
			MethodName: "GetRepeatedQuery",
			Handler:    _ABitOfEverythingService_GetRepeatedQuery_Handler,
		},
		{
			MethodName: "DeepPathEcho",
			Handler:    _ABitOfEverythingService_DeepPathEcho_Handler,
		},
		{
			MethodName: "NoBindings",
			Handler:    _ABitOfEverythingService_NoBindings_Handler,
		},
		{
			MethodName: "Timeout",
			Handler:    _ABitOfEverythingService_Timeout_Handler,
		},
		{
			MethodName: "ErrorWithDetails",
			Handler:    _ABitOfEverythingService_ErrorWithDetails_Handler,
		},
		{
			MethodName: "GetMessageWithBody",
			Handler:    _ABitOfEverythingService_GetMessageWithBody_Handler,
		},
		{
			MethodName: "PostWithEmptyBody",
			Handler:    _ABitOfEverythingService_PostWithEmptyBody_Handler,
		},
		{
			MethodName: "CheckGetQueryParams",
			Handler:    _ABitOfEverythingService_CheckGetQueryParams_Handler,
		},
		{
			MethodName: "CheckNestedEnumGetQueryParams",
			Handler:    _ABitOfEverythingService_CheckNestedEnumGetQueryParams_Handler,
		},
		{
			MethodName: "CheckPostQueryParams",
			Handler:    _ABitOfEverythingService_CheckPostQueryParams_Handler,
		},
		{
			MethodName: "OverwriteResponseContentType",
			Handler:    _ABitOfEverythingService_OverwriteResponseContentType_Handler,
		},
		{
			MethodName: "CheckStatus",
			Handler:    _ABitOfEverythingService_CheckStatus_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "example/user/user.proto",
}

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

View Source
var AnotherServiceWithNoBindings_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gid.AnotherServiceWithNoBindings",
	HandlerType: (*AnotherServiceWithNoBindingsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "NoBindings",
			Handler:    _AnotherServiceWithNoBindings_NoBindings_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "example/user/user.proto",
}

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

View Source
var CamelCaseServiceName_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gid.camelCaseServiceName",
	HandlerType: (*CamelCaseServiceNameServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Empty",
			Handler:    _CamelCaseServiceName_Empty_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "example/user/user.proto",
}

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

View Source
var File_example_user_user_proto protoreflect.FileDescriptor
View Source
var User_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gid.User",
	HandlerType: (*UserServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Generate",
			Handler:    _User_Generate_Handler,
		},
		{
			MethodName: "Types",
			Handler:    _User_Types_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "example/user/user.proto",
}

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

Functions

func RegisterABitOfEverythingServiceHandler

func RegisterABitOfEverythingServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterABitOfEverythingServiceHandler registers the http handlers for service ABitOfEverythingService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterABitOfEverythingServiceHandlerClient

func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ABitOfEverythingServiceClient) error

RegisterABitOfEverythingServiceHandlerClient registers the http handlers for service ABitOfEverythingService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ABitOfEverythingServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ABitOfEverythingServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ABitOfEverythingServiceClient" to call the correct interceptors.

func RegisterABitOfEverythingServiceHandlerFromEndpoint

func RegisterABitOfEverythingServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterABitOfEverythingServiceHandlerFromEndpoint is same as RegisterABitOfEverythingServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterABitOfEverythingServiceHandlerServer

func RegisterABitOfEverythingServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ABitOfEverythingServiceServer) error

RegisterABitOfEverythingServiceHandlerServer registers the http handlers for service ABitOfEverythingService to "mux". UnaryRPC :call ABitOfEverythingServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterABitOfEverythingServiceHandlerFromEndpoint instead.

func RegisterABitOfEverythingServiceServer

func RegisterABitOfEverythingServiceServer(s grpc.ServiceRegistrar, srv ABitOfEverythingServiceServer)

func RegisterAnotherServiceWithNoBindingsHandler

func RegisterAnotherServiceWithNoBindingsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterAnotherServiceWithNoBindingsHandler registers the http handlers for service AnotherServiceWithNoBindings to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterAnotherServiceWithNoBindingsHandlerClient

func RegisterAnotherServiceWithNoBindingsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AnotherServiceWithNoBindingsClient) error

RegisterAnotherServiceWithNoBindingsHandlerClient registers the http handlers for service AnotherServiceWithNoBindings to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AnotherServiceWithNoBindingsClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AnotherServiceWithNoBindingsClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AnotherServiceWithNoBindingsClient" to call the correct interceptors.

func RegisterAnotherServiceWithNoBindingsHandlerFromEndpoint

func RegisterAnotherServiceWithNoBindingsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterAnotherServiceWithNoBindingsHandlerFromEndpoint is same as RegisterAnotherServiceWithNoBindingsHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterAnotherServiceWithNoBindingsHandlerServer

func RegisterAnotherServiceWithNoBindingsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AnotherServiceWithNoBindingsServer) error

RegisterAnotherServiceWithNoBindingsHandlerServer registers the http handlers for service AnotherServiceWithNoBindings to "mux". UnaryRPC :call AnotherServiceWithNoBindingsServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAnotherServiceWithNoBindingsHandlerFromEndpoint instead.

func RegisterAnotherServiceWithNoBindingsServer

func RegisterAnotherServiceWithNoBindingsServer(s grpc.ServiceRegistrar, srv AnotherServiceWithNoBindingsServer)

func RegisterCamelCaseServiceNameHandler

func RegisterCamelCaseServiceNameHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterCamelCaseServiceNameHandler registers the http handlers for service CamelCaseServiceName to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterCamelCaseServiceNameHandlerClient

func RegisterCamelCaseServiceNameHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CamelCaseServiceNameClient) error

RegisterCamelCaseServiceNameHandlerClient registers the http handlers for service CamelCaseServiceName to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CamelCaseServiceNameClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CamelCaseServiceNameClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "CamelCaseServiceNameClient" to call the correct interceptors.

func RegisterCamelCaseServiceNameHandlerFromEndpoint

func RegisterCamelCaseServiceNameHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterCamelCaseServiceNameHandlerFromEndpoint is same as RegisterCamelCaseServiceNameHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterCamelCaseServiceNameHandlerServer

func RegisterCamelCaseServiceNameHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CamelCaseServiceNameServer) error

RegisterCamelCaseServiceNameHandlerServer registers the http handlers for service CamelCaseServiceName to "mux". UnaryRPC :call CamelCaseServiceNameServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterCamelCaseServiceNameHandlerFromEndpoint instead.

func RegisterCamelCaseServiceNameServer

func RegisterCamelCaseServiceNameServer(s grpc.ServiceRegistrar, srv CamelCaseServiceNameServer)

func RegisterUserHandler

func RegisterUserHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterUserHandler registers the http handlers for service User to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterUserHandlerClient

func RegisterUserHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserClient) error

RegisterUserHandlerClient registers the http handlers for service User to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UserClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UserClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "UserClient" to call the correct interceptors.

func RegisterUserHandlerFromEndpoint

func RegisterUserHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterUserHandlerFromEndpoint is same as RegisterUserHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterUserHandlerServer

func RegisterUserHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServer) error

RegisterUserHandlerServer registers the http handlers for service User to "mux". UnaryRPC :call UserServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUserHandlerFromEndpoint instead.

func RegisterUserServer

func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer)

func WriteError

func WriteError(resp http.ResponseWriter, err error)

WriteError writes an HTTP response with a valid Twirp error format (code, msg, meta). Useful outside of the Twirp server (e.g. http middleware), but does not trigger hooks. If err is not a twirp.Error, it will get wrapped with twirp.InternalErrorWith(err)

Types

type ABitOfEverything

type ABitOfEverything struct {
	SingleNested        *ABitOfEverything_Nested   `protobuf:"bytes,25,opt,name=single_nested,json=singleNested,proto3" json:"single_nested,omitempty"`
	Uuid                string                     `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	Nested              []*ABitOfEverything_Nested `protobuf:"bytes,2,rep,name=nested,proto3" json:"nested,omitempty"`
	FloatValue          float32                    `protobuf:"fixed32,3,opt,name=float_value,json=floatValue,proto3" json:"float_value,omitempty"`
	DoubleValue         float64                    `protobuf:"fixed64,4,opt,name=double_value,json=doubleValue,proto3" json:"double_value,omitempty"`
	Int64Value          int64                      `protobuf:"varint,5,opt,name=int64_value,json=int64Value,proto3" json:"int64_value,omitempty"`
	Uint64Value         uint64                     `protobuf:"varint,6,opt,name=uint64_value,json=uint64Value,proto3" json:"uint64_value,omitempty"`
	Int32Value          int32                      `protobuf:"varint,7,opt,name=int32_value,json=identifier,proto3" json:"int32_value,omitempty"`
	Fixed64Value        uint64                     `protobuf:"fixed64,8,opt,name=fixed64_value,json=fixed64Value,proto3" json:"fixed64_value,omitempty"`
	Fixed32Value        uint32                     `protobuf:"fixed32,9,opt,name=fixed32_value,json=fixed32Value,proto3" json:"fixed32_value,omitempty"`
	BoolValue           bool                       `protobuf:"varint,10,opt,name=bool_value,json=boolValue,proto3" json:"bool_value,omitempty"`
	StringValue         string                     `protobuf:"bytes,11,opt,name=string_value,json=stringValue,proto3" json:"string_value,omitempty"`
	BytesValue          []byte                     `protobuf:"bytes,29,opt,name=bytes_value,json=bytesValue,proto3" json:"bytes_value,omitempty"`
	Uint32Value         uint32                     `protobuf:"varint,13,opt,name=uint32_value,json=uint32Value,proto3" json:"uint32_value,omitempty"`
	EnumValue           NumericEnum                `protobuf:"varint,14,opt,name=enum_value,json=enumValue,proto3,enum=gid.NumericEnum" json:"enum_value,omitempty"`
	Sfixed32Value       int32                      `protobuf:"fixed32,15,opt,name=sfixed32_value,json=sfixed32Value,proto3" json:"sfixed32_value,omitempty"`
	Sfixed64Value       int64                      `protobuf:"fixed64,16,opt,name=sfixed64_value,json=sfixed64Value,proto3" json:"sfixed64_value,omitempty"`
	Sint32Value         int32                      `protobuf:"zigzag32,17,opt,name=sint32_value,json=sint32Value,proto3" json:"sint32_value,omitempty"`
	Sint64Value         int64                      `protobuf:"zigzag64,18,opt,name=sint64_value,json=sint64Value,proto3" json:"sint64_value,omitempty"`
	RepeatedStringValue []string                   `protobuf:"bytes,19,rep,name=repeated_string_value,json=repeatedStringValue,proto3" json:"repeated_string_value,omitempty"`
	// Types that are assignable to OneofValue:
	//	*ABitOfEverything_OneofEmpty
	//	*ABitOfEverything_OneofString
	OneofValue               isABitOfEverything_OneofValue       `protobuf_oneof:"oneof_value"`
	MapValue                 map[string]NumericEnum              `` /* 196-byte string literal not displayed */
	MappedStringValue        map[string]string                   `` /* 203-byte string literal not displayed */
	MappedNestedValue        map[string]*ABitOfEverything_Nested `` /* 203-byte string literal not displayed */
	NonConventionalNameValue string                              `protobuf:"bytes,26,opt,name=nonConventionalNameValue,proto3" json:"nonConventionalNameValue,omitempty"`
	TimestampValue           *timestamppb.Timestamp              `protobuf:"bytes,27,opt,name=timestamp_value,json=timestampValue,proto3" json:"timestamp_value,omitempty"`
	// repeated enum value. it is comma-separated in query
	RepeatedEnumValue []NumericEnum `` /* 144-byte string literal not displayed */
	// repeated numeric enum comment (This comment is overridden by the field annotation)
	RepeatedEnumAnnotation []NumericEnum `` /* 159-byte string literal not displayed */
	// numeric enum comment (This comment is overridden by the field annotation)
	EnumValueAnnotation NumericEnum `` /* 143-byte string literal not displayed */
	// repeated string comment (This comment is overridden by the field annotation)
	RepeatedStringAnnotation []string `` /* 136-byte string literal not displayed */
	// repeated nested object comment (This comment is overridden by the field annotation)
	RepeatedNestedAnnotation []*ABitOfEverything_Nested `` /* 136-byte string literal not displayed */
	// nested object comments (This comment is overridden by the field annotation)
	NestedAnnotation  *ABitOfEverything_Nested `protobuf:"bytes,36,opt,name=nested_annotation,json=nestedAnnotation,proto3" json:"nested_annotation,omitempty"`
	Int64OverrideType int64                    `protobuf:"varint,37,opt,name=int64_override_type,json=int64OverrideType,proto3" json:"int64_override_type,omitempty"`
	// mark a field as required in Open API definition
	RequiredStringViaFieldBehaviorAnnotation string `` /* 190-byte string literal not displayed */
	// mark a field as readonly in Open API definition
	OutputOnlyStringViaFieldBehaviorAnnotation string `` /* 198-byte string literal not displayed */
	// contains filtered or unexported fields
}

Intentionally complicated message type to cover many features of Protobuf.

func (*ABitOfEverything) Descriptor deprecated

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

Deprecated: Use ABitOfEverything.ProtoReflect.Descriptor instead.

func (*ABitOfEverything) GetBoolValue

func (x *ABitOfEverything) GetBoolValue() bool

func (*ABitOfEverything) GetBytesValue

func (x *ABitOfEverything) GetBytesValue() []byte

func (*ABitOfEverything) GetDoubleValue

func (x *ABitOfEverything) GetDoubleValue() float64

func (*ABitOfEverything) GetEnumValue

func (x *ABitOfEverything) GetEnumValue() NumericEnum

func (*ABitOfEverything) GetEnumValueAnnotation

func (x *ABitOfEverything) GetEnumValueAnnotation() NumericEnum

func (*ABitOfEverything) GetFixed32Value

func (x *ABitOfEverything) GetFixed32Value() uint32

func (*ABitOfEverything) GetFixed64Value

func (x *ABitOfEverything) GetFixed64Value() uint64

func (*ABitOfEverything) GetFloatValue

func (x *ABitOfEverything) GetFloatValue() float32

func (*ABitOfEverything) GetInt32Value

func (x *ABitOfEverything) GetInt32Value() int32

func (*ABitOfEverything) GetInt64OverrideType

func (x *ABitOfEverything) GetInt64OverrideType() int64

func (*ABitOfEverything) GetInt64Value

func (x *ABitOfEverything) GetInt64Value() int64

func (*ABitOfEverything) GetMapValue

func (x *ABitOfEverything) GetMapValue() map[string]NumericEnum

func (*ABitOfEverything) GetMappedNestedValue

func (x *ABitOfEverything) GetMappedNestedValue() map[string]*ABitOfEverything_Nested

func (*ABitOfEverything) GetMappedStringValue

func (x *ABitOfEverything) GetMappedStringValue() map[string]string

func (*ABitOfEverything) GetNested

func (x *ABitOfEverything) GetNested() []*ABitOfEverything_Nested

func (*ABitOfEverything) GetNestedAnnotation

func (x *ABitOfEverything) GetNestedAnnotation() *ABitOfEverything_Nested

func (*ABitOfEverything) GetNonConventionalNameValue

func (x *ABitOfEverything) GetNonConventionalNameValue() string

func (*ABitOfEverything) GetOneofEmpty

func (x *ABitOfEverything) GetOneofEmpty() *emptypb.Empty

func (*ABitOfEverything) GetOneofString

func (x *ABitOfEverything) GetOneofString() string

func (*ABitOfEverything) GetOneofValue

func (m *ABitOfEverything) GetOneofValue() isABitOfEverything_OneofValue

func (*ABitOfEverything) GetOutputOnlyStringViaFieldBehaviorAnnotation

func (x *ABitOfEverything) GetOutputOnlyStringViaFieldBehaviorAnnotation() string

func (*ABitOfEverything) GetRepeatedEnumAnnotation

func (x *ABitOfEverything) GetRepeatedEnumAnnotation() []NumericEnum

func (*ABitOfEverything) GetRepeatedEnumValue

func (x *ABitOfEverything) GetRepeatedEnumValue() []NumericEnum

func (*ABitOfEverything) GetRepeatedNestedAnnotation

func (x *ABitOfEverything) GetRepeatedNestedAnnotation() []*ABitOfEverything_Nested

func (*ABitOfEverything) GetRepeatedStringAnnotation

func (x *ABitOfEverything) GetRepeatedStringAnnotation() []string

func (*ABitOfEverything) GetRepeatedStringValue

func (x *ABitOfEverything) GetRepeatedStringValue() []string

func (*ABitOfEverything) GetRequiredStringViaFieldBehaviorAnnotation

func (x *ABitOfEverything) GetRequiredStringViaFieldBehaviorAnnotation() string

func (*ABitOfEverything) GetSfixed32Value

func (x *ABitOfEverything) GetSfixed32Value() int32

func (*ABitOfEverything) GetSfixed64Value

func (x *ABitOfEverything) GetSfixed64Value() int64

func (*ABitOfEverything) GetSingleNested

func (x *ABitOfEverything) GetSingleNested() *ABitOfEverything_Nested

func (*ABitOfEverything) GetSint32Value

func (x *ABitOfEverything) GetSint32Value() int32

func (*ABitOfEverything) GetSint64Value

func (x *ABitOfEverything) GetSint64Value() int64

func (*ABitOfEverything) GetStringValue

func (x *ABitOfEverything) GetStringValue() string

func (*ABitOfEverything) GetTimestampValue

func (x *ABitOfEverything) GetTimestampValue() *timestamppb.Timestamp

func (*ABitOfEverything) GetUint32Value

func (x *ABitOfEverything) GetUint32Value() uint32

func (*ABitOfEverything) GetUint64Value

func (x *ABitOfEverything) GetUint64Value() uint64

func (*ABitOfEverything) GetUuid

func (x *ABitOfEverything) GetUuid() string

func (*ABitOfEverything) ProtoMessage

func (*ABitOfEverything) ProtoMessage()

func (*ABitOfEverything) ProtoReflect

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

func (*ABitOfEverything) Reset

func (x *ABitOfEverything) Reset()

func (*ABitOfEverything) String

func (x *ABitOfEverything) String() string

type ABitOfEverythingRepeated

type ABitOfEverythingRepeated struct {

	// repeated values. they are comma-separated in path
	PathRepeatedFloatValue    []float32     `` /* 140-byte string literal not displayed */
	PathRepeatedDoubleValue   []float64     `` /* 143-byte string literal not displayed */
	PathRepeatedInt64Value    []int64       `` /* 139-byte string literal not displayed */
	PathRepeatedUint64Value   []uint64      `` /* 142-byte string literal not displayed */
	PathRepeatedInt32Value    []int32       `` /* 139-byte string literal not displayed */
	PathRepeatedFixed64Value  []uint64      `` /* 146-byte string literal not displayed */
	PathRepeatedFixed32Value  []uint32      `` /* 146-byte string literal not displayed */
	PathRepeatedBoolValue     []bool        `` /* 136-byte string literal not displayed */
	PathRepeatedStringValue   []string      `` /* 134-byte string literal not displayed */
	PathRepeatedBytesValue    [][]byte      `` /* 132-byte string literal not displayed */
	PathRepeatedUint32Value   []uint32      `` /* 143-byte string literal not displayed */
	PathRepeatedEnumValue     []NumericEnum `` /* 158-byte string literal not displayed */
	PathRepeatedSfixed32Value []int32       `` /* 150-byte string literal not displayed */
	PathRepeatedSfixed64Value []int64       `` /* 150-byte string literal not displayed */
	PathRepeatedSint32Value   []int32       `` /* 145-byte string literal not displayed */
	PathRepeatedSint64Value   []int64       `` /* 145-byte string literal not displayed */
	// contains filtered or unexported fields
}

ABitOfEverythingRepeated is used to validate repeated path parameter functionality

func (*ABitOfEverythingRepeated) Descriptor deprecated

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

Deprecated: Use ABitOfEverythingRepeated.ProtoReflect.Descriptor instead.

func (*ABitOfEverythingRepeated) GetPathRepeatedBoolValue

func (x *ABitOfEverythingRepeated) GetPathRepeatedBoolValue() []bool

func (*ABitOfEverythingRepeated) GetPathRepeatedBytesValue

func (x *ABitOfEverythingRepeated) GetPathRepeatedBytesValue() [][]byte

func (*ABitOfEverythingRepeated) GetPathRepeatedDoubleValue

func (x *ABitOfEverythingRepeated) GetPathRepeatedDoubleValue() []float64

func (*ABitOfEverythingRepeated) GetPathRepeatedEnumValue

func (x *ABitOfEverythingRepeated) GetPathRepeatedEnumValue() []NumericEnum

func (*ABitOfEverythingRepeated) GetPathRepeatedFixed32Value

func (x *ABitOfEverythingRepeated) GetPathRepeatedFixed32Value() []uint32

func (*ABitOfEverythingRepeated) GetPathRepeatedFixed64Value

func (x *ABitOfEverythingRepeated) GetPathRepeatedFixed64Value() []uint64

func (*ABitOfEverythingRepeated) GetPathRepeatedFloatValue

func (x *ABitOfEverythingRepeated) GetPathRepeatedFloatValue() []float32

func (*ABitOfEverythingRepeated) GetPathRepeatedInt32Value

func (x *ABitOfEverythingRepeated) GetPathRepeatedInt32Value() []int32

func (*ABitOfEverythingRepeated) GetPathRepeatedInt64Value

func (x *ABitOfEverythingRepeated) GetPathRepeatedInt64Value() []int64

func (*ABitOfEverythingRepeated) GetPathRepeatedSfixed32Value

func (x *ABitOfEverythingRepeated) GetPathRepeatedSfixed32Value() []int32

func (*ABitOfEverythingRepeated) GetPathRepeatedSfixed64Value

func (x *ABitOfEverythingRepeated) GetPathRepeatedSfixed64Value() []int64

func (*ABitOfEverythingRepeated) GetPathRepeatedSint32Value

func (x *ABitOfEverythingRepeated) GetPathRepeatedSint32Value() []int32

func (*ABitOfEverythingRepeated) GetPathRepeatedSint64Value

func (x *ABitOfEverythingRepeated) GetPathRepeatedSint64Value() []int64

func (*ABitOfEverythingRepeated) GetPathRepeatedStringValue

func (x *ABitOfEverythingRepeated) GetPathRepeatedStringValue() []string

func (*ABitOfEverythingRepeated) GetPathRepeatedUint32Value

func (x *ABitOfEverythingRepeated) GetPathRepeatedUint32Value() []uint32

func (*ABitOfEverythingRepeated) GetPathRepeatedUint64Value

func (x *ABitOfEverythingRepeated) GetPathRepeatedUint64Value() []uint64

func (*ABitOfEverythingRepeated) ProtoMessage

func (*ABitOfEverythingRepeated) ProtoMessage()

func (*ABitOfEverythingRepeated) ProtoReflect

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

func (*ABitOfEverythingRepeated) Reset

func (x *ABitOfEverythingRepeated) Reset()

func (*ABitOfEverythingRepeated) String

func (x *ABitOfEverythingRepeated) String() string

type ABitOfEverythingService

type ABitOfEverythingService interface {
	// Create a new ABitOfEverything
	//
	// This API creates a new ABitOfEverything
	Create(context.Context, *ABitOfEverything) (*ABitOfEverything, error)

	CreateBody(context.Context, *ABitOfEverything) (*ABitOfEverything, error)

	// Create a book.
	CreateBook(context.Context, *CreateBookRequest) (*Book, error)

	UpdateBook(context.Context, *UpdateBookRequest) (*Book, error)

	Update(context.Context, *ABitOfEverything) (*google_protobuf1.Empty, error)

	UpdateV2(context.Context, *UpdateV2Request) (*google_protobuf1.Empty, error)

	//  rpc Delete(grpc.gateway.examples.internal.proto.sub2.IdMessage) returns (google.protobuf.Empty) {
	// option (google.api.http) = {
	//      delete: "/v1/example/a_bit_of_everything/{uuid}"
	//    };
	// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
	//      security: {
	//        security_requirement: {
	//          key: "ApiKeyAuth";
	//          value: {}
	//        }
	//        security_requirement: {
	//          key: "OAuth2";
	//          value: {
	//            scope: "read";
	//            scope: "write";
	//          }
	//        }
	//      }
	//      extensions: {
	//        key: "x-irreversible";
	//        value {
	//          bool_value: true;
	//        }
	//      }
	//    };
	//  }
	GetQuery(context.Context, *ABitOfEverything) (*google_protobuf1.Empty, error)

	GetRepeatedQuery(context.Context, *ABitOfEverythingRepeated) (*ABitOfEverythingRepeated, error)

	// Echo allows posting a StringMessage value.
	//
	// It also exposes multiple bindings.
	//
	// This makes it useful when validating that the OpenAPI v2 API
	// description exposes documentation correctly on all paths
	// defined as additional_bindings in the proto.
	//  rpc Echo(grpc.gateway.examples.internal.proto.sub.StringMessage) returns (grpc.gateway.examples.internal.proto.sub.StringMessage) {
	// option (google.api.http) = {
	//      get: "/v1/example/a_bit_of_everything/echo/{value}"
	//      additional_bindings {
	//        post: "/v2/example/echo"
	//        body: "value"
	//      }
	//      additional_bindings {
	//        get: "/v2/example/echo"
	//      }
	//    };
	// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
	//      description: "Description Echo";
	//      summary: "Summary: Echo rpc";
	//      tags: "echo rpc";
	//      external_docs: {
	//        url: "https://github.com/grpc-ecosystem/grpc-gateway";
	//        description: "Find out more Echo";
	//      }
	//      responses: {
	//        key: "200"
	//        value: {
	//          examples: {
	//            key: "application/json"
	//            value: '{"value": "the input value"}'
	//          }
	//        }
	//      }
	//      responses: {
	//        key: "503";
	//        value: {
	//          description: "Returned when the resource is temporarily unavailable.";
	//          extensions: {
	//            key: "x-number";
	//            value {
	//              number_value: 100;
	//            }
	//          }
	//        }
	//      }
	//      responses: {
	//        // Overwrites global definition.
	//        key: "404";
	//        value: {
	//          description: "Returned when the resource does not exist.";
	//          schema: {
	//            json_schema: {
	//              type: INTEGER;
	//            }
	//          }
	//        }
	//      }
	//    };
	//  }
	DeepPathEcho(context.Context, *ABitOfEverything) (*ABitOfEverything, error)

	NoBindings(context.Context, *google_protobuf6.Duration) (*google_protobuf1.Empty, error)

	Timeout(context.Context, *google_protobuf1.Empty) (*google_protobuf1.Empty, error)

	ErrorWithDetails(context.Context, *google_protobuf1.Empty) (*google_protobuf1.Empty, error)

	GetMessageWithBody(context.Context, *MessageWithBody) (*google_protobuf1.Empty, error)

	PostWithEmptyBody(context.Context, *Body) (*google_protobuf1.Empty, error)

	CheckGetQueryParams(context.Context, *ABitOfEverything) (*ABitOfEverything, error)

	CheckNestedEnumGetQueryParams(context.Context, *ABitOfEverything) (*ABitOfEverything, error)

	CheckPostQueryParams(context.Context, *ABitOfEverything) (*ABitOfEverything, error)

	OverwriteResponseContentType(context.Context, *google_protobuf1.Empty) (*google_protobuf2.StringValue, error)

	CheckStatus(context.Context, *google_protobuf1.Empty) (*CheckStatusResponse, error)
}

ABitOfEverything service is used to validate that APIs with complicated proto messages and URL templates are still processed correctly.

func NewABitOfEverythingServiceJSONClient

func NewABitOfEverythingServiceJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) ABitOfEverythingService

NewABitOfEverythingServiceJSONClient creates a JSON client that implements the ABitOfEverythingService interface. It communicates using JSON and can be configured with a custom HTTPClient.

func NewABitOfEverythingServiceProtobufClient

func NewABitOfEverythingServiceProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) ABitOfEverythingService

NewABitOfEverythingServiceProtobufClient creates a Protobuf client that implements the ABitOfEverythingService interface. It communicates using Protobuf and can be configured with a custom HTTPClient.

type ABitOfEverythingServiceClient

type ABitOfEverythingServiceClient interface {
	// Create a new ABitOfEverything
	//
	// This API creates a new ABitOfEverything
	Create(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error)
	CreateBody(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error)
	// Create a book.
	CreateBook(ctx context.Context, in *CreateBookRequest, opts ...grpc.CallOption) (*Book, error)
	UpdateBook(ctx context.Context, in *UpdateBookRequest, opts ...grpc.CallOption) (*Book, error)
	Update(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*emptypb.Empty, error)
	UpdateV2(ctx context.Context, in *UpdateV2Request, opts ...grpc.CallOption) (*emptypb.Empty, error)
	//  rpc Delete(grpc.gateway.examples.internal.proto.sub2.IdMessage) returns (google.protobuf.Empty) {
	// option (google.api.http) = {
	//      delete: "/v1/example/a_bit_of_everything/{uuid}"
	//    };
	// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
	//      security: {
	//        security_requirement: {
	//          key: "ApiKeyAuth";
	//          value: {}
	//        }
	//        security_requirement: {
	//          key: "OAuth2";
	//          value: {
	//            scope: "read";
	//            scope: "write";
	//          }
	//        }
	//      }
	//      extensions: {
	//        key: "x-irreversible";
	//        value {
	//          bool_value: true;
	//        }
	//      }
	//    };
	//  }
	GetQuery(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*emptypb.Empty, error)
	GetRepeatedQuery(ctx context.Context, in *ABitOfEverythingRepeated, opts ...grpc.CallOption) (*ABitOfEverythingRepeated, error)
	// Echo allows posting a StringMessage value.
	//
	// It also exposes multiple bindings.
	//
	// This makes it useful when validating that the OpenAPI v2 API
	// description exposes documentation correctly on all paths
	// defined as additional_bindings in the proto.
	//  rpc Echo(grpc.gateway.examples.internal.proto.sub.StringMessage) returns (grpc.gateway.examples.internal.proto.sub.StringMessage) {
	// option (google.api.http) = {
	//      get: "/v1/example/a_bit_of_everything/echo/{value}"
	//      additional_bindings {
	//        post: "/v2/example/echo"
	//        body: "value"
	//      }
	//      additional_bindings {
	//        get: "/v2/example/echo"
	//      }
	//    };
	// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
	//      description: "Description Echo";
	//      summary: "Summary: Echo rpc";
	//      tags: "echo rpc";
	//      external_docs: {
	//        url: "https://github.com/grpc-ecosystem/grpc-gateway";
	//        description: "Find out more Echo";
	//      }
	//      responses: {
	//        key: "200"
	//        value: {
	//          examples: {
	//            key: "application/json"
	//            value: '{"value": "the input value"}'
	//          }
	//        }
	//      }
	//      responses: {
	//        key: "503";
	//        value: {
	//          description: "Returned when the resource is temporarily unavailable.";
	//          extensions: {
	//            key: "x-number";
	//            value {
	//              number_value: 100;
	//            }
	//          }
	//        }
	//      }
	//      responses: {
	//        // Overwrites global definition.
	//        key: "404";
	//        value: {
	//          description: "Returned when the resource does not exist.";
	//          schema: {
	//            json_schema: {
	//              type: INTEGER;
	//            }
	//          }
	//        }
	//      }
	//    };
	//  }
	DeepPathEcho(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error)
	NoBindings(ctx context.Context, in *durationpb.Duration, opts ...grpc.CallOption) (*emptypb.Empty, error)
	Timeout(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	ErrorWithDetails(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	GetMessageWithBody(ctx context.Context, in *MessageWithBody, opts ...grpc.CallOption) (*emptypb.Empty, error)
	PostWithEmptyBody(ctx context.Context, in *Body, opts ...grpc.CallOption) (*emptypb.Empty, error)
	CheckGetQueryParams(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error)
	CheckNestedEnumGetQueryParams(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error)
	CheckPostQueryParams(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error)
	OverwriteResponseContentType(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error)
	CheckStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*CheckStatusResponse, error)
}

ABitOfEverythingServiceClient is the client API for ABitOfEverythingService 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.

type ABitOfEverythingServiceServer

type ABitOfEverythingServiceServer interface {
	// Create a new ABitOfEverything
	//
	// This API creates a new ABitOfEverything
	Create(context.Context, *ABitOfEverything) (*ABitOfEverything, error)
	CreateBody(context.Context, *ABitOfEverything) (*ABitOfEverything, error)
	// Create a book.
	CreateBook(context.Context, *CreateBookRequest) (*Book, error)
	UpdateBook(context.Context, *UpdateBookRequest) (*Book, error)
	Update(context.Context, *ABitOfEverything) (*emptypb.Empty, error)
	UpdateV2(context.Context, *UpdateV2Request) (*emptypb.Empty, error)
	//  rpc Delete(grpc.gateway.examples.internal.proto.sub2.IdMessage) returns (google.protobuf.Empty) {
	// option (google.api.http) = {
	//      delete: "/v1/example/a_bit_of_everything/{uuid}"
	//    };
	// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
	//      security: {
	//        security_requirement: {
	//          key: "ApiKeyAuth";
	//          value: {}
	//        }
	//        security_requirement: {
	//          key: "OAuth2";
	//          value: {
	//            scope: "read";
	//            scope: "write";
	//          }
	//        }
	//      }
	//      extensions: {
	//        key: "x-irreversible";
	//        value {
	//          bool_value: true;
	//        }
	//      }
	//    };
	//  }
	GetQuery(context.Context, *ABitOfEverything) (*emptypb.Empty, error)
	GetRepeatedQuery(context.Context, *ABitOfEverythingRepeated) (*ABitOfEverythingRepeated, error)
	// Echo allows posting a StringMessage value.
	//
	// It also exposes multiple bindings.
	//
	// This makes it useful when validating that the OpenAPI v2 API
	// description exposes documentation correctly on all paths
	// defined as additional_bindings in the proto.
	//  rpc Echo(grpc.gateway.examples.internal.proto.sub.StringMessage) returns (grpc.gateway.examples.internal.proto.sub.StringMessage) {
	// option (google.api.http) = {
	//      get: "/v1/example/a_bit_of_everything/echo/{value}"
	//      additional_bindings {
	//        post: "/v2/example/echo"
	//        body: "value"
	//      }
	//      additional_bindings {
	//        get: "/v2/example/echo"
	//      }
	//    };
	// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
	//      description: "Description Echo";
	//      summary: "Summary: Echo rpc";
	//      tags: "echo rpc";
	//      external_docs: {
	//        url: "https://github.com/grpc-ecosystem/grpc-gateway";
	//        description: "Find out more Echo";
	//      }
	//      responses: {
	//        key: "200"
	//        value: {
	//          examples: {
	//            key: "application/json"
	//            value: '{"value": "the input value"}'
	//          }
	//        }
	//      }
	//      responses: {
	//        key: "503";
	//        value: {
	//          description: "Returned when the resource is temporarily unavailable.";
	//          extensions: {
	//            key: "x-number";
	//            value {
	//              number_value: 100;
	//            }
	//          }
	//        }
	//      }
	//      responses: {
	//        // Overwrites global definition.
	//        key: "404";
	//        value: {
	//          description: "Returned when the resource does not exist.";
	//          schema: {
	//            json_schema: {
	//              type: INTEGER;
	//            }
	//          }
	//        }
	//      }
	//    };
	//  }
	DeepPathEcho(context.Context, *ABitOfEverything) (*ABitOfEverything, error)
	NoBindings(context.Context, *durationpb.Duration) (*emptypb.Empty, error)
	Timeout(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	ErrorWithDetails(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	GetMessageWithBody(context.Context, *MessageWithBody) (*emptypb.Empty, error)
	PostWithEmptyBody(context.Context, *Body) (*emptypb.Empty, error)
	CheckGetQueryParams(context.Context, *ABitOfEverything) (*ABitOfEverything, error)
	CheckNestedEnumGetQueryParams(context.Context, *ABitOfEverything) (*ABitOfEverything, error)
	CheckPostQueryParams(context.Context, *ABitOfEverything) (*ABitOfEverything, error)
	OverwriteResponseContentType(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
	CheckStatus(context.Context, *emptypb.Empty) (*CheckStatusResponse, error)
}

ABitOfEverythingServiceServer is the server API for ABitOfEverythingService service. All implementations should embed UnimplementedABitOfEverythingServiceServer for forward compatibility

type ABitOfEverything_Nested

type ABitOfEverything_Nested struct {

	// name is nested field.
	Name   string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Amount uint32 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
	// DeepEnum comment.
	Ok ABitOfEverything_Nested_DeepEnum `protobuf:"varint,3,opt,name=ok,proto3,enum=gid.ABitOfEverything_Nested_DeepEnum" json:"ok,omitempty"`
	// contains filtered or unexported fields
}

Nested is nested type.

func (*ABitOfEverything_Nested) Descriptor deprecated

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

Deprecated: Use ABitOfEverything_Nested.ProtoReflect.Descriptor instead.

func (*ABitOfEverything_Nested) GetAmount

func (x *ABitOfEverything_Nested) GetAmount() uint32

func (*ABitOfEverything_Nested) GetName

func (x *ABitOfEverything_Nested) GetName() string

func (*ABitOfEverything_Nested) GetOk

func (*ABitOfEverything_Nested) ProtoMessage

func (*ABitOfEverything_Nested) ProtoMessage()

func (*ABitOfEverything_Nested) ProtoReflect

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

func (*ABitOfEverything_Nested) Reset

func (x *ABitOfEverything_Nested) Reset()

func (*ABitOfEverything_Nested) String

func (x *ABitOfEverything_Nested) String() string

type ABitOfEverything_Nested_DeepEnum

type ABitOfEverything_Nested_DeepEnum int32

DeepEnum is one or zero.

const (
	// FALSE is false.
	ABitOfEverything_Nested_FALSE ABitOfEverything_Nested_DeepEnum = 0
	// TRUE is true.
	ABitOfEverything_Nested_TRUE ABitOfEverything_Nested_DeepEnum = 1
)

func (ABitOfEverything_Nested_DeepEnum) Descriptor

func (ABitOfEverything_Nested_DeepEnum) Enum

func (ABitOfEverything_Nested_DeepEnum) EnumDescriptor deprecated

func (ABitOfEverything_Nested_DeepEnum) EnumDescriptor() ([]byte, []int)

Deprecated: Use ABitOfEverything_Nested_DeepEnum.Descriptor instead.

func (ABitOfEverything_Nested_DeepEnum) Number

func (ABitOfEverything_Nested_DeepEnum) String

func (ABitOfEverything_Nested_DeepEnum) Type

type ABitOfEverything_OneofEmpty

type ABitOfEverything_OneofEmpty struct {
	OneofEmpty *emptypb.Empty `protobuf:"bytes,20,opt,name=oneof_empty,json=oneofEmpty,proto3,oneof"`
}

type ABitOfEverything_OneofString

type ABitOfEverything_OneofString struct {
	OneofString string `protobuf:"bytes,21,opt,name=oneof_string,json=oneofString,proto3,oneof"`
}

type AnotherServiceWithNoBindings

type AnotherServiceWithNoBindings interface {
	NoBindings(context.Context, *google_protobuf1.Empty) (*google_protobuf1.Empty, error)
}

func NewAnotherServiceWithNoBindingsJSONClient

func NewAnotherServiceWithNoBindingsJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) AnotherServiceWithNoBindings

NewAnotherServiceWithNoBindingsJSONClient creates a JSON client that implements the AnotherServiceWithNoBindings interface. It communicates using JSON and can be configured with a custom HTTPClient.

func NewAnotherServiceWithNoBindingsProtobufClient

func NewAnotherServiceWithNoBindingsProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) AnotherServiceWithNoBindings

NewAnotherServiceWithNoBindingsProtobufClient creates a Protobuf client that implements the AnotherServiceWithNoBindings interface. It communicates using Protobuf and can be configured with a custom HTTPClient.

type AnotherServiceWithNoBindingsClient

type AnotherServiceWithNoBindingsClient interface {
	NoBindings(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

AnotherServiceWithNoBindingsClient is the client API for AnotherServiceWithNoBindings 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.

type AnotherServiceWithNoBindingsServer

type AnotherServiceWithNoBindingsServer interface {
	NoBindings(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
}

AnotherServiceWithNoBindingsServer is the server API for AnotherServiceWithNoBindings service. All implementations should embed UnimplementedAnotherServiceWithNoBindingsServer for forward compatibility

type Body

type Body struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*Body) Descriptor deprecated

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

Deprecated: Use Body.ProtoReflect.Descriptor instead.

func (*Body) GetName

func (x *Body) GetName() string

func (*Body) ProtoMessage

func (*Body) ProtoMessage()

func (*Body) ProtoReflect

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

func (*Body) Reset

func (x *Body) Reset()

func (*Body) String

func (x *Body) String() string

type Book

type Book struct {

	// The resource name of the book.
	//
	// Format: `publishers/{publisher}/books/{book}`
	//
	// Example: `publishers/1257894000000000000/books/my-book`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Output only. The book's ID.
	Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// Output only. Creation time of the book.
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// contains filtered or unexported fields
}

An example resource type from AIP-123 used to test the behavior described in the CreateBookRequest message.

See: https://google.aip.dev/123

func (*Book) Descriptor deprecated

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

Deprecated: Use Book.ProtoReflect.Descriptor instead.

func (*Book) GetCreateTime

func (x *Book) GetCreateTime() *timestamppb.Timestamp

func (*Book) GetId

func (x *Book) GetId() string

func (*Book) GetName

func (x *Book) GetName() string

func (*Book) ProtoMessage

func (*Book) ProtoMessage()

func (*Book) ProtoReflect

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

func (*Book) Reset

func (x *Book) Reset()

func (*Book) String

func (x *Book) String() string

type CamelCaseServiceName

type CamelCaseServiceName interface {
	Empty(context.Context, *google_protobuf1.Empty) (*google_protobuf1.Empty, error)
}

camelCase and lowercase service names are valid but not recommended (use TitleCase instead)

func NewCamelCaseServiceNameJSONClient

func NewCamelCaseServiceNameJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) CamelCaseServiceName

NewCamelCaseServiceNameJSONClient creates a JSON client that implements the CamelCaseServiceName interface. It communicates using JSON and can be configured with a custom HTTPClient.

func NewCamelCaseServiceNameProtobufClient

func NewCamelCaseServiceNameProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) CamelCaseServiceName

NewCamelCaseServiceNameProtobufClient creates a Protobuf client that implements the CamelCaseServiceName interface. It communicates using Protobuf and can be configured with a custom HTTPClient.

type CamelCaseServiceNameClient

type CamelCaseServiceNameClient interface {
	Empty(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

CamelCaseServiceNameClient is the client API for CamelCaseServiceName 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.

type CamelCaseServiceNameServer

type CamelCaseServiceNameServer interface {
	Empty(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
}

CamelCaseServiceNameServer is the server API for CamelCaseServiceName service. All implementations should embed UnimplementedCamelCaseServiceNameServer for forward compatibility

type CheckStatusResponse

type CheckStatusResponse struct {
	Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckStatusResponse) Descriptor deprecated

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

Deprecated: Use CheckStatusResponse.ProtoReflect.Descriptor instead.

func (*CheckStatusResponse) GetStatus

func (x *CheckStatusResponse) GetStatus() *status.Status

func (*CheckStatusResponse) ProtoMessage

func (*CheckStatusResponse) ProtoMessage()

func (*CheckStatusResponse) ProtoReflect

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

func (*CheckStatusResponse) Reset

func (x *CheckStatusResponse) Reset()

func (*CheckStatusResponse) String

func (x *CheckStatusResponse) String() string

type CreateBookRequest

type CreateBookRequest struct {

	// The publisher in which to create the book.
	//
	// Format: `publishers/{publisher}`
	//
	// Example: `publishers/1257894000000000000`
	Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
	// The book to create.
	Book *Book `protobuf:"bytes,2,opt,name=book,proto3" json:"book,omitempty"`
	// The ID to use for the book.
	//
	// This must start with an alphanumeric character.
	BookId string `protobuf:"bytes,3,opt,name=book_id,json=bookId,proto3" json:"book_id,omitempty"`
	// contains filtered or unexported fields
}

A standard Create message from AIP-133 with a user-specified ID. The user-specified ID (the `book_id` field in this example) must become a query parameter in the OpenAPI spec.

See: https://google.aip.dev/133#user-specified-ids

func (*CreateBookRequest) Descriptor deprecated

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

Deprecated: Use CreateBookRequest.ProtoReflect.Descriptor instead.

func (*CreateBookRequest) GetBook

func (x *CreateBookRequest) GetBook() *Book

func (*CreateBookRequest) GetBookId

func (x *CreateBookRequest) GetBookId() string

func (*CreateBookRequest) GetParent

func (x *CreateBookRequest) GetParent() string

func (*CreateBookRequest) ProtoMessage

func (*CreateBookRequest) ProtoMessage()

func (*CreateBookRequest) ProtoReflect

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

func (*CreateBookRequest) Reset

func (x *CreateBookRequest) Reset()

func (*CreateBookRequest) String

func (x *CreateBookRequest) String() string

type ErrorObject

type ErrorObject struct {
	Code    int32  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*ErrorObject) Descriptor deprecated

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

Deprecated: Use ErrorObject.ProtoReflect.Descriptor instead.

func (*ErrorObject) GetCode

func (x *ErrorObject) GetCode() int32

func (*ErrorObject) GetMessage

func (x *ErrorObject) GetMessage() string

func (*ErrorObject) ProtoMessage

func (*ErrorObject) ProtoMessage()

func (*ErrorObject) ProtoReflect

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

func (*ErrorObject) Reset

func (x *ErrorObject) Reset()

func (*ErrorObject) String

func (x *ErrorObject) String() string

type ErrorResponse

type ErrorResponse struct {
	CorrelationId string       `protobuf:"bytes,1,opt,name=correlationId,proto3" json:"correlationId,omitempty"`
	Error         *ErrorObject `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*ErrorResponse) Descriptor deprecated

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

Deprecated: Use ErrorResponse.ProtoReflect.Descriptor instead.

func (*ErrorResponse) GetCorrelationId

func (x *ErrorResponse) GetCorrelationId() string

func (*ErrorResponse) GetError

func (x *ErrorResponse) GetError() *ErrorObject

func (*ErrorResponse) ProtoMessage

func (*ErrorResponse) ProtoMessage()

func (*ErrorResponse) ProtoReflect

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

func (*ErrorResponse) Reset

func (x *ErrorResponse) Reset()

func (*ErrorResponse) String

func (x *ErrorResponse) String() string

type GenerateRequest

type GenerateRequest struct {

	// type of id e.g uuid, shortid, snowflake (64 bit), bigflake (128 bit)
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	// contains filtered or unexported fields
}

Generate a unique ID. Defaults to uuid.

func (*GenerateRequest) Descriptor deprecated

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

Deprecated: Use GenerateRequest.ProtoReflect.Descriptor instead.

func (*GenerateRequest) GetType

func (x *GenerateRequest) GetType() string

func (*GenerateRequest) ProtoMessage

func (*GenerateRequest) ProtoMessage()

func (*GenerateRequest) ProtoReflect

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

func (*GenerateRequest) Reset

func (x *GenerateRequest) Reset()

func (*GenerateRequest) String

func (x *GenerateRequest) String() string

type GenerateResponse

type GenerateResponse struct {

	// the unique id generated
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// the type of id generated
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*GenerateResponse) Descriptor deprecated

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

Deprecated: Use GenerateResponse.ProtoReflect.Descriptor instead.

func (*GenerateResponse) GetId

func (x *GenerateResponse) GetId() string

func (*GenerateResponse) GetType

func (x *GenerateResponse) GetType() string

func (*GenerateResponse) ProtoMessage

func (*GenerateResponse) ProtoMessage()

func (*GenerateResponse) ProtoReflect

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

func (*GenerateResponse) Reset

func (x *GenerateResponse) Reset()

func (*GenerateResponse) String

func (x *GenerateResponse) String() string

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient is the interface used by generated clients to send HTTP requests. It is fulfilled by *(net/http).Client, which is sufficient for most users. Users can provide their own implementation for special retry policies.

HTTPClient implementations should not follow redirects. Redirects are automatically disabled if *(net/http).Client is passed to client constructors. See the withoutRedirects function in this file for more details.

type MessageWithBody

type MessageWithBody struct {
	Id   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Data *Body  `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*MessageWithBody) Descriptor deprecated

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

Deprecated: Use MessageWithBody.ProtoReflect.Descriptor instead.

func (*MessageWithBody) GetData

func (x *MessageWithBody) GetData() *Body

func (*MessageWithBody) GetId

func (x *MessageWithBody) GetId() string

func (*MessageWithBody) ProtoMessage

func (*MessageWithBody) ProtoMessage()

func (*MessageWithBody) ProtoReflect

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

func (*MessageWithBody) Reset

func (x *MessageWithBody) Reset()

func (*MessageWithBody) String

func (x *MessageWithBody) String() string

type NumericEnum

type NumericEnum int32

NumericEnum is one or zero.

const (
	// ZERO means 0
	NumericEnum_ZERO NumericEnum = 0
	// ONE means 1
	NumericEnum_ONE NumericEnum = 1
)

func (NumericEnum) Descriptor

func (NumericEnum) Enum

func (x NumericEnum) Enum() *NumericEnum

func (NumericEnum) EnumDescriptor deprecated

func (NumericEnum) EnumDescriptor() ([]byte, []int)

Deprecated: Use NumericEnum.Descriptor instead.

func (NumericEnum) Number

func (x NumericEnum) Number() protoreflect.EnumNumber

func (NumericEnum) String

func (x NumericEnum) String() string

func (NumericEnum) Type

type Tag

type Tag struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Tag) Descriptor deprecated

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

Deprecated: Use Tag.ProtoReflect.Descriptor instead.

func (*Tag) GetKey

func (x *Tag) GetKey() string

func (*Tag) GetValue

func (x *Tag) GetValue() string

func (*Tag) ProtoMessage

func (*Tag) ProtoMessage()

func (*Tag) ProtoReflect

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

func (*Tag) Reset

func (x *Tag) Reset()

func (*Tag) String

func (x *Tag) String() string

type TwirpServer

type TwirpServer interface {
	http.Handler

	// ServiceDescriptor returns gzipped bytes describing the .proto file that
	// this service was generated from. Once unzipped, the bytes can be
	// unmarshalled as a
	// google.golang.org/protobuf/types/descriptorpb.FileDescriptorProto.
	//
	// The returned integer is the index of this particular service within that
	// FileDescriptorProto's 'Service' slice of ServiceDescriptorProtos. This is a
	// low-level field, expected to be used for reflection.
	ServiceDescriptor() ([]byte, int)

	// ProtocGenTwirpVersion is the semantic version string of the version of
	// twirp used to generate this file.
	ProtocGenTwirpVersion() string

	// PathPrefix returns the HTTP URL path prefix for all methods handled by this
	// service. This can be used with an HTTP mux to route Twirp requests.
	// The path prefix is in the form: "/<prefix>/<package>.<Service>/"
	// that is, everything in a Twirp route except for the <Method> at the end.
	PathPrefix() string
}

TwirpServer is the interface generated server structs will support: they're HTTP handlers with additional methods for accessing metadata about the service. Those accessors are a low-level API for building reflection tools. Most people can think of TwirpServers as just http.Handlers.

func NewABitOfEverythingServiceServer

func NewABitOfEverythingServiceServer(svc ABitOfEverythingService, opts ...interface{}) TwirpServer

NewABitOfEverythingServiceServer builds a TwirpServer that can be used as an http.Handler to handle HTTP requests that are routed to the right method in the provided svc implementation. The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks).

func NewAnotherServiceWithNoBindingsServer

func NewAnotherServiceWithNoBindingsServer(svc AnotherServiceWithNoBindings, opts ...interface{}) TwirpServer

NewAnotherServiceWithNoBindingsServer builds a TwirpServer that can be used as an http.Handler to handle HTTP requests that are routed to the right method in the provided svc implementation. The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks).

func NewCamelCaseServiceNameServer

func NewCamelCaseServiceNameServer(svc CamelCaseServiceName, opts ...interface{}) TwirpServer

NewCamelCaseServiceNameServer builds a TwirpServer that can be used as an http.Handler to handle HTTP requests that are routed to the right method in the provided svc implementation. The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks).

func NewUserServer

func NewUserServer(svc User, opts ...interface{}) TwirpServer

NewUserServer builds a TwirpServer that can be used as an http.Handler to handle HTTP requests that are routed to the right method in the provided svc implementation. The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks).

type TypesRequest

type TypesRequest struct {
	// contains filtered or unexported fields
}

List the types of IDs available. No query params needed.

func (*TypesRequest) Descriptor deprecated

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

Deprecated: Use TypesRequest.ProtoReflect.Descriptor instead.

func (*TypesRequest) ProtoMessage

func (*TypesRequest) ProtoMessage()

func (*TypesRequest) ProtoReflect

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

func (*TypesRequest) Reset

func (x *TypesRequest) Reset()

func (*TypesRequest) String

func (x *TypesRequest) String() string

type TypesResponse

type TypesResponse struct {
	Types []string `protobuf:"bytes,1,rep,name=types,proto3" json:"types,omitempty"`
	// contains filtered or unexported fields
}

TypesResponse 返回值类型

func (*TypesResponse) Descriptor deprecated

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

Deprecated: Use TypesResponse.ProtoReflect.Descriptor instead.

func (*TypesResponse) GetTypes

func (x *TypesResponse) GetTypes() []string

func (*TypesResponse) ProtoMessage

func (*TypesResponse) ProtoMessage()

func (*TypesResponse) ProtoReflect

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

func (*TypesResponse) Reset

func (x *TypesResponse) Reset()

func (*TypesResponse) String

func (x *TypesResponse) String() string

type UnimplementedABitOfEverythingServiceServer

type UnimplementedABitOfEverythingServiceServer struct {
}

UnimplementedABitOfEverythingServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedABitOfEverythingServiceServer) CheckGetQueryParams

func (UnimplementedABitOfEverythingServiceServer) CheckNestedEnumGetQueryParams

func (UnimplementedABitOfEverythingServiceServer) CheckPostQueryParams

func (UnimplementedABitOfEverythingServiceServer) CheckStatus

func (UnimplementedABitOfEverythingServiceServer) Create

func (UnimplementedABitOfEverythingServiceServer) CreateBody

func (UnimplementedABitOfEverythingServiceServer) CreateBook

func (UnimplementedABitOfEverythingServiceServer) DeepPathEcho

func (UnimplementedABitOfEverythingServiceServer) ErrorWithDetails

func (UnimplementedABitOfEverythingServiceServer) GetMessageWithBody

func (UnimplementedABitOfEverythingServiceServer) GetQuery

func (UnimplementedABitOfEverythingServiceServer) GetRepeatedQuery

func (UnimplementedABitOfEverythingServiceServer) NoBindings

func (UnimplementedABitOfEverythingServiceServer) OverwriteResponseContentType

func (UnimplementedABitOfEverythingServiceServer) PostWithEmptyBody

func (UnimplementedABitOfEverythingServiceServer) Timeout

func (UnimplementedABitOfEverythingServiceServer) Update

func (UnimplementedABitOfEverythingServiceServer) UpdateBook

func (UnimplementedABitOfEverythingServiceServer) UpdateV2

type UnimplementedAnotherServiceWithNoBindingsServer

type UnimplementedAnotherServiceWithNoBindingsServer struct {
}

UnimplementedAnotherServiceWithNoBindingsServer should be embedded to have forward compatible implementations.

func (UnimplementedAnotherServiceWithNoBindingsServer) NoBindings

type UnimplementedCamelCaseServiceNameServer

type UnimplementedCamelCaseServiceNameServer struct {
}

UnimplementedCamelCaseServiceNameServer should be embedded to have forward compatible implementations.

func (UnimplementedCamelCaseServiceNameServer) Empty

type UnimplementedUserServer

type UnimplementedUserServer struct {
}

UnimplementedUserServer should be embedded to have forward compatible implementations.

func (UnimplementedUserServer) Generate

func (UnimplementedUserServer) Types

type UnsafeABitOfEverythingServiceServer

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

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

type UnsafeAnotherServiceWithNoBindingsServer

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

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

type UnsafeCamelCaseServiceNameServer

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

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

type UnsafeUserServer

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

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

type UpdateBookRequest

type UpdateBookRequest struct {

	// The book to update.
	//
	// The book's `name` field is used to identify the book to be updated.
	// Format: publishers/{publisher}/books/{book}
	Book *Book `protobuf:"bytes,1,opt,name=book,proto3" json:"book,omitempty"`
	// The list of fields to be updated.
	UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
	// If set to true, and the book is not found, a new book will be created.
	// In this situation, `update_mask` is ignored.
	AllowMissing bool `protobuf:"varint,3,opt,name=allow_missing,json=allowMissing,proto3" json:"allow_missing,omitempty"`
	// contains filtered or unexported fields
}

A standard Update message from AIP-134

See: https://google.aip.dev/134#request-message

func (*UpdateBookRequest) Descriptor deprecated

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

Deprecated: Use UpdateBookRequest.ProtoReflect.Descriptor instead.

func (*UpdateBookRequest) GetAllowMissing

func (x *UpdateBookRequest) GetAllowMissing() bool

func (*UpdateBookRequest) GetBook

func (x *UpdateBookRequest) GetBook() *Book

func (*UpdateBookRequest) GetUpdateMask

func (x *UpdateBookRequest) GetUpdateMask() *fieldmaskpb.FieldMask

func (*UpdateBookRequest) ProtoMessage

func (*UpdateBookRequest) ProtoMessage()

func (*UpdateBookRequest) ProtoReflect

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

func (*UpdateBookRequest) Reset

func (x *UpdateBookRequest) Reset()

func (*UpdateBookRequest) String

func (x *UpdateBookRequest) String() string

type UpdateV2Request

type UpdateV2Request struct {
	Abe *ABitOfEverything `protobuf:"bytes,1,opt,name=abe,proto3" json:"abe,omitempty"`
	// The paths to update.
	UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
	// contains filtered or unexported fields
}

UpdateV2Request request for update includes the message and the update mask

func (*UpdateV2Request) Descriptor deprecated

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

Deprecated: Use UpdateV2Request.ProtoReflect.Descriptor instead.

func (*UpdateV2Request) GetAbe

func (x *UpdateV2Request) GetAbe() *ABitOfEverything

func (*UpdateV2Request) GetUpdateMask

func (x *UpdateV2Request) GetUpdateMask() *fieldmaskpb.FieldMask

func (*UpdateV2Request) ProtoMessage

func (*UpdateV2Request) ProtoMessage()

func (*UpdateV2Request) ProtoReflect

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

func (*UpdateV2Request) Reset

func (x *UpdateV2Request) Reset()

func (*UpdateV2Request) String

func (x *UpdateV2Request) String() string

type User

type User interface {
	// Generate 生成ID
	Generate(context.Context, *GenerateRequest) (*GenerateResponse, error)

	// Types id类型
	Types(context.Context, *TypesRequest) (*TypesResponse, error)
}

User 用户服务

func NewUserJSONClient

func NewUserJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) User

NewUserJSONClient creates a JSON client that implements the User interface. It communicates using JSON and can be configured with a custom HTTPClient.

func NewUserProtobufClient

func NewUserProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) User

NewUserProtobufClient creates a Protobuf client that implements the User interface. It communicates using Protobuf and can be configured with a custom HTTPClient.

type UserClient

type UserClient interface {
	// Generate 生成ID
	Generate(ctx context.Context, in *GenerateRequest, opts ...grpc.CallOption) (*GenerateResponse, error)
	// Types id类型
	Types(ctx context.Context, in *TypesRequest, opts ...grpc.CallOption) (*TypesResponse, error)
}

UserClient is the client API for User 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 NewUserClient

func NewUserClient(cc grpc.ClientConnInterface) UserClient

type UserServer

type UserServer interface {
	// Generate 生成ID
	Generate(context.Context, *GenerateRequest) (*GenerateResponse, error)
	// Types id类型
	Types(context.Context, *TypesRequest) (*TypesResponse, error)
}

UserServer is the server API for User service. All implementations should embed UnimplementedUserServer for forward compatibility

Jump to

Keyboard shortcuts

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