Documentation
¶
Index ¶
- Variables
- func Ptr[T any](v T) *T
- type Handler
- func (h *Handler) AllTextTypesGet(ctx context.Context, msg *proto.AllTextTypesMsg) (*proto.AllTextTypesMsg, error)
- func (h *Handler) AllTextTypesPost(ctx context.Context, msg *proto.AllTextTypesMsg) (*proto.AllTextTypesMsg, error)
- func (h *Handler) AllTypesMaxQueryTest(ctx context.Context, msg *proto.AllNumberTypesMsg) (*proto.AllNumberTypesMsg, error)
- func (h *Handler) AllTypesMaxTest(ctx context.Context, msg *proto.AllNumberTypesMsg) (*proto.AllNumberTypesMsg, error)
- func (h *Handler) AllTypesTest(_ context.Context, msg *proto.AllTypesMsg) (*proto.AllTypesMsg, error)
- func (h *Handler) CheckRepeatedPath(_ context.Context, req *proto.RepeatedCheck) (*proto.RepeatedCheck, error)
- func (h *Handler) CheckRepeatedPost(_ context.Context, req *proto.RepeatedCheck) (*proto.RepeatedCheck, error)
- func (h *Handler) CheckRepeatedQuery(_ context.Context, req *proto.RepeatedCheck) (*proto.RepeatedCheck, error)
- func (h *Handler) CommonTypes(_ context.Context, _ *anypb.Any) (*emptypb.Empty, error)
- func (h *Handler) EmptyGet(_ context.Context, _ *proto.Empty) (*proto.Empty, error)
- func (h *Handler) EmptyPost(_ context.Context, _ *proto.Empty) (*proto.Empty, error)
- func (h *Handler) GetMessage(ctx context.Context, request *proto.GetMessageRequest) (*proto.Message, error)
- func (h *Handler) GetMessageV2(ctx context.Context, request *proto.GetMessageRequestV2) (*proto.Message, error)
- func (h *Handler) GetMessageV3(ctx context.Context, request *proto.GetMessageRequestV3) (*proto.MessageV2, error)
- func (h *Handler) GetMessageV4(ctx context.Context, request *proto.GetMessageRequestV3) (*proto.MessageV2, error)
- func (h *Handler) GetMethod(_ context.Context, req *proto.InputMsgName) (*proto.OutputMsgName, error)
- func (h *Handler) MultipartForm(ctx context.Context, request *proto.MultipartFormRequest) (*proto.Empty, error)
- func (h *Handler) MultipartFormAllTypes(ctx context.Context, request *proto.MultipartFormAllTypes) (*proto.Empty, error)
- func (h *Handler) OnlyStructInGet(ctx context.Context, onlyStruct *proto.OnlyStruct) (*proto.Empty, error)
- func (h *Handler) Optional(_ context.Context, req *proto.OptionalField) (*proto.OptionalField, error)
- func (h *Handler) RPCName(_ context.Context, request *proto.InputMsgName) (*proto.OutputMsgName, error)
- func (h *Handler) SameInputAndOutput(_ context.Context, req *proto.InputMsgName) (*proto.OutputMsgName, error)
- func (h *Handler) TopLevelArray(ctx context.Context, req *proto.Array) (*proto.Array, error)
- func (h *Handler) UpdateMessage(ctx context.Context, request *proto.UpdateMessageRequest) (*proto.Message, error)
- func (h *Handler) UpdateMessageV2(ctx context.Context, request *proto.MessageV2) (*proto.MessageV2, error)
- func (h *Handler) UpdateMessageV3(ctx context.Context, request *proto.UpdateMessageRequest) (*proto.UpdateMessageRequest, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AllTextTypesMsg = proto.AllTextTypesMsg{ String_: "a a", RepeatedString: []string{"b b", "c c"}, OptionalString: &dd, Bytes: []byte("e e"), RepeatedBytes: [][]byte{[]byte("f f"), []byte("g g")}, OptionalBytes: hh, Enum: proto.Options_FIRST, RepeatedEnum: []proto.Options{proto.Options_FIRST, proto.Options_SECOND}, OptionalEnum: &opt, } AllTypesMsg = proto.AllTypesMsg{ SliceStringValue: []string{"a a", "b b"}, BytesValue: []byte("hello world"), StringValue: "hello world", } MultipartFormRequestMsg = proto.MultipartFormRequest{ Document: &proto.FileEx{ File: []byte(`file content`), Name: "file.exe", }, OtherField: "otherField", } MultipartFormRequestAllTypesMsg = proto.MultipartFormAllTypes{ BoolValue: true, EnumValue: proto.Options_SECOND, Int32Value: 1, Sint32Value: 2, Uint32Value: []uint32{3, 4}, Int64Value: 5, Sint64Value: Ptr(int64(6)), Uint64Value: 7, Sfixed32Value: 8, Fixed32Value: []uint32{9, 10}, FloatValue: 11.12, Sfixed64Value: 13, Fixed64Value: Ptr(uint64(14)), DoubleValue: 15.16, StringValue: "17 ", BytesValue: []byte(" 18"), SliceStringValue: []string{"19 20", "21"}, SliceInt32Value: []int32{22, 23}, Document: &proto.FileEx{ File: []byte(`file content`), Name: "file.exe", }, RepeatedStringValue: []string{"24"}, } NumberTypesMaxMsg = proto.AllNumberTypesMsg{ Int32Value: math.MaxInt32, Uint32Value: math.MaxUint32, Int64Value: math.MaxInt64, Uint64Value: math.MaxUint64, FloatValue: math.MaxFloat32, DoubleValue: math.MaxFloat64, } )
Functions ¶
Types ¶
type Handler ¶
type Handler struct {
}
func (*Handler) AllTextTypesGet ¶
func (h *Handler) AllTextTypesGet(ctx context.Context, msg *proto.AllTextTypesMsg) (*proto.AllTextTypesMsg, error)
func (*Handler) AllTextTypesPost ¶
func (h *Handler) AllTextTypesPost(ctx context.Context, msg *proto.AllTextTypesMsg) (*proto.AllTextTypesMsg, error)
func (*Handler) AllTypesMaxQueryTest ¶
func (h *Handler) AllTypesMaxQueryTest(ctx context.Context, msg *proto.AllNumberTypesMsg) (*proto.AllNumberTypesMsg, error)
func (*Handler) AllTypesMaxTest ¶
func (h *Handler) AllTypesMaxTest(ctx context.Context, msg *proto.AllNumberTypesMsg) (*proto.AllNumberTypesMsg, error)
func (*Handler) AllTypesTest ¶
func (h *Handler) AllTypesTest(_ context.Context, msg *proto.AllTypesMsg) (*proto.AllTypesMsg, error)
func (*Handler) CheckRepeatedPath ¶
func (h *Handler) CheckRepeatedPath(_ context.Context, req *proto.RepeatedCheck) (*proto.RepeatedCheck, error)
func (*Handler) CheckRepeatedPost ¶
func (h *Handler) CheckRepeatedPost(_ context.Context, req *proto.RepeatedCheck) (*proto.RepeatedCheck, error)
func (*Handler) CheckRepeatedQuery ¶
func (h *Handler) CheckRepeatedQuery(_ context.Context, req *proto.RepeatedCheck) (*proto.RepeatedCheck, error)
func (*Handler) CommonTypes ¶
func (*Handler) GetMessage ¶
func (*Handler) GetMessageV2 ¶
func (*Handler) GetMessageV3 ¶
func (*Handler) GetMessageV4 ¶
func (*Handler) GetMethod ¶
func (h *Handler) GetMethod(_ context.Context, req *proto.InputMsgName) (*proto.OutputMsgName, error)
func (*Handler) MultipartForm ¶
func (*Handler) MultipartFormAllTypes ¶
func (*Handler) OnlyStructInGet ¶
func (*Handler) Optional ¶
func (h *Handler) Optional(_ context.Context, req *proto.OptionalField) (*proto.OptionalField, error)
func (*Handler) RPCName ¶
func (h *Handler) RPCName(_ context.Context, request *proto.InputMsgName) (*proto.OutputMsgName, error)
func (*Handler) SameInputAndOutput ¶
func (h *Handler) SameInputAndOutput(_ context.Context, req *proto.InputMsgName) (*proto.OutputMsgName, error)
func (*Handler) TopLevelArray ¶
func (*Handler) UpdateMessage ¶
func (*Handler) UpdateMessageV2 ¶
func (*Handler) UpdateMessageV3 ¶
func (h *Handler) UpdateMessageV3(ctx context.Context, request *proto.UpdateMessageRequest) (*proto.UpdateMessageRequest, error)
Click to show internal directories.
Click to hide internal directories.