Versions in this module Expand all Collapse all v3 v3.2.5 May 9, 2024 v3.2.4 Apr 17, 2024 v3.2.3 Apr 17, 2024 v3.2.2 Mar 26, 2024 v3.2.1 Mar 8, 2024 v3.2.0 Feb 22, 2024 Changes in this version + const AuthFailed + const DeviceID + const ExceedConnLimit + const Forbidden + const GenEndpointUri + const HeaderBizRt + const HeaderHandshakeAuthErrCode + const HeaderHandshakeMsg + const HeaderHandshakeStatus + const HeaderInstanceID + const HeaderMessageID + const HeaderSeq + const HeaderSum + const HeaderTimestamp + const HeaderTraceID + const HeaderType + const InternalError + const OK + const ServiceID + const SystemBusy + var ErrIntOverflowPbbp2 = fmt.Errorf("proto: integer overflow") + var ErrInvalidLengthPbbp2 = fmt.Errorf("proto: negative length found during unmarshaling") + var ErrUnexpectedEndOfGroupPbbp2 = fmt.Errorf("proto: unexpected end of group") + type Client struct + func NewClient(appId, appSecret string, opts ...ClientOption) *Client + func (c *Client) Start(ctx context.Context) (err error) + type ClientConfig struct + PingInterval int + ReconnectCount int + ReconnectInterval int + ReconnectNonce int + type ClientError struct + Code int + Msg string + func NewClientError(code int, msg string) *ClientError + func (e *ClientError) Error() string + type ClientOption func(cli *Client) + func WithAutoReconnect(b bool) ClientOption + func WithDomain(domain string) ClientOption + func WithEventHandler(handler *dispatcher.EventDispatcher) ClientOption + func WithLogLevel(level larkcore.LogLevel) ClientOption + func WithLogger(logger larkcore.Logger) ClientOption + type Endpoint struct + ClientConfig *ClientConfig + Url string + type EndpointResp struct + Code int + Data *Endpoint + Msg string + type Frame struct + Headers []Header + LogID uint64 + LogIDNew string + Method int32 + Payload []byte + PayloadEncoding string + PayloadType string + SeqID uint64 + Service int32 + func NewPingFrame(serviceID int32) *Frame + func (*Frame) Descriptor() ([]byte, []int) + func (*Frame) ProtoMessage() + func (m *Frame) GetHeaders() []Header + func (m *Frame) GetLogID() uint64 + func (m *Frame) GetLogIDNew() string + func (m *Frame) GetMethod() int32 + func (m *Frame) GetPayload() []byte + func (m *Frame) GetPayloadEncoding() string + func (m *Frame) GetPayloadType() string + func (m *Frame) GetSeqID() uint64 + func (m *Frame) GetService() int32 + func (m *Frame) Marshal() (dAtA []byte, err error) + func (m *Frame) MarshalTo(dAtA []byte) (int, error) + func (m *Frame) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *Frame) Reset() + func (m *Frame) Size() (n int) + func (m *Frame) String() string + func (m *Frame) Unmarshal(dAtA []byte) error + func (m *Frame) XXX_DiscardUnknown() + func (m *Frame) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Frame) XXX_Merge(src proto.Message) + func (m *Frame) XXX_Size() int + func (m *Frame) XXX_Unmarshal(b []byte) error + type FrameType int + const FrameTypeControl + const FrameTypeData + type Header struct + Key string + Value string + func (*Header) Descriptor() ([]byte, []int) + func (*Header) ProtoMessage() + func (m *Header) GetKey() string + func (m *Header) GetValue() string + func (m *Header) Marshal() (dAtA []byte, err error) + func (m *Header) MarshalTo(dAtA []byte) (int, error) + func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *Header) Reset() + func (m *Header) Size() (n int) + func (m *Header) String() string + func (m *Header) Unmarshal(dAtA []byte) error + func (m *Header) XXX_DiscardUnknown() + func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Header) XXX_Merge(src proto.Message) + func (m *Header) XXX_Size() int + func (m *Header) XXX_Unmarshal(b []byte) error + type Headers []Header + func (h *Headers) Add(key, value string) + func (h Headers) GetInt(key string) int + func (h Headers) GetString(key string) string + type MessageType string + const MessageTypeCard + const MessageTypeEvent + const MessageTypePing + const MessageTypePong + type Response struct + Data []byte + Headers map[string]string + StatusCode int + func NewResponseByCode(code int) *Response + type ServerError struct + Code int + Msg string + func NewServerError(code int, msg string) *ServerError + func (e *ServerError) Error() string v3.2.0-beta.1 Dec 20, 2023