sweet

package
v0.5.18 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_orange_proto protoreflect.FileDescriptor

Functions

func RegisterOrangeRPCServer

func RegisterOrangeRPCServer(s *grpc.Server, srv OrangeRPCServer)

Types

type OrangeRPCClient

type OrangeRPCClient interface {
	RequestDo(ctx context.Context, in *Parameter, opts ...grpc.CallOption) (*Response, error)
}

OrangeRPCClient is the client API for OrangeRPC service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewOrangeRPCClient

func NewOrangeRPCClient(cc grpc.ClientConnInterface) OrangeRPCClient

type OrangeRPCServer

type OrangeRPCServer interface {
	RequestDo(context.Context, *Parameter) (*Response, error)
}

OrangeRPCServer is the server API for OrangeRPC service.

type Parameter

type Parameter struct {
	Uri    string            `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
	Header map[string]string `` /* 153-byte string literal not displayed */
	Body   []byte            `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
	// contains filtered or unexported fields
}

func (*Parameter) Descriptor deprecated

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

Deprecated: Use Parameter.ProtoReflect.Descriptor instead.

func (*Parameter) GetBody

func (x *Parameter) GetBody() []byte

func (*Parameter) GetHeader

func (x *Parameter) GetHeader() map[string]string

func (*Parameter) GetUri

func (x *Parameter) GetUri() string

func (*Parameter) ProtoMessage

func (*Parameter) ProtoMessage()

func (*Parameter) ProtoReflect

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

func (*Parameter) Reset

func (x *Parameter) Reset()

func (*Parameter) String

func (x *Parameter) String() string

type Response

type Response struct {
	Status int32  `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
	Body   []byte `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetBody

func (x *Response) GetBody() []byte

func (*Response) GetStatus

func (x *Response) GetStatus() int32

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type UnimplementedOrangeRPCServer

type UnimplementedOrangeRPCServer struct {
}

UnimplementedOrangeRPCServer can be embedded to have forward compatible implementations.

func (*UnimplementedOrangeRPCServer) RequestDo

Jump to

Keyboard shortcuts

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