pbim

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthPbim        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPbim          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPbim = fmt.Errorf("proto: unexpected end of group")
)

Functions

func RegisterImServer

func RegisterImServer(s *roc.Service, h ImServer)

Types

type ConnectReq

type ConnectReq struct {
	UserName string `protobuf:"bytes,1,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"`
}

ConnectReq is like handshake

func (*ConnectReq) Descriptor

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

func (*ConnectReq) GetUserName

func (m *ConnectReq) GetUserName() string

func (*ConnectReq) Marshal

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

func (*ConnectReq) MarshalTo

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

func (*ConnectReq) MarshalToSizedBuffer

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

func (*ConnectReq) ProtoMessage

func (*ConnectReq) ProtoMessage()

func (*ConnectReq) Reset

func (m *ConnectReq) Reset()

func (*ConnectReq) Size

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

func (*ConnectReq) String

func (m *ConnectReq) String() string

func (*ConnectReq) Unmarshal

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

func (*ConnectReq) XXX_DiscardUnknown

func (m *ConnectReq) XXX_DiscardUnknown()

func (*ConnectReq) XXX_Marshal

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

func (*ConnectReq) XXX_Merge

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

func (*ConnectReq) XXX_Size

func (m *ConnectReq) XXX_Size() int

func (*ConnectReq) XXX_Unmarshal

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

type ConnectRsp

type ConnectRsp struct {
	IsConnect bool `protobuf:"varint,1,opt,name=is_connect,json=isConnect,proto3" json:"is_connect,omitempty"`
}

func (*ConnectRsp) Descriptor

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

func (*ConnectRsp) GetIsConnect

func (m *ConnectRsp) GetIsConnect() bool

func (*ConnectRsp) Marshal

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

func (*ConnectRsp) MarshalTo

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

func (*ConnectRsp) MarshalToSizedBuffer

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

func (*ConnectRsp) ProtoMessage

func (*ConnectRsp) ProtoMessage()

func (*ConnectRsp) Reset

func (m *ConnectRsp) Reset()

func (*ConnectRsp) Size

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

func (*ConnectRsp) String

func (m *ConnectRsp) String() string

func (*ConnectRsp) Unmarshal

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

func (*ConnectRsp) XXX_DiscardUnknown

func (m *ConnectRsp) XXX_DiscardUnknown()

func (*ConnectRsp) XXX_Marshal

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

func (*ConnectRsp) XXX_Merge

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

func (*ConnectRsp) XXX_Size

func (m *ConnectRsp) XXX_Size() int

func (*ConnectRsp) XXX_Unmarshal

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

type CountReq

type CountReq struct {
	Prefix string `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"`
}

CountReq is for count online member

func (*CountReq) Descriptor

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

func (*CountReq) GetPrefix

func (m *CountReq) GetPrefix() string

func (*CountReq) Marshal

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

func (*CountReq) MarshalTo

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

func (*CountReq) MarshalToSizedBuffer

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

func (*CountReq) ProtoMessage

func (*CountReq) ProtoMessage()

func (*CountReq) Reset

func (m *CountReq) Reset()

func (*CountReq) Size

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

func (*CountReq) String

func (m *CountReq) String() string

func (*CountReq) Unmarshal

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

func (*CountReq) XXX_DiscardUnknown

func (m *CountReq) XXX_DiscardUnknown()

func (*CountReq) XXX_Marshal

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

func (*CountReq) XXX_Merge

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

func (*CountReq) XXX_Size

func (m *CountReq) XXX_Size() int

func (*CountReq) XXX_Unmarshal

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

type CountRsp

type CountRsp struct {
	Count uint32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
}

func (*CountRsp) Descriptor

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

func (*CountRsp) GetCount

func (m *CountRsp) GetCount() uint32

func (*CountRsp) Marshal

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

func (*CountRsp) MarshalTo

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

func (*CountRsp) MarshalToSizedBuffer

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

func (*CountRsp) ProtoMessage

