api

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2018 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package api is a generated protocol buffer package.

It is generated from these files:

api.proto

It has these top-level messages:

ClientInfo
Publication
Error
Command
Reply
PublishRequest
PublishResponse
PublishResult
BroadcastRequest
BroadcastResponse
BroadcastResult
UnsubscribeRequest
UnsubscribeResponse
UnsubscribeResult
DisconnectRequest
DisconnectResponse
DisconnectResult
PresenceRequest
PresenceResponse
PresenceResult
PresenceStatsRequest
PresenceStatsResponse
PresenceStatsResult
HistoryRequest
HistoryResponse
HistoryResult
HistoryRemoveRequest
HistoryRemoveResponse
HistoryRemoveResult
ChannelsRequest
ChannelsResponse
ChannelsResult
InfoRequest
InfoResponse
InfoResult
NodeResult

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowApi   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	// ErrorInternal means server error, if returned this is a signal
	// that something went wrong with Centrifugo itself.
	ErrorInternal = &Error{
		Code:    100,
		Message: "internal server error",
	}
	// ErrorNamespaceNotFound means that namespace in channel name does not exist.
	ErrorNamespaceNotFound = &Error{
		Code:    102,
		Message: "namespace not found",
	}
	// ErrorMethodNotFound means that method sent in command does not exist.
	ErrorMethodNotFound = &Error{
		Code:    104,
		Message: "method not found",
	}
	// ErrorLimitExceeded says that some sort of limit exceeded, server logs should
	// give more detailed information.
	ErrorLimitExceeded = &Error{
		Code:    106,
		Message: "limit exceeded",
	}
	// ErrorBadRequest says that Centrifugo can not parse received data
	// because it is malformed.
	ErrorBadRequest = &Error{
		Code:    107,
		Message: "bad request",
	}
	// ErrorNotAvailable means that resource is not enabled.
	ErrorNotAvailable = &Error{
		Code:    108,
		Message: "not available",
	}
)

Here we define errors that can be exposed in server API replies.

View Source
var MethodType_name = map[int32]string{
	0: "PUBLISH",
	1: "BROADCAST",
	2: "UNSUBSCRIBE",
	3: "DISCONNECT",
	4: "PRESENCE",
	5: "PRESENCE_STATS",
	6: "HISTORY",
	7: "HISTORY_REMOVE",
	8: "CHANNELS",
	9: "INFO",
}
View Source
var MethodType_value = map[string]int32{
	"PUBLISH":        0,
	"BROADCAST":      1,
	"UNSUBSCRIBE":    2,
	"DISCONNECT":     3,
	"PRESENCE":       4,
	"PRESENCE_STATS": 5,
	"HISTORY":        6,
	"HISTORY_REMOVE": 7,
	"CHANNELS":       8,
	"INFO":           9,
}

Functions

func PutCommandDecoder

func PutCommandDecoder(enc Encoding, e CommandDecoder)

PutCommandDecoder ...

func PutDecoder

func PutDecoder(enc Encoding, e Decoder)

PutDecoder ...

func PutEncoder

func PutEncoder(enc Encoding, e Encoder)

PutEncoder ...

func PutReplyEncoder

func PutReplyEncoder(enc Encoding, e ReplyEncoder)

PutReplyEncoder ...

func RegisterCentrifugeServer

func RegisterCentrifugeServer(s *grpc.Server, srv CentrifugeServer)

func RegisterGRPCServerAPI

func RegisterGRPCServerAPI(n *centrifuge.Node, server *grpc.Server, config GRPCAPIServiceConfig) error

RegisterGRPCServerAPI registers GRPC API service in provided GRPC server.

Types

type BroadcastRequest

type BroadcastRequest struct {
	Channels []string `protobuf:"bytes,1,rep,name=channels" json:"channels"`
	Data     Raw      `protobuf:"bytes,2,opt,name=data,proto3,customtype=Raw" json:"data"`
	UID      string   `protobuf:"bytes,3,opt,name=uid,proto3" json:"uid"`
}

func NewPopulatedBroadcastRequest

func NewPopulatedBroadcastRequest(r randyApi, easy bool) *BroadcastRequest

func (*BroadcastRequest) Descriptor

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

func (*BroadcastRequest) Equal

func (this *BroadcastRequest) Equal(that interface{}) bool

func (*BroadcastRequest) GetChannels

func (m *BroadcastRequest) GetChannels() []string

func (*BroadcastRequest) GetUID

func (m *BroadcastRequest) GetUID() string

func (*BroadcastRequest) Marshal

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

func (*BroadcastRequest) MarshalTo

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

func (*BroadcastRequest) ProtoMessage

func (*BroadcastRequest) ProtoMessage()

func (*BroadcastRequest) Reset

func (m *BroadcastRequest) Reset()

func (*BroadcastRequest) Size

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

func (*BroadcastRequest) String

func (m *BroadcastRequest) String() string

func (*BroadcastRequest) Unmarshal

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

type BroadcastResponse

type BroadcastResponse struct {
	Error  *Error           `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
	Result *BroadcastResult `protobuf:"bytes,2,opt,name=result" json:"result,omitempty"`
}

func NewPopulatedBroadcastResponse

func NewPopulatedBroadcastResponse(r randyApi, easy bool) *BroadcastResponse

func (*BroadcastResponse) Descriptor

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

func (*BroadcastResponse) Equal

func (this *BroadcastResponse) Equal(that interface{}) bool

func (*BroadcastResponse) GetError

func (m *BroadcastResponse) GetError() *Error

func (*BroadcastResponse) GetResult

func (m *BroadcastResponse) GetResult() *BroadcastResult

func (*BroadcastResponse) Marshal

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

func (*BroadcastResponse) MarshalTo

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

func (*BroadcastResponse) ProtoMessage

func (*BroadcastResponse) ProtoMessage()

func (*BroadcastResponse) Reset

func (m *BroadcastResponse) Reset()

func (*BroadcastResponse) Size

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

func (*BroadcastResponse) String

func (m *BroadcastResponse) String() string

func (*BroadcastResponse) Unmarshal

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

type BroadcastResult

type BroadcastResult struct {
}

func NewPopulatedBroadcastResult

func NewPopulatedBroadcastResult(r randyApi, easy bool) *BroadcastResult

func (*BroadcastResult) Descriptor

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

func (*BroadcastResult) Equal

func (this *BroadcastResult) Equal(that interface{}) bool

func (*BroadcastResult) Marshal

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

func (*BroadcastResult) MarshalTo

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

func (*BroadcastResult) ProtoMessage

func (*BroadcastResult) ProtoMessage()

func (*BroadcastResult) Reset

func (m *BroadcastResult) Reset()

func (*BroadcastResult) Size

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

func (*BroadcastResult) String

func (m *BroadcastResult) String() string

func (*BroadcastResult) Unmarshal

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

type ChannelsRequest

type ChannelsRequest struct {
}

func NewPopulatedChannelsRequest

func NewPopulatedChannelsRequest(r randyApi, easy bool) *ChannelsRequest

func (*ChannelsRequest) Descriptor

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

func (*ChannelsRequest) Equal

func (this *ChannelsRequest) Equal(that interface{}) bool

func (*ChannelsRequest) Marshal

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

func (*ChannelsRequest) MarshalTo

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

func (*ChannelsRequest) ProtoMessage

func (*ChannelsRequest) ProtoMessage()

func (*ChannelsRequest) Reset

func (m *ChannelsRequest) Reset()

func (*ChannelsRequest) Size

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

func (*ChannelsRequest) String

func (m *ChannelsRequest) String() string

func (*ChannelsRequest) Unmarshal

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

type ChannelsResponse

type ChannelsResponse struct {
	Error  *Error          `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
	Result *ChannelsResult `protobuf:"bytes,2,opt,name=result" json:"result,omitempty"`
}

