Documentation ¶
Overview ¶
Package bi is a generated protocol buffer package.
It is generated from these files:
github.com/emsihyo/go.im/comps/bi/message.proto
It has these top-level messages:
Message
Index ¶
- Constants
- Variables
- type BI
- type Conn
- type JSONProtocol
- type Message
- func (*Message) Descriptor() ([]byte, []int)
- func (m *Message) GetA() []byte
- func (m *Message) GetI() uint64
- func (m *Message) GetM() string
- func (m *Message) GetT() Message_Type
- func (m *Message) Marshal() (dAtA []byte, err error)
- func (m *Message) MarshalTo(dAtA []byte) (int, error)
- func (*Message) ProtoMessage()
- func (m *Message) Reset()
- func (m *Message) Size() (n int)
- func (this *Message) String() string
- func (m *Message) Unmarshal(dAtA []byte) error
- type Message_Type
- type ProtobufProtocol
- type Protocol
- type QA
- type Session
- type SessionImpl
- func (sess *SessionImpl) Close()
- func (sess *SessionImpl) Emit(method string, args interface{}) error
- func (sess *SessionImpl) GetID() string
- func (sess *SessionImpl) GetProtocol() Protocol
- func (sess *SessionImpl) Request(method string, args interface{}, resp interface{}, timeout time.Duration) error
- func (sess *SessionImpl) SendMarshalledData(marshalledData []byte)
- type TCPConn
- type WebsocketConn
Constants ¶
View Source
const ( //Connection Connection Connection = "Connection" //Disconnection Disconnection Disconnection = "Disconnection" )
Variables ¶
View Source
var ( ErrInvalidLengthMessage = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMessage = fmt.Errorf("proto: integer overflow") )
View Source
var Message_Type_name = map[int32]string{
0: "Emit",
1: "Request",
2: "Response",
}
View Source
var Message_Type_value = map[string]int32{
"Emit": 0,
"Request": 1,
"Response": 2,
}
Functions ¶
This section is empty.
Types ¶
type JSONProtocol ¶
type JSONProtocol struct { }
JSONProtocol JSONProtocol
func (*JSONProtocol) Marshal ¶
func (p *JSONProtocol) Marshal(v interface{}) ([]byte, error)
Marshal Marshal
func (*JSONProtocol) Unmarshal ¶
func (p *JSONProtocol) Unmarshal(d []byte, v interface{}) error
Unmarshal Unmarshal
type Message ¶
type Message struct { T Message_Type `protobuf:"varint,1,opt,name=T,proto3,enum=bi.Message_Type" json:"T,omitempty"` I uint64 `protobuf:"varint,2,opt,name=I,proto3" json:"I,omitempty"` M string `protobuf:"bytes,3,opt,name=M,proto3" json:"M,omitempty"` A []byte `protobuf:"bytes,4,opt,name=A,proto3" json:"A,omitempty"` }
func (*Message) Descriptor ¶
func (*Message) GetT ¶
func (m *Message) GetT() Message_Type
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
type Message_Type ¶
type Message_Type int32
const ( Message_Emit Message_Type = 0 Message_Request Message_Type = 1 Message_Response Message_Type = 2 )
func (Message_Type) EnumDescriptor ¶
func (Message_Type) EnumDescriptor() ([]byte, []int)
func (Message_Type) String ¶
func (x Message_Type) String() string
type ProtobufProtocol ¶
type ProtobufProtocol struct { }
ProtobufProtocol ProtobufProtocol
func (*ProtobufProtocol) Marshal ¶
func (p *ProtobufProtocol) Marshal(v interface{}) ([]byte, error)
Marshal Marshal
func (*ProtobufProtocol) Unmarshal ¶
func (p *ProtobufProtocol) Unmarshal(d []byte, v interface{}) error
Unmarshal Unmarshal
type Protocol ¶
type Protocol interface { Marshal(v interface{}) ([]byte, error) Unmarshal(d []byte, v interface{}) error }
Protocol Protocol
type SessionImpl ¶
type SessionImpl struct {
// contains filtered or unexported fields
}
SessionImpl SessionImpl
func NewSessionImpl ¶
func NewSessionImpl(conn Conn, protocol Protocol, timeout time.Duration) *SessionImpl
NewSessionImpl NewSessionImpl
func (*SessionImpl) Emit ¶
func (sess *SessionImpl) Emit(method string, args interface{}) error
Emit Emit
func (*SessionImpl) GetProtocol ¶
func (sess *SessionImpl) GetProtocol() Protocol
GetProtocol GetProtocol
func (*SessionImpl) Request ¶
func (sess *SessionImpl) Request(method string, args interface{}, resp interface{}, timeout time.Duration) error
Request Request
func (*SessionImpl) SendMarshalledData ¶
func (sess *SessionImpl) SendMarshalledData(marshalledData []byte)
SendMarshalledData SendMarshalledData
type WebsocketConn ¶
type WebsocketConn struct {
// contains filtered or unexported fields
}
WebsocketConn WebsocketConn
func NewWebsocketConn ¶
func NewWebsocketConn(conn *websocket.Conn) *WebsocketConn
NewWebsocketConn NewWebsocketConn
func (*WebsocketConn) RemoteAddr ¶
func (conn *WebsocketConn) RemoteAddr() string
RemoteAddr RemoteAddr
Click to show internal directories.
Click to hide internal directories.