oneof

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_oneof_proto protoreflect.FileDescriptor

Functions

func NewOneOfServer

func NewOneOfServer(handler OneOf, opts ...OneOfServerOption) http.Handler

Types

type OneOf

type OneOf interface {
	Echo(context.Context, *OneOfRequest) (*OneOfReply, error)
}

type OneOfClient

type OneOfClient struct {
	ranger.Client
	// contains filtered or unexported fields
}

func NewOneOfClient

func NewOneOfClient(addr string, client ranger.HTTPClient, plugins ...ranger.ClientPlugin) (*OneOfClient, error)

func (*OneOfClient) Echo

func (c *OneOfClient) Echo(ctx context.Context, in *OneOfRequest) (*OneOfReply, error)

type OneOfReply

type OneOfReply struct {

	// Types that are assignable to Options:
	//
	//	*OneOfReply_Text
	//	*OneOfReply_Number
	Options isOneOfReply_Options `protobuf_oneof:"options"`
	// contains filtered or unexported fields
}

func (*OneOfReply) Descriptor deprecated

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

Deprecated: Use OneOfReply.ProtoReflect.Descriptor instead.

func (*OneOfReply) GetNumber

func (x *OneOfReply) GetNumber() int64

func (*OneOfReply) GetOptions

func (m *OneOfReply) GetOptions() isOneOfReply_Options

func (*OneOfReply) GetText

func (x *OneOfReply) GetText() string

func (*OneOfReply) ProtoMessage

func (*OneOfReply) ProtoMessage()

func (*OneOfReply) ProtoReflect

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

func (*OneOfReply) Reset

func (x *OneOfReply) Reset()

func (*OneOfReply) String

func (x *OneOfReply) String() string

type OneOfReply_Number

type OneOfReply_Number struct {
	Number int64 `protobuf:"varint,2,opt,name=number,proto3,oneof"`
}

type OneOfReply_Text

type OneOfReply_Text struct {
	Text string `protobuf:"bytes,1,opt,name=text,proto3,oneof"`
}

type OneOfRequest

type OneOfRequest struct {

	// Types that are assignable to Options:
	//
	//	*OneOfRequest_Text
	//	*OneOfRequest_Number
	Options isOneOfRequest_Options `protobuf_oneof:"options"`
	// contains filtered or unexported fields
}

func (*OneOfRequest) Descriptor deprecated

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

Deprecated: Use OneOfRequest.ProtoReflect.Descriptor instead.

func (*OneOfRequest) GetNumber

func (x *OneOfRequest) GetNumber() int64

func (*OneOfRequest) GetOptions

func (m *OneOfRequest) GetOptions() isOneOfRequest_Options

func (*OneOfRequest) GetText

func (x *OneOfRequest) GetText() string

func (*OneOfRequest) ProtoMessage

func (*OneOfRequest) ProtoMessage()

func (*OneOfRequest) ProtoReflect

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

func (*OneOfRequest) Reset

func (x *OneOfRequest) Reset()

func (*OneOfRequest) String

func (x *OneOfRequest) String() string

type OneOfRequest_Number

type OneOfRequest_Number struct {
	Number int64 `protobuf:"varint,2,opt,name=number,proto3,oneof"`
}

type OneOfRequest_Text

type OneOfRequest_Text struct {
	Text string `protobuf:"bytes,1,opt,name=text,proto3,oneof"`
}

type OneOfServer

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

func (*OneOfServer) Echo

func (p *OneOfServer) Echo(ctx context.Context, reqBytes *[]byte) (pb.Message, error)

type OneOfServerOption

type OneOfServerOption func(s *OneOfServer)

func WithUnknownFieldsForOneOfServer

func WithUnknownFieldsForOneOfServer() OneOfServerOption

Jump to

Keyboard shortcuts

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