implementation

package
v0.0.0-...-8ef16d9 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

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

func Ptr

func Ptr[T any](v T) *T

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 (h *Handler) CommonTypes(_ context.Context, _ *anypb.Any) (*emptypb.Empty, error)

func (*Handler) EmptyGet

func (h *Handler) EmptyGet(_ context.Context, _ *proto.Empty) (*proto.Empty, error)

func (*Handler) EmptyPost

func (h *Handler) EmptyPost(_ context.Context, _ *proto.Empty) (*proto.Empty, error)

func (*Handler) GetMessage

func (h *Handler) GetMessage(ctx context.Context, request *proto.GetMessageRequest) (*proto.Message, error)

func (*Handler) GetMessageV2

func (h *Handler) GetMessageV2(ctx context.Context, request *proto.GetMessageRequestV2) (*proto.Message, error)

func (*Handler) GetMessageV3

func (h *Handler) GetMessageV3(ctx context.Context, request *proto.GetMessageRequestV3) (*proto.MessageV2, error)

func (*Handler) GetMessageV4

func (h *Handler) GetMessageV4(ctx context.Context, request *proto.GetMessageRequestV3) (*proto.MessageV2, error)

func (*Handler) GetMethod

func (h *Handler) GetMethod(_ context.Context, req *proto.InputMsgName) (*proto.OutputMsgName, error)

func (*Handler) MultipartForm

func (h *Handler) MultipartForm(ctx context.Context, request *proto.MultipartFormRequest) (*proto.Empty, error)

func (*Handler) MultipartFormAllTypes

func (h *Handler) MultipartFormAllTypes(ctx context.Context, request *proto.MultipartFormAllTypes) (*proto.Empty, error)

func (*Handler) OnlyStructInGet

func (h *Handler) OnlyStructInGet(ctx context.Context, onlyStruct *proto.OnlyStruct) (*proto.Empty, error)

func (*Handler) Optional

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 (h *Handler) TopLevelArray(ctx context.Context, req *proto.Array) (*proto.Array, error)

func (*Handler) UpdateMessage

func (h *Handler) UpdateMessage(ctx context.Context, request *proto.UpdateMessageRequest) (*proto.Message, error)

func (*Handler) UpdateMessageV2

func (h *Handler) UpdateMessageV2(ctx context.Context, request *proto.MessageV2) (*proto.MessageV2, error)

func (*Handler) UpdateMessageV3

func (h *Handler) UpdateMessageV3(ctx context.Context, request *proto.UpdateMessageRequest) (*proto.UpdateMessageRequest, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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