func NewPopulatedChannelsResponse

func NewPopulatedChannelsResponse(r randyApi, easy bool) *ChannelsResponse

func (*ChannelsResponse) Descriptor

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

func (*ChannelsResponse) Equal

func (this *ChannelsResponse) Equal(that interface{}) bool

func (*ChannelsResponse) GetError

func (m *ChannelsResponse) GetError() *Error

func (*ChannelsResponse) GetResult

func (m *ChannelsResponse) GetResult() *ChannelsResult

func (*ChannelsResponse) Marshal

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

func (*ChannelsResponse) MarshalTo

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

func (*ChannelsResponse) ProtoMessage

func (*ChannelsResponse) ProtoMessage()

func (*ChannelsResponse) Reset

func (m *ChannelsResponse) Reset()

func (*ChannelsResponse) Size

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

func (*ChannelsResponse) String

func (m *ChannelsResponse) String() string

func (*ChannelsResponse) Unmarshal

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

type ChannelsResult

type ChannelsResult struct {
	Channels []string `protobuf:"bytes,1,rep,name=channels" json:"channels"`
}

func NewPopulatedChannelsResult

func NewPopulatedChannelsResult(r randyApi, easy bool) *ChannelsResult

func (*ChannelsResult) Descriptor

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

func (*ChannelsResult) Equal

func (this *ChannelsResult) Equal(that interface{}) bool

func (*ChannelsResult) GetChannels

func (m *ChannelsResult) GetChannels() []string

func (*ChannelsResult) Marshal

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

func (*ChannelsResult) MarshalTo

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

func (*ChannelsResult) ProtoMessage

func (*ChannelsResult) ProtoMessage()

func (*ChannelsResult) Reset

func (m *ChannelsResult) Reset()

func (*ChannelsResult) Size

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

func (*ChannelsResult) String

func (m *ChannelsResult) String() string

func (*ChannelsResult) Unmarshal

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

type ClientInfo

type ClientInfo struct {
	User     string `protobuf:"bytes,1,opt,name=user,proto3" json:"user"`
	Client   string `protobuf:"bytes,2,opt,name=client,proto3" json:"client"`
	ConnInfo Raw    `protobuf:"bytes,3,opt,name=conn_info,json=connInfo,proto3,customtype=Raw" json:"conn_info,omitempty"`
	ChanInfo Raw    `protobuf:"bytes,4,opt,name=chan_info,json=chanInfo,proto3,customtype=Raw" json:"chan_info,omitempty"`
}

func NewPopulatedClientInfo

func NewPopulatedClientInfo(r randyApi, easy bool) *ClientInfo

func (*ClientInfo) Descriptor

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

func (*ClientInfo) Equal

func (this *ClientInfo) Equal(that interface{}) bool

func (*ClientInfo) GetClient

func (m *ClientInfo) GetClient() string

func (*ClientInfo) GetUser

func (m *ClientInfo) GetUser() string

func (*ClientInfo) Marshal

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

func (*ClientInfo) MarshalTo

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

func (*ClientInfo) ProtoMessage

func (*ClientInfo) ProtoMessage()

func (*ClientInfo) Reset

func (m *ClientInfo) Reset()

func (*ClientInfo) Size

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

func (*ClientInfo) String

func (m *ClientInfo) String() string

func (*ClientInfo) Unmarshal

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

type Command

type Command struct {
	ID     uint32     `protobuf:"varint,1,opt,name=id,proto3" json:"id"`
	Method MethodType `protobuf:"varint,2,opt,name=method,proto3,enum=api.MethodType" json:"method"`
	Params Raw        `protobuf:"bytes,3,opt,name=params,proto3,customtype=Raw" json:"params"`
}

func NewPopulatedCommand

func NewPopulatedCommand(r randyApi, easy bool) *Command

func (*Command) Descriptor

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

func (*Command) Equal

func (this *Command) Equal(that interface{}) bool

func (*Command) GetID

func (m *Command) GetID() uint32

func (*Command) GetMethod

func (m *Command) GetMethod() MethodType

func (*Command) Marshal

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

func (*Command) MarshalTo

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

func (*Command) ProtoMessage

func (*Command) ProtoMessage()

func (*Command) Reset

func (m *Command) Reset()

func (*Command) Size

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

func (*Command) String

func (m *Command) String() string

func (*Command) Unmarshal

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

type CommandDecoder

type CommandDecoder interface {
	Reset([]byte) error
	Decode() (*Command, error)
}

CommandDecoder ...

func GetCommandDecoder

func GetCommandDecoder(enc Encoding, data []byte) CommandDecoder

GetCommandDecoder ...

type Config

type Config struct{}

Config configures APIHandler.

type Decoder

type Decoder interface {
	DecodePublish([]byte) (*PublishRequest, error)
	DecodeBroadcast([]byte) (*BroadcastRequest, error)
	DecodeUnsubscribe([]byte) (*UnsubscribeRequest, error)
	DecodeDisconnect([]byte) (*DisconnectRequest, error)
	DecodePresence([]byte) (*PresenceRequest, error)
	DecodePresenceStats([]byte) (*PresenceStatsRequest, error)
	DecodeHistory([]byte) (*HistoryRequest, error)
	DecodeHistoryRemove([]byte) (*HistoryRemoveRequest, error)
	DecodeChannels([]byte) (*ChannelsRequest, error)
	DecodeInfo([]byte) (*InfoRequest, error)
}

Decoder ...

func GetDecoder

func GetDecoder(enc Encoding) Decoder

GetDecoder ...

type DisconnectRequest

type DisconnectRequest struct {
	User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user"`
}

func NewPopulatedDisconnectRequest

func NewPopulatedDisconnectRequest(r randyApi, easy bool) *DisconnectRequest

func (*DisconnectRequest) Descriptor

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

func (*DisconnectRequest) Equal

func (this *DisconnectRequest) Equal(that interface{}) bool

func (*DisconnectRequest) GetUser

func (m *DisconnectRequest) GetUser() string

func (*DisconnectRequest) Marshal

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

func (*DisconnectRequest) MarshalTo

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

func (*DisconnectRequest) ProtoMessage

func (*DisconnectRequest) ProtoMessage()

func (*DisconnectRequest) Reset

func (m *DisconnectRequest) Reset()

func (*DisconnectRequest) Size

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

func (*DisconnectRequest) String

func (m *DisconnectRequest) String() string