func (*CountRsp) ProtoMessage()

func (*CountRsp) Reset

func (m *CountRsp) Reset()

func (*CountRsp) Size

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

func (*CountRsp) String

func (m *CountRsp) String() string

func (*CountRsp) Unmarshal

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

func (*CountRsp) XXX_DiscardUnknown

func (m *CountRsp) XXX_DiscardUnknown()

func (*CountRsp) XXX_Marshal

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

func (*CountRsp) XXX_Merge

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

func (*CountRsp) XXX_Size

func (m *CountRsp) XXX_Size() int

func (*CountRsp) XXX_Unmarshal

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

type ImClient

type ImClient interface {
	// Connect server for wait message
	Connect(c *context.Context, req *ConnectReq, opts ...roc.InvokeOptions) (*ConnectRsp, error)
	// Count online member
	Count(c *context.Context, req *CountReq, opts ...roc.InvokeOptions) (*CountRsp, error)
	// SendMessage is the im kernel
	SendMessage(c *context.Context, req chan *SendMessageReq, errIn chan error, opts ...roc.InvokeOptions) (chan *SendMessageRsp, chan error)
}

func NewImClient

func NewImClient(c *roc.Service) ImClient

type ImServer

type ImServer interface {
	// Connect server for wait message
	Connect(c *context.Context, req *ConnectReq) (rsp *ConnectRsp, err error)
	// Count online member
	Count(c *context.Context, req *CountReq) (rsp *CountRsp, err error)
	// SendMessage is the im kernel
	SendMessage(c *context.Context, req chan *SendMessageReq, errIn chan error) (chan *SendMessageRsp, chan error)
}

ImServer is the server API for Im service.

type SendMessageReq

type SendMessageReq struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
}

SendMessageReq send a message

func (*SendMessageReq) Descriptor

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

func (*SendMessageReq) GetMessage

func (m *SendMessageReq) GetMessage() string

func (*SendMessageReq) Marshal

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

func (*SendMessageReq) MarshalTo

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

func (*SendMessageReq) MarshalToSizedBuffer

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

func (*SendMessageReq) ProtoMessage

func (*SendMessageReq) ProtoMessage()

func (*SendMessageReq) Reset

func (m *SendMessageReq) Reset()

func (*SendMessageReq) Size

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

func (*SendMessageReq) String

func (m *SendMessageReq) String() string

func (*SendMessageReq) Unmarshal

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

func (*SendMessageReq) XXX_DiscardUnknown

func (m *SendMessageReq) XXX_DiscardUnknown()

func (*SendMessageReq) XXX_Marshal

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

func (*SendMessageReq) XXX_Merge

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

func (*SendMessageReq) XXX_Size

func (m *SendMessageReq) XXX_Size() int

func (*SendMessageReq) XXX_Unmarshal

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

type SendMessageRsp

type SendMessageRsp struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
}

response content. SendMessageRsp usually use for broadcast

func (*SendMessageRsp) Descriptor

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

func (*SendMessageRsp) GetMessage

func (m *SendMessageRsp) GetMessage() string

func (*SendMessageRsp) Marshal

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

func (*SendMessageRsp) MarshalTo

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

func (*SendMessageRsp) MarshalToSizedBuffer

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

func (*SendMessageRsp) ProtoMessage

func (*SendMessageRsp) ProtoMessage()

func (*SendMessageRsp) Reset

func (m *SendMessageRsp) Reset()

func (*SendMessageRsp) Size

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

func (*SendMessageRsp) String

func (m *SendMessageRsp) String() string

func (*SendMessageRsp) Unmarshal

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

func (*SendMessageRsp) XXX_DiscardUnknown

func (m *SendMessageRsp) XXX_DiscardUnknown()

func (*SendMessageRsp) XXX_Marshal

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

func (*SendMessageRsp) XXX_Merge

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

func (*SendMessageRsp) XXX_Size

func (m *SendMessageRsp) XXX_Size() int

func (*SendMessageRsp) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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