proto

package
v0.8.7 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceNameOfUser = "UserRpc"

Variables

View Source
var (
	ErrInvalidLengthUser        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowUser          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupUser = fmt.Errorf("proto: unexpected end of group")
)

Functions

This section is empty.

Types

type GetInfoReply

type GetInfoReply struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetInfoReply) Descriptor

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

func (*GetInfoReply) GetName

func (m *GetInfoReply) GetName() string

func (*GetInfoReply) Marshal

func (m *GetInfoReply) Marshal() (dAtA []byte, err error)

func (*GetInfoReply) MarshalTo

func (m *GetInfoReply) MarshalTo(dAtA []byte) (int, error)

func (*GetInfoReply) MarshalToSizedBuffer

func (m *GetInfoReply) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GetInfoReply) ProtoMessage

func (*GetInfoReply) ProtoMessage()

func (*GetInfoReply) Reset

func (m *GetInfoReply) Reset()

func (*GetInfoReply) Size

func (m *GetInfoReply) Size() (n int)

func (*GetInfoReply) String

func (m *GetInfoReply) String() string

func (*GetInfoReply) Unmarshal

func (m *GetInfoReply) Unmarshal(dAtA []byte) error

func (*GetInfoReply) XXX_DiscardUnknown

func (m *GetInfoReply) XXX_DiscardUnknown()

func (*GetInfoReply) XXX_Marshal

func (m *GetInfoReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetInfoReply) XXX_Merge

func (m *GetInfoReply) XXX_Merge(src proto.Message)

func (*GetInfoReply) XXX_Size

func (m *GetInfoReply) XXX_Size() int

func (*GetInfoReply) XXX_Unmarshal

func (m *GetInfoReply) XXX_Unmarshal(b []byte) error

type GetInfoReq

type GetInfoReq struct {
	Id                   uint64   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetInfoReq) Descriptor

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

func (*GetInfoReq) GetId

func (m *GetInfoReq) GetId() uint64

func (*GetInfoReq) Marshal

func (m *GetInfoReq) Marshal() (dAtA []byte, err error)

func (*GetInfoReq) MarshalTo

func (m *GetInfoReq) MarshalTo(dAtA []byte) (int, error)

func (*GetInfoReq) MarshalToSizedBuffer

func (m *GetInfoReq) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GetInfoReq) ProtoMessage

func (*GetInfoReq) ProtoMessage()

func (*GetInfoReq) Reset

func (m *GetInfoReq) Reset()

func (*GetInfoReq) Size

func (m *GetInfoReq) Size() (n int)

======================================================

func (*GetInfoReq) String

func (m *GetInfoReq) String() string

func (*GetInfoReq) Unmarshal

func (m *GetInfoReq) Unmarshal(dAtA []byte) error

func (*GetInfoReq) XXX_DiscardUnknown

func (m *GetInfoReq) XXX_DiscardUnknown()

func (*GetInfoReq) XXX_Marshal

func (m *GetInfoReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetInfoReq) XXX_Merge

func (m *GetInfoReq) XXX_Merge(src proto.Message)

func (*GetInfoReq) XXX_Size

func (m *GetInfoReq) XXX_Size() int

func (*GetInfoReq) XXX_Unmarshal

func (m *GetInfoReq) XXX_Unmarshal(b []byte) error

type UserClient

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

User is a client wrapped XClient.

func NewUserClient

func NewUserClient(group, cluster string) *UserClient

NewUserClient wraps a XClient as UserClient. You can pass a shared XClient object created by NewXClientForUser.

func (*UserClient) GetInfo

func (c *UserClient) GetInfo(ctx context.Context, req *GetInfoReq) (reply *GetInfoReply, err error)

GetInfo is client rpc method as defined

type UserInterface

type UserInterface interface {

	// UserInterface can be used for interface verification.
	// GetInfo is server rpc method as defined
	GetInfo(ctx context.Context, req *GetInfoReq, reply *GetInfoReply) (err error)
}

================== interface ===================

type UserRpcDemo

type UserRpcDemo struct{}

================== server implement demo =================== ripple.Default().RegisterRpc("User", &UserRpcDemo{}, "")

func (*UserRpcDemo) GetInfo

func (s *UserRpcDemo) GetInfo(ctx context.Context, req *GetInfoReq, reply *GetInfoReply) (err error)

GetInfo is server rpc method as defined

Jump to

Keyboard shortcuts

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