v1

package
v0.0.0-...-04acb0f Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_api_trans_v1_trans_proto protoreflect.FileDescriptor
View Source
var Trans_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.trans.v1.Trans",
	HandlerType: (*TransServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "TransIn",
			Handler:    _Trans_TransIn_Handler,
		},
		{
			MethodName: "TransOut",
			Handler:    _Trans_TransOut_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/trans/v1/trans.proto",
}

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

Functions

func RegisterTransServer

func RegisterTransServer(s grpc.ServiceRegistrar, srv TransServer)

Types

type AdjustInfo

type AdjustInfo struct {
	Amount int64 `protobuf:"varint,1,opt,name=Amount,proto3" json:"Amount,omitempty"`
	UserID int64 `protobuf:"varint,2,opt,name=UserID,proto3" json:"UserID,omitempty"`
	// contains filtered or unexported fields
}

func (*AdjustInfo) Descriptor deprecated

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

Deprecated: Use AdjustInfo.ProtoReflect.Descriptor instead.

func (*AdjustInfo) GetAmount

func (x *AdjustInfo) GetAmount() int64

func (*AdjustInfo) GetUserID

func (x *AdjustInfo) GetUserID() int64

func (*AdjustInfo) ProtoMessage

func (*AdjustInfo) ProtoMessage()

func (*AdjustInfo) ProtoReflect

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

func (*AdjustInfo) Reset

func (x *AdjustInfo) Reset()

func (*AdjustInfo) String

func (x *AdjustInfo) String() string

type Response

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

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

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 TransClient

type TransClient interface {
	TransIn(ctx context.Context, in *AdjustInfo, opts ...grpc.CallOption) (*Response, error)
	TransOut(ctx context.Context, in *AdjustInfo, opts ...grpc.CallOption) (*Response, error)
}

TransClient is the client API for Trans 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 NewTransClient

func NewTransClient(cc grpc.ClientConnInterface) TransClient

type TransServer

type TransServer interface {
	TransIn(context.Context, *AdjustInfo) (*Response, error)
	TransOut(context.Context, *AdjustInfo) (*Response, error)
	// contains filtered or unexported methods
}

TransServer is the server API for Trans service. All implementations must embed UnimplementedTransServer for forward compatibility

type UnimplementedTransServer

type UnimplementedTransServer struct {
}

UnimplementedTransServer must be embedded to have forward compatible implementations.

func (UnimplementedTransServer) TransIn

func (UnimplementedTransServer) TransOut

type UnsafeTransServer

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

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

Jump to

Keyboard shortcuts

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