func (*DisconnectRequest) Unmarshal

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

type DisconnectResponse

type DisconnectResponse struct {
	Error  *Error            `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
	Result *DisconnectResult `protobuf:"bytes,2,opt,name=result" json:"result,omitempty"`
}

func NewPopulatedDisconnectResponse

func NewPopulatedDisconnectResponse(r randyApi, easy bool) *DisconnectResponse

func (*DisconnectResponse) Descriptor

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

func (*DisconnectResponse) Equal

func (this *DisconnectResponse) Equal(that interface{}) bool

func (*DisconnectResponse) GetError

func (m *DisconnectResponse) GetError() *Error

func (*DisconnectResponse) GetResult

func (m *DisconnectResponse) GetResult() *DisconnectResult

func (*DisconnectResponse) Marshal

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

func (*DisconnectResponse) MarshalTo

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

func (*DisconnectResponse) ProtoMessage

func (*DisconnectResponse) ProtoMessage()

func (*DisconnectResponse) Reset

func (m *DisconnectResponse) Reset()

func (*DisconnectResponse) Size

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

func (*DisconnectResponse) String

func (m *DisconnectResponse) String() string

func (*DisconnectResponse) Unmarshal

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

type DisconnectResult

type DisconnectResult struct {
}

func NewPopulatedDisconnectResult

func NewPopulatedDisconnectResult(r randyApi, easy bool) *DisconnectResult

func (*DisconnectResult) Descriptor

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

func (*DisconnectResult) Equal

func (this *DisconnectResult) Equal(that interface{}) bool

func (*DisconnectResult) Marshal

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

func (*DisconnectResult) MarshalTo

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

func (*DisconnectResult) ProtoMessage

func (*DisconnectResult) ProtoMessage()

func (*DisconnectResult) Reset

func (m *DisconnectResult) Reset()

func (*DisconnectResult) Size

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

func (*DisconnectResult) String

func (m *DisconnectResult) String() string

func (*DisconnectResult) Unmarshal

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

type Encoder

type Encoder interface {
	EncodePublish(*PublishResult) ([]byte, error)
	EncodeBroadcast(*BroadcastResult) ([]byte, error)
	EncodeUnsubscribe(*UnsubscribeResult) ([]byte, error)
	EncodeDisconnect(*DisconnectResult) ([]byte, error)
	EncodePresence(*PresenceResult) ([]byte, error)
	EncodePresenceStats(*PresenceStatsResult) ([]byte, error)
	EncodeHistory(*HistoryResult) ([]byte, error)
	EncodeHistoryRemove(*HistoryRemoveResult) ([]byte, error)
	EncodeChannels(*ChannelsResult) ([]byte, error)
	EncodeInfo(*InfoResult) ([]byte, error)
}

Encoder ...

func GetEncoder

func GetEncoder(enc Encoding) Encoder

GetEncoder ...

type Encoding

type Encoding string

Encoding determines connection protocol encoding in use.

const (
	// EncodingJSON means JSON protocol.
	EncodingJSON Encoding = "json"
	// EncodingProtobuf means protobuf protocol.
	EncodingProtobuf Encoding = "protobuf"
)

type Error

type Error struct {
	Code    uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code"`
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message"`
}

func NewPopulatedError

func NewPopulatedError(r randyApi, easy bool) *Error

func (*Error) Descriptor

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

func (*Error) Equal

func (this *Error) Equal(that interface{}) bool

func (Error) Error

func (e Error) Error() string

func (*Error) GetCode

func (m *Error) GetCode() uint32

func (*Error) GetMessage

func (m *Error) GetMessage() string

func (*Error) Marshal

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

func (*Error) MarshalTo

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

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) Reset

func (m *Error) Reset()

func (*Error) Size

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

func (*Error) String

func (m *Error) String() string

func (*Error) Unmarshal

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

type GRPCAPIServiceConfig

type GRPCAPIServiceConfig struct{}

GRPCAPIServiceConfig for GRPC API Service.

type Handler

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

Handler is responsible for processing API commands over HTTP.

func NewHandler

func NewHandler(n *centrifuge.Node, c Config) *Handler

NewHandler creates new APIHandler.

func (*Handler) ServeHTTP

