bi

package
v0.0.0-...-f7687f2 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2018 License: MIT Imports: 15 Imported by: 0

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

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 BI

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

BI BI

func NewBI

func NewBI() *BI

NewBI NewBI

func (*BI) Handle

func (bi *BI) Handle(sess Session)

Handle Handle

func (*BI) On

func (bi *BI) On(m string, f interface{})

On On

type Conn

type Conn interface {
	Close()
	Write([]byte) error
	Read() ([]byte, error)
	RemoteAddr() string
}

Conn Conn

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) Descriptor() ([]byte, []int)

func (*Message) GetA

func (m *Message) GetA() []byte

func (*Message) GetI

func (m *Message) GetI() uint64

func (*Message) GetM

func (m *Message) GetM() string

func (*Message) GetT

func (m *Message) GetT() Message_Type

func (*Message) Marshal

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

func (*Message) MarshalTo

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

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) Reset

func (m *Message) Reset()

func (*Message) Size

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

func (*Message) String

func (this *Message) String() string

func (*Message) Unmarshal

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

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 QA

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

QA QA

type Session

type Session interface {
	GetSessionImpl() *SessionImpl
}

Session Session

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) Close

func (sess *SessionImpl) Close()

Close Close

func (*SessionImpl) Emit

func (sess *SessionImpl) Emit(method string, args interface{}) error

Emit Emit

func (*SessionImpl) GetID

func (sess *SessionImpl) GetID() string

GetID GetID

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 TCPConn

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

TCPConn TCPConn

func NewTCPConn

func NewTCPConn(conn *net.TCPConn) *TCPConn

NewTCPConn NewTCPConn

func (*TCPConn) Close

func (conn *TCPConn) Close()

Close Close

func (*TCPConn) Read

func (conn *TCPConn) Read() ([]byte, error)

Read Read

func (*TCPConn) RemoteAddr

func (conn *TCPConn) RemoteAddr() string

RemoteAddr RemoteAddr

func (*TCPConn) Write

func (conn *TCPConn) Write(data []byte) error

Write Write

type WebsocketConn

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

WebsocketConn WebsocketConn

func NewWebsocketConn

func NewWebsocketConn(conn *websocket.Conn) *WebsocketConn

NewWebsocketConn NewWebsocketConn

func (*WebsocketConn) Close

func (conn *WebsocketConn) Close()

Close Close

func (*WebsocketConn) Read

func (conn *WebsocketConn) Read() ([]byte, error)

Read Read

func (*WebsocketConn) RemoteAddr

func (conn *WebsocketConn) RemoteAddr() string

RemoteAddr RemoteAddr

func (*WebsocketConn) Write

func (conn *WebsocketConn) Write(data []byte) error

Write Write

Jump to

Keyboard shortcuts

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