func (s *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type HistoryRemoveRequest

type HistoryRemoveRequest struct {
	Channel string `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel"`
}

func NewPopulatedHistoryRemoveRequest

func NewPopulatedHistoryRemoveRequest(r randyApi, easy bool) *HistoryRemoveRequest

func (*HistoryRemoveRequest) Descriptor

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

func (*HistoryRemoveRequest) Equal

func (this *HistoryRemoveRequest) Equal(that interface{}) bool

func (*HistoryRemoveRequest) GetChannel

func (m *HistoryRemoveRequest) GetChannel() string

func (*HistoryRemoveRequest) Marshal

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

func (*HistoryRemoveRequest) MarshalTo

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

func (*HistoryRemoveRequest) ProtoMessage

func (*HistoryRemoveRequest) ProtoMessage()

func (*HistoryRemoveRequest) Reset

func (m *HistoryRemoveRequest) Reset()

func (*HistoryRemoveRequest) Size

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

func (*HistoryRemoveRequest) String

func (m *HistoryRemoveRequest) String() string

func (*HistoryRemoveRequest) Unmarshal

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

type HistoryRemoveResponse

type HistoryRemoveResponse struct {
	Error  *Error               `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
	Result *HistoryRemoveResult `protobuf:"bytes,2,opt,name=result" json:"result,omitempty"`
}

func NewPopulatedHistoryRemoveResponse

func NewPopulatedHistoryRemoveResponse(r randyApi, easy bool) *HistoryRemoveResponse

func (*HistoryRemoveResponse) Descriptor

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

func (*HistoryRemoveResponse) Equal

func (this *HistoryRemoveResponse) Equal(that interface{}) bool

func (*HistoryRemoveResponse) GetError

func (m *HistoryRemoveResponse) GetError() *Error

func (*HistoryRemoveResponse) GetResult

func (*HistoryRemoveResponse) Marshal

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

func (*HistoryRemoveResponse) MarshalTo

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

func (*HistoryRemoveResponse) ProtoMessage

func (*HistoryRemoveResponse) ProtoMessage()

func (*HistoryRemoveResponse) Reset

func (m *HistoryRemoveResponse) Reset()

func (*HistoryRemoveResponse) Size

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

func (*HistoryRemoveResponse) String

func (m *HistoryRemoveResponse) String() string

func (*HistoryRemoveResponse) Unmarshal

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

type HistoryRemoveResult

type HistoryRemoveResult struct {
}

func NewPopulatedHistoryRemoveResult

func NewPopulatedHistoryRemoveResult(r randyApi, easy bool) *HistoryRemoveResult

func (*HistoryRemoveResult) Descriptor

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

func (*HistoryRemoveResult) Equal

func (this *HistoryRemoveResult) Equal(that interface{}) bool

func (*HistoryRemoveResult) Marshal

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

func (*HistoryRemoveResult) MarshalTo

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

func (*HistoryRemoveResult) ProtoMessage

func (*HistoryRemoveResult) ProtoMessage()

func (*HistoryRemoveResult) Reset

func (m *HistoryRemoveResult) Reset()

func (*HistoryRemoveResult) Size

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

func (*HistoryRemoveResult) String

func (m *HistoryRemoveResult) String() string

func (*HistoryRemoveResult) Unmarshal

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

type HistoryRequest

type HistoryRequest struct {
	Channel string `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel"`
}

func NewPopulatedHistoryRequest

func NewPopulatedHistoryRequest(r randyApi, easy bool) *HistoryRequest

func (*HistoryRequest) Descriptor

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

func (*HistoryRequest) Equal

func (this *HistoryRequest) Equal(that interface{}) bool

func (*HistoryRequest) GetChannel

func (m *HistoryRequest) GetChannel() string

func (*HistoryRequest) Marshal

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

func (*HistoryRequest) MarshalTo

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

func (*HistoryRequest) ProtoMessage

func (*HistoryRequest) ProtoMessage()

func (*HistoryRequest) Reset

func (m *HistoryRequest) Reset()

func (*HistoryRequest) Size

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

func (*HistoryRequest) String

func (m *HistoryRequest) String() string

func (*HistoryRequest) Unmarshal

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

type HistoryResponse

type HistoryResponse struct {
	Error  *Error         `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
	Result *HistoryResult `protobuf:"bytes,2,opt,name=result" json:"result,omitempty"`
}

func NewPopulatedHistoryResponse

func NewPopulatedHistoryResponse(r randyApi, easy bool) *HistoryResponse

func (*HistoryResponse) Descriptor

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

func (*HistoryResponse) Equal

func (this *HistoryResponse) Equal(that interface{}) bool

func (*HistoryResponse) GetError

func (m *HistoryResponse) GetError() *Error

func (*HistoryResponse) GetResult

func (m *HistoryResponse) GetResult() *HistoryResult

func (*HistoryResponse) Marshal

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

func (*HistoryResponse) MarshalTo

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

func (*HistoryResponse) ProtoMessage

func (*HistoryResponse) ProtoMessage()

func (*HistoryResponse) Reset

func (m *HistoryResponse) Reset()

func (*HistoryResponse) Size

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

func (*HistoryResponse) String

func (m *HistoryResponse) String() string

func (*HistoryResponse) Unmarshal

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

type HistoryResult

type HistoryResult struct {
	Publications []*Publication `protobuf:"bytes,1,rep,name=publications" json:"publications"`
}

func NewPopulatedHistoryResult

func NewPopulatedHistoryResult(r randyApi, easy bool) *HistoryResult

func (*HistoryResult) Descriptor

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

func (*HistoryResult) Equal

func (this *HistoryResult) Equal(that interface{}) bool

func (*HistoryResult) GetPublications

func (m *HistoryResult) GetPublications() []*Publication

func (*HistoryResult) Marshal

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

func (*HistoryResult) MarshalTo

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

func (*HistoryResult) ProtoMessage

func (*HistoryResult) ProtoMessage()

func (*HistoryResult) Reset

func (m *HistoryResult) Reset()

func (*HistoryResult) Size

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

func (*HistoryResult) String

func (m *HistoryResult) String() string

func (*HistoryResult) Unmarshal

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

type InfoRequest

type InfoRequest struct {
}

func NewPopulatedInfoRequest

func NewPopulatedInfoRequest(r randyApi, easy bool) *InfoRequest

func (*InfoRequest) Descriptor

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

func (*InfoRequest) Equal

func (this *InfoRequest) Equal(that interface{}) bool

func (*InfoRequest) Marshal

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

func (*InfoRequest) MarshalTo

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

func (*InfoRequest) ProtoMessage

func (*InfoRequest) ProtoMessage()

func (*InfoRequest) Reset

func (m *InfoRequest) Reset()

func (*InfoRequest) Size

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

func (*InfoRequest) String

func (m *InfoRequest) String() string

func (*InfoRequest) Unmarshal

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

type InfoResponse

type InfoResponse struct {
	Error  *Error      `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
	Result *InfoResult `protobuf:"bytes,2,opt,name=result" json:"result,omitempty"`
}

func NewPopulatedInfoResponse

func NewPopulatedInfoResponse(r randyApi, easy bool) *InfoResponse

func (*InfoResponse) Descriptor

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

func (*InfoResponse) Equal

func (this *InfoResponse) Equal(that interface{}) bool

func (*InfoResponse) GetError

func (m *InfoResponse) GetError() *Error

func (*InfoResponse) GetResult

func (m *InfoResponse) GetResult() *InfoResult

func (*InfoResponse) Marshal

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

func (*InfoResponse) MarshalTo

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

func (*InfoResponse) ProtoMessage

func (*InfoResponse) ProtoMessage()

func (*InfoResponse) Reset

func (m *InfoResponse) Reset()

func (*InfoResponse) Size

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

func (*InfoResponse) String

func (m *InfoResponse) String() string

func (*InfoResponse) Unmarshal

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

type InfoResult

type InfoResult struct {
	Nodes []*NodeResult `protobuf:"bytes,1,rep,name=nodes" json:"nodes"`
}

func NewPopulatedInfoResult

func NewPopulatedInfoResult(r randyApi, easy bool) *InfoResult

func (*InfoResult) Descriptor

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

func (*InfoResult) Equal

func (this *InfoResult) Equal(that interface{}) bool

func (*InfoResult) GetNodes

func (m *InfoResult) GetNodes() []*NodeResult

func (*InfoResult) Marshal

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

func (*InfoResult) MarshalTo

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

func (*InfoResult) ProtoMessage

func (*InfoResult) ProtoMessage()

func (*InfoResult) Reset

func (m *InfoResult) Reset()

func (*InfoResult) Size

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

func (*InfoResult) String

func (m *InfoResult) String() string

func (*InfoResult) Unmarshal

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

type JSONCommandDecoder

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

JSONCommandDecoder ...

func NewJSONCommandDecoder

func NewJSONCommandDecoder(data []byte) *JSONCommandDecoder

NewJSONCommandDecoder ...

func (*JSONCommandDecoder) Decode

func (d *JSONCommandDecoder) Decode() (*Command, error)

Decode ...

func (*JSONCommandDecoder) Reset

func (d *JSONCommandDecoder) Reset(data []byte) error

Reset ...

type JSONDecoder

type JSONDecoder struct{}

JSONDecoder ...

func NewJSONDecoder

func NewJSONDecoder() *JSONDecoder

NewJSONDecoder ...

func (*JSONDecoder) DecodeBroadcast

func (d *JSONDecoder) DecodeBroadcast(data []byte) (*BroadcastRequest, error)

DecodeBroadcast ...

func (*JSONDecoder) DecodeChannels

func (d *JSONDecoder) DecodeChannels(data []byte) (*ChannelsRequest, error)

DecodeChannels ...

func (*JSONDecoder) DecodeDisconnect

func (d *JSONDecoder) DecodeDisconnect(data []byte) (*DisconnectRequest, error)

DecodeDisconnect ...

func (*JSONDecoder) DecodeHistory

func (d *JSONDecoder) DecodeHistory(data []byte) (*HistoryRequest, error)

DecodeHistory ...

func (*JSONDecoder) DecodeHistoryRemove

func (d *JSONDecoder) DecodeHistoryRemove(data []byte) (*HistoryRemoveRequest, error)

DecodeHistoryRemove ...

func (*JSONDecoder) DecodeInfo

func (d *JSONDecoder) DecodeInfo(data []byte) (*InfoRequest, error)

DecodeInfo ...

func (*JSONDecoder) DecodePresence

func (d *JSONDecoder) DecodePresence(data []byte) (*PresenceRequest, error)

DecodePresence ...

func (*JSONDecoder) DecodePresenceStats

func (d *JSONDecoder) DecodePresenceStats(data []byte) (*PresenceStatsRequest, error)

DecodePresenceStats ...

func (*JSONDecoder) DecodePublish

func (d *JSONDecoder) DecodePublish(data []byte) (*PublishRequest, error)

DecodePublish ...

func (*JSONDecoder) DecodeUnsubscribe

func (d *JSONDecoder) DecodeUnsubscribe(data []byte) (*UnsubscribeRequest, error)

DecodeUnsubscribe ...

type JSONEncoder

type JSONEncoder struct{}

JSONEncoder ...

func NewJSONEncoder

func NewJSONEncoder() *JSONEncoder

NewJSONEncoder ...

func (*JSONEncoder) EncodeBroadcast

func (e *JSONEncoder) EncodeBroadcast(res *BroadcastResult) ([]byte, error)

EncodeBroadcastResult ...

func (*JSONEncoder) EncodeChannels

func (e *JSONEncoder) EncodeChannels(res *ChannelsResult) ([]byte, error)

EncodeChannelsResult ...

func (*JSONEncoder) EncodeDisconnect

func (e *JSONEncoder) EncodeDisconnect(res *DisconnectResult) ([]byte, error)

EncodeDisconnectResult ...

func (*JSONEncoder) EncodeHistory

func (e *JSONEncoder) EncodeHistory(res *HistoryResult) ([]byte, error)

EncodeHistoryResult ...

func (*JSONEncoder) EncodeHistoryRemove

func (e *JSONEncoder) EncodeHistoryRemove(res *HistoryRemoveResult) ([]byte, error)

EncodeHistoryRemoveResult ...

func (*JSONEncoder) EncodeInfo

func (e *JSONEncoder) EncodeInfo(res *InfoResult) ([]byte, error)

EncodeInfoResult ...

func (*JSONEncoder) EncodePresence

func (e *JSONEncoder) EncodePresence(res *PresenceResult) ([]byte, error)

EncodePresenceResult ...

func (*JSONEncoder) EncodePresenceStats

func (e *JSONEncoder) EncodePresenceStats(res *PresenceStatsResult) ([]byte, error)

EncodePresenceStatsResult ...

func (*JSONEncoder) EncodePublish

func (e *JSONEncoder) EncodePublish(res *PublishResult) ([]byte, error)

EncodePublishResult ...

func (*JSONEncoder) EncodeUnsubscribe

func (e *JSONEncoder) EncodeUnsubscribe(res *UnsubscribeResult) ([]byte, error)

EncodeUnsubscribeResult ...

type JSONReplyEncoder

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

JSONReplyEncoder ...

func NewJSONReplyEncoder

func NewJSONReplyEncoder() *JSONReplyEncoder

NewJSONReplyEncoder ...

func (*JSONReplyEncoder) Encode

func (e *JSONReplyEncoder) Encode(r *Reply) error

Encode ...

func (*JSONReplyEncoder) Finish

func (e *JSONReplyEncoder) Finish() []byte

Finish ...

func (*JSONReplyEncoder) Reset

func (e *JSONReplyEncoder) Reset()

Reset ...

type MethodType

type MethodType int32
const (
	MethodTypePublish       MethodType = 0
	MethodTypeBroadcast     MethodType = 1
	MethodTypeUnsubscribe   MethodType = 2
	MethodTypeDisconnect    MethodType = 3
	MethodTypePresence      MethodType = 4
	MethodTypePresenceStats MethodType = 5
	MethodTypeHistory       MethodType = 6
	MethodTypeHistoryRemove MethodType = 7
	MethodTypeChannels      MethodType = 8
	MethodTypeInfo          MethodType = 9
)

func (MethodType) EnumDescriptor

func (MethodType) EnumDescriptor() ([]byte, []int)

func (MethodType) String

func (x MethodType) String() string

func (*MethodType) UnmarshalJSON

func (m *MethodType) UnmarshalJSON(data []byte) error

UnmarshalJSON helps to unmarshal comamnd method when set as string.

type NodeResult

type NodeResult struct {
	UID         string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"`
	Name        string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"`
	Version     string `protobuf:"bytes,3,opt,name=version,proto3" json:"version"`
	NumClients  uint32 `protobuf:"varint,4,opt,name=num_clients,json=numClients,proto3" json:"num_clients"`
	NumUsers    uint32 `protobuf:"varint,5,opt,name=num_users,json=numUsers,proto3" json:"num_users"`
	NumChannels uint32 `protobuf:"varint,6,opt,name=num_channels,json=numChannels,proto3" json:"num_channels"`
	Uptime      uint32 `protobuf:"varint,7,opt,name=uptime,proto3" json:"uptime"`
}

func NewPopulatedNodeResult

func NewPopulatedNodeResult(r randyApi, easy bool) *NodeResult

func (*NodeResult) Descriptor

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

func (*NodeResult) Equal

func (this *NodeResult) Equal(that interface{}) bool

func (*NodeResult) GetName

func (m *NodeResult) GetName() string

func (*NodeResult) GetNumChannels

func (m *NodeResult) GetNumChannels() uint32

func (*NodeResult) GetNumClients

func (m *NodeResult) GetNumClients() uint32

func (*NodeResult) GetNumUsers

func (m *NodeResult) GetNumUsers() uint32

func (*NodeResult) GetUID

func (m *NodeResult) GetUID() string

func (*NodeResult) GetUptime

func (m *NodeResult) GetUptime() uint32

func (*NodeResult) GetVersion

func (m *NodeResult) GetVersion() string

func (*NodeResult) Marshal

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

func (*NodeResult) MarshalTo

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

func (*NodeResult) ProtoMessage

func (*NodeResult) ProtoMessage()

func (*NodeResult) Reset

func (m *NodeResult) Reset()

func (*NodeResult) Size

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

func (*NodeResult) String

func (m *NodeResult) String() string

func (*NodeResult) Unmarshal

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

type PresenceRequest

type PresenceRequest struct {
	Channel string `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel"`
}

func NewPopulatedPresenceRequest

func NewPopulatedPresenceRequest(r randyApi, easy bool) *PresenceRequest

func (*PresenceRequest) Descriptor

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

func (*PresenceRequest) Equal

func (this *PresenceRequest) Equal(that interface{}) bool

func (*PresenceRequest) GetChannel

func (m *PresenceRequest) GetChannel() string

func (*PresenceRequest) Marshal

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

func (*PresenceRequest) MarshalTo

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

func (*PresenceRequest) ProtoMessage

func (*PresenceRequest) ProtoMessage()

func (*PresenceRequest) Reset

func (m *PresenceRequest) Reset()

func (*PresenceRequest) Size

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

func (*PresenceRequest) String

func (m *PresenceRequest) String() string

func (*PresenceRequest) Unmarshal

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

type PresenceResponse

type PresenceResponse struct {
	Error  *Error          `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
	Result *PresenceResult `protobuf:"bytes,2,opt,name=result" json:"result,omitempty"`
}

func NewPopulatedPresenceResponse

func NewPopulatedPresenceResponse(r randyApi, easy bool) *PresenceResponse

func (*PresenceResponse) Descriptor

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

func (*PresenceResponse) Equal

func (this *PresenceResponse) Equal(that interface{}) bool

func (*PresenceResponse) GetError

func (m *PresenceResponse) GetError() *Error

func (*PresenceResponse) GetResult

func (m *PresenceResponse) GetResult() *PresenceResult

func (*PresenceResponse) Marshal

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

func (*PresenceResponse) MarshalTo

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

func (*PresenceResponse) ProtoMessage

func (*PresenceResponse) ProtoMessage()

func (*PresenceResponse) Reset

func (m *PresenceResponse) Reset()

func (*PresenceResponse) Size

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

func (*PresenceResponse) String

func (m *PresenceResponse) String() string

func (*PresenceResponse) Unmarshal

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

type PresenceResult

type PresenceResult struct {
	Presence map[string]*ClientInfo `` /* 133-byte string literal not displayed */
}

func NewPopulatedPresenceResult

func NewPopulatedPresenceResult(r randyApi, easy bool) *PresenceResult

func (*PresenceResult) Descriptor

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

func (*PresenceResult) Equal

func (this *PresenceResult) Equal(that interface{}) bool

func (*PresenceResult) GetPresence

func (m *PresenceResult) GetPresence() map[string]*ClientInfo

func (*PresenceResult) Marshal

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

func (*PresenceResult) MarshalTo

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

func (*PresenceResult) ProtoMessage

func (*PresenceResult) ProtoMessage()

func (*PresenceResult) Reset

func (m *PresenceResult) Reset()

func (*PresenceResult) Size

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

func (*PresenceResult) String

func (m *PresenceResult) String() string

func (*PresenceResult) Unmarshal

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

type PresenceStatsRequest

type PresenceStatsRequest struct {
	Channel string `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel"`
}

func NewPopulatedPresenceStatsRequest

func NewPopulatedPresenceStatsRequest(r randyApi, easy bool) *PresenceStatsRequest

func (*PresenceStatsRequest) Descriptor

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

func (*PresenceStatsRequest) Equal

func (this *PresenceStatsRequest) Equal(that interface{}) bool

func (*PresenceStatsRequest) GetChannel

func (m *PresenceStatsRequest) GetChannel() string

func (*PresenceStatsRequest) Marshal

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

func (*PresenceStatsRequest) MarshalTo

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

func (*PresenceStatsRequest) ProtoMessage

func (*PresenceStatsRequest) ProtoMessage()

func (*PresenceStatsRequest) Reset

func (m *PresenceStatsRequest) Reset()

func (*PresenceStatsRequest) Size

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

func (*PresenceStatsRequest) String

func (m *PresenceStatsRequest) String() string

func (*PresenceStatsRequest) Unmarshal

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

type PresenceStatsResponse

type PresenceStatsResponse struct {
	Error  *Error               `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
	Result *PresenceStatsResult `protobuf:"bytes,2,opt,name=result" json:"result,omitempty"`
}

func NewPopulatedPresenceStatsResponse

func NewPopulatedPresenceStatsResponse(r randyApi, easy bool) *PresenceStatsResponse

func (*PresenceStatsResponse) Descriptor

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

func (*PresenceStatsResponse) Equal

func (this *PresenceStatsResponse) Equal(that interface{}) bool

func (*PresenceStatsResponse) GetError

func (m *PresenceStatsResponse) GetError() *Error

func (*PresenceStatsResponse) GetResult

func (*PresenceStatsResponse) Marshal

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

func (*PresenceStatsResponse) MarshalTo

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

func (*PresenceStatsResponse) ProtoMessage

func (*PresenceStatsResponse) ProtoMessage()

func (*PresenceStatsResponse) Reset

func (m *PresenceStatsResponse) Reset()

func (*PresenceStatsResponse) Size

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

func (*PresenceStatsResponse) String

func (m *PresenceStatsResponse) String() string

func (*PresenceStatsResponse) Unmarshal

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

type PresenceStatsResult

type PresenceStatsResult struct {
	NumClients uint32 `protobuf:"varint,1,opt,name=num_clients,json=numClients,proto3" json:"num_clients"`
	NumUsers   uint32 `protobuf:"varint,2,opt,name=num_users,json=numUsers,proto3" json:"num_users"`
}

func NewPopulatedPresenceStatsResult

func NewPopulatedPresenceStatsResult(r randyApi, easy bool) *PresenceStatsResult

func (*PresenceStatsResult) Descriptor

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

func (*PresenceStatsResult) Equal

func (this *PresenceStatsResult) Equal(that interface{}) bool

func (*PresenceStatsResult) GetNumClients

func (m *PresenceStatsResult) GetNumClients() uint32

func (*PresenceStatsResult) GetNumUsers

func (m *PresenceStatsResult) GetNumUsers() uint32

func (*PresenceStatsResult) Marshal

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

func (*PresenceStatsResult) MarshalTo

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

func (*PresenceStatsResult) ProtoMessage

func (*PresenceStatsResult) ProtoMessage()

func (*PresenceStatsResult) Reset

func (m *PresenceStatsResult) Reset()

func (*PresenceStatsResult) Size

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

func (*PresenceStatsResult) String

func (m *PresenceStatsResult) String() string

func (*PresenceStatsResult) Unmarshal

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

type ProtobufCommandDecoder

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

ProtobufCommandDecoder ...

func NewProtobufCommandDecoder

func NewProtobufCommandDecoder(data []byte) *ProtobufCommandDecoder

NewProtobufCommandDecoder ...

func (*ProtobufCommandDecoder) Decode

func (d *ProtobufCommandDecoder) Decode() (*Command, error)

Decode ...

func (*ProtobufCommandDecoder) Reset

func (d *ProtobufCommandDecoder) Reset(data []byte) error

Reset ...

type ProtobufDecoder

type ProtobufDecoder struct{}

ProtobufDecoder ...

func NewProtobufDecoder

func NewProtobufDecoder() *ProtobufDecoder

NewProtobufDecoder ...

func (*ProtobufDecoder) DecodeBroadcast

func (d *ProtobufDecoder) DecodeBroadcast(data []byte) (*BroadcastRequest, error)

DecodeBroadcast ...

func (*ProtobufDecoder) DecodeChannels

func (d *ProtobufDecoder) DecodeChannels(data []byte) (*ChannelsRequest, error)

DecodeChannels ...

func (*ProtobufDecoder) DecodeDisconnect

func (d *ProtobufDecoder) DecodeDisconnect(data []byte) (*DisconnectRequest, error)

DecodeDisconnect ...

func (*ProtobufDecoder) DecodeHistory

func (d *ProtobufDecoder) DecodeHistory(data []byte) (*HistoryRequest, error)

DecodeHistory ...

func (*ProtobufDecoder) DecodeHistoryRemove

func (d *ProtobufDecoder) DecodeHistoryRemove(data []byte) (*HistoryRemoveRequest, error)

DecodeHistoryRemove ...

func (*ProtobufDecoder) DecodeInfo

func (d *ProtobufDecoder) DecodeInfo(data []byte) (*InfoRequest, error)

DecodeInfo ...

func (*ProtobufDecoder) DecodePresence

func (d *ProtobufDecoder) DecodePresence(data []byte) (*PresenceRequest, error)

DecodePresence ...

func (*ProtobufDecoder) DecodePresenceStats

func (d *ProtobufDecoder) DecodePresenceStats(data []byte) (*PresenceStatsRequest, error)

DecodePresenceStats ...

func (*ProtobufDecoder) DecodePublish

func (d *ProtobufDecoder) DecodePublish(data []byte) (*PublishRequest, error)

DecodePublish ...

func (*ProtobufDecoder) DecodeUnsubscribe

func (d *ProtobufDecoder) DecodeUnsubscribe(data []byte) (*UnsubscribeRequest, error)

DecodeUnsubscribe ...

type ProtobufEncoder

type ProtobufEncoder struct{}

ProtobufEncoder ...

func NewProtobufEncoder

func NewProtobufEncoder() *ProtobufEncoder

NewProtobufEncoder ...

func (*ProtobufEncoder) EncodeBroadcast

func (e *ProtobufEncoder) EncodeBroadcast(res *BroadcastResult) ([]byte, error)

EncodeBroadcastResult ...

func (*ProtobufEncoder) EncodeChannels

func (e *ProtobufEncoder) EncodeChannels(res *ChannelsResult) ([]byte, error)

EncodeChannelsResult ...

func (*ProtobufEncoder) EncodeDisconnect

func (e *ProtobufEncoder) EncodeDisconnect(res *DisconnectResult) ([]byte, error)

EncodeDisconnectResult ...

func (*ProtobufEncoder) EncodeHistory

func (e *ProtobufEncoder) EncodeHistory(res *HistoryResult) ([]byte, error)

EncodeHistoryResult ...

func (*ProtobufEncoder) EncodeHistoryRemove

func (e *ProtobufEncoder) EncodeHistoryRemove(res *HistoryRemoveResult) ([]byte, error)

EncodeHistoryRemoveResult ...

func (*ProtobufEncoder) EncodeInfo

func (e *ProtobufEncoder) EncodeInfo(res *InfoResult) ([]byte, error)

EncodeInfoResult ...

func (*ProtobufEncoder) EncodePresence

func (e *ProtobufEncoder) EncodePresence(res *PresenceResult) ([]byte, error)

EncodePresenceResult ...

func (*ProtobufEncoder) EncodePresenceStats

func (e *ProtobufEncoder) EncodePresenceStats(res *PresenceStatsResult) ([]byte, error)

EncodePresenceStatsResult ...

func (*ProtobufEncoder) EncodePublish

func (e *ProtobufEncoder) EncodePublish(res *PublishResult) ([]byte, error)

EncodePublishResult ...

func (*ProtobufEncoder) EncodeUnsubscribe

func (e *ProtobufEncoder) EncodeUnsubscribe(res *UnsubscribeResult) ([]byte, error)

EncodeUnsubscribeResult ...

type ProtobufReplyEncoder

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

ProtobufReplyEncoder ...

func NewProtobufReplyEncoder

func NewProtobufReplyEncoder() *ProtobufReplyEncoder

NewProtobufReplyEncoder ...

func (*ProtobufReplyEncoder) Encode

func (e *ProtobufReplyEncoder) Encode(r *Reply) error

Encode ...

func (*ProtobufReplyEncoder) Finish

func (e *ProtobufReplyEncoder) Finish() []byte

Finish ...

func (*ProtobufReplyEncoder) Reset

func (e *ProtobufReplyEncoder) Reset()

Reset ...

type Publication

type Publication struct {
	UID  string      `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
	Data Raw         `protobuf:"bytes,2,opt,name=data,proto3,customtype=Raw" json:"data"`
	Info *ClientInfo `protobuf:"bytes,3,opt,name=info" json:"info,omitempty"`
}

func NewPopulatedPublication

func NewPopulatedPublication(r randyApi, easy bool) *Publication

func (*Publication) Descriptor

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

func (*Publication) Equal

func (this *Publication) Equal(that interface{}) bool

func (*Publication) GetInfo

func (m *Publication) GetInfo() *ClientInfo

func (*Publication) GetUID

func (m *Publication) GetUID() string

func (*Publication) Marshal

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

func (*Publication) MarshalTo

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

func (*Publication) ProtoMessage

func (*Publication) ProtoMessage()

func (*Publication) Reset

func (m *Publication) Reset()

func (*Publication) Size

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

func (*Publication) String

func (m *Publication) String() string

func (*Publication) Unmarshal

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

type PublishRequest

type PublishRequest struct {
	Channel string `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel"`
	Data    Raw    `protobuf:"bytes,2,opt,name=data,proto3,customtype=Raw" json:"data"`
	UID     string `protobuf:"bytes,3,opt,name=uid,proto3" json:"uid"`
}

func NewPopulatedPublishRequest

func NewPopulatedPublishRequest(r randyApi, easy bool) *PublishRequest

func (*PublishRequest) Descriptor

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

func (*PublishRequest) Equal

func (this *PublishRequest) Equal(that interface{}) bool

func (*PublishRequest) GetChannel

func (m *PublishRequest) GetChannel() string

func (*PublishRequest) GetUID

func (m *PublishRequest) GetUID() string

func (*PublishRequest) Marshal

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

func (*PublishRequest) MarshalTo

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

func (*PublishRequest) ProtoMessage

func (*PublishRequest) ProtoMessage()

func (*PublishRequest) Reset

func (m *PublishRequest) Reset()

func (*PublishRequest) Size

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

func (*PublishRequest) String

func (m *PublishRequest) String() string

func (*PublishRequest) Unmarshal

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

type PublishResponse

type PublishResponse struct {
	Error  *Error         `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
	Result *PublishResult `protobuf:"bytes,2,opt,name=result" json:"result,omitempty"`
}

func NewPopulatedPublishResponse

func NewPopulatedPublishResponse(r randyApi, easy bool) *PublishResponse

func (*PublishResponse) Descriptor

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

func (*PublishResponse) Equal

func (this *PublishResponse) Equal(that interface{}) bool

func (*PublishResponse) GetError

func (m *PublishResponse) GetError() *Error

func (*PublishResponse) GetResult

func (m *PublishResponse) GetResult() *PublishResult

func (*PublishResponse) Marshal

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

func (*PublishResponse) MarshalTo

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

func (*PublishResponse) ProtoMessage

func (*PublishResponse) ProtoMessage()

func (*PublishResponse) Reset

func (m *PublishResponse) Reset()

func (*PublishResponse) Size

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

func (*PublishResponse) String

func (m *PublishResponse) String() string

func (*PublishResponse) Unmarshal

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

type PublishResult

type PublishResult struct {
}

func NewPopulatedPublishResult

func NewPopulatedPublishResult(r randyApi, easy bool) *PublishResult

func (*PublishResult) Descriptor

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

func (*PublishResult) Equal

func (this *PublishResult) Equal(that interface{}) bool

func (*PublishResult) Marshal

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

func (*PublishResult) MarshalTo

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

func (*PublishResult) ProtoMessage

func (*PublishResult) ProtoMessage()

func (*PublishResult) Reset

func (m *PublishResult) Reset()

func (*PublishResult) Size

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

func (*PublishResult) String

func (m *PublishResult) String() string

func (*PublishResult) Unmarshal

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

type Raw

type Raw []byte

Raw type used by Centrifugo as type for fields in structs which value we want to left untouched. For example custom application specific JSON payload data in published message. This is very similar to json.RawMessage type but have some extra methods to fit gogoprotobuf custom type interface.

func NewPopulatedRaw

func NewPopulatedRaw(r intn) *Raw

NewPopulatedRaw required for gogoprotobuf custom type.

func (Raw) Compare

func (r Raw) Compare(other Raw) int

Compare exists to fit gogoprotobuf custom type interface.

func (Raw) Equal

func (r Raw) Equal(other Raw) bool

Equal exists to fit gogoprotobuf custom type interface.

func (Raw) Marshal

func (r Raw) Marshal() ([]byte, error)

Marshal encodes Raw to slice of bytes. Exists to fit gogoprotobuf custom type interface.

func (Raw) MarshalJSON

func (r Raw) MarshalJSON() ([]byte, error)

MarshalJSON returns *r as the JSON encoding of r.

func (Raw) MarshalTo

func (r Raw) MarshalTo(data []byte) (n int, err error)

MarshalTo exists to fit gogoprotobuf custom type interface.

func (*Raw) Size

func (r *Raw) Size() int

Size exists to fit gogoprotobuf custom type interface.

func (*Raw) Unmarshal

func (r *Raw) Unmarshal(data []byte) error

Unmarshal exists to fit gogoprotobuf custom type interface.

func (*Raw) UnmarshalJSON

func (r *Raw) UnmarshalJSON(data []byte) error

UnmarshalJSON sets *r to a copy of data.

type Reply

type Reply struct {
	ID     uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Error  *Error `protobuf:"bytes,2,opt,name=error" json:"error,omitempty"`
	Result Raw    `protobuf:"bytes,3,opt,name=result,proto3,customtype=Raw" json:"result,omitempty"`
}

func NewPopulatedReply

func NewPopulatedReply(r randyApi, easy bool) *Reply

func (*Reply) Descriptor

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

func (*Reply) Equal

func (this *Reply) Equal(that interface{}) bool

func (*Reply) GetError

func (m *Reply) GetError() *Error

func (*Reply) GetID

func (m *Reply) GetID() uint32

func (*Reply) Marshal

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

func (*Reply) MarshalTo

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

func (*Reply) ProtoMessage

func (*Reply) ProtoMessage()

func (*Reply) Reset

func (m *Reply) Reset()

func (*Reply) Size

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

func (*Reply) String

func (m *Reply) String() string

func (*Reply) Unmarshal

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

type ReplyEncoder

type ReplyEncoder interface {
	Reset()
	Encode(*Reply) error
	Finish() []byte
}

ReplyEncoder ...

func GetReplyEncoder

func GetReplyEncoder(enc Encoding) ReplyEncoder

GetReplyEncoder ...

type UnsubscribeRequest

type UnsubscribeRequest struct {
	Channel string `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel"`
	User    string `protobuf:"bytes,2,opt,name=user,proto3" json:"user"`
}

func NewPopulatedUnsubscribeRequest

func NewPopulatedUnsubscribeRequest(r randyApi, easy bool) *UnsubscribeRequest

func (*UnsubscribeRequest) Descriptor

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

func (*UnsubscribeRequest) Equal

func (this *UnsubscribeRequest) Equal(that interface{}) bool

func (*UnsubscribeRequest) GetChannel

func (m *UnsubscribeRequest) GetChannel() string

func (*UnsubscribeRequest) GetUser

func (m *UnsubscribeRequest) GetUser() string

func (*UnsubscribeRequest) Marshal

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

func (*UnsubscribeRequest) MarshalTo

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

func (*UnsubscribeRequest) ProtoMessage

func (*UnsubscribeRequest) ProtoMessage()

func (*UnsubscribeRequest) Reset

func (m *UnsubscribeRequest) Reset()

func (*UnsubscribeRequest) Size

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

func (*UnsubscribeRequest) String

func (m *UnsubscribeRequest) String() string

func (*UnsubscribeRequest) Unmarshal

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

type UnsubscribeResponse

type UnsubscribeResponse struct {
	Error  *Error             `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
	Result *UnsubscribeResult `protobuf:"bytes,2,opt,name=result" json:"result,omitempty"`
}

func NewPopulatedUnsubscribeResponse

func NewPopulatedUnsubscribeResponse(r randyApi, easy bool) *UnsubscribeResponse

func (*UnsubscribeResponse) Descriptor

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

func (*UnsubscribeResponse) Equal

func (this *UnsubscribeResponse) Equal(that interface{}) bool

func (*UnsubscribeResponse) GetError

func (m *UnsubscribeResponse) GetError() *Error

func (*UnsubscribeResponse) GetResult

func (m *UnsubscribeResponse) GetResult() *UnsubscribeResult

func (*UnsubscribeResponse) Marshal

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

func (*UnsubscribeResponse) MarshalTo

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

func (*UnsubscribeResponse) ProtoMessage

func (*UnsubscribeResponse) ProtoMessage()

func (*UnsubscribeResponse) Reset

func (m *UnsubscribeResponse) Reset()

func (*UnsubscribeResponse) Size

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

func (*UnsubscribeResponse) String

func (m *UnsubscribeResponse) String() string

func (*UnsubscribeResponse) Unmarshal

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

type UnsubscribeResult

type UnsubscribeResult struct {
}

func NewPopulatedUnsubscribeResult

func NewPopulatedUnsubscribeResult(r randyApi, easy bool) *UnsubscribeResult

func (*UnsubscribeResult) Descriptor

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

func (*UnsubscribeResult) Equal

func (this *UnsubscribeResult) Equal(that interface{}) bool

func (*UnsubscribeResult) Marshal

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

func (*UnsubscribeResult) MarshalTo

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

func (*UnsubscribeResult) ProtoMessage

func (*UnsubscribeResult) ProtoMessage()

func (*UnsubscribeResult) Reset

func (m *UnsubscribeResult) Reset()

func (*UnsubscribeResult) Size

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

func (*UnsubscribeResult) String

func (m *UnsubscribeResult) String() string

func (*UnsubscribeResult) Unmarshal

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

Jump to

Keyboard shortcuts

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