ws

package module
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthPbbp2        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPbbp2          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPbbp2 = fmt.Errorf("proto: unexpected end of group")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	AppID     string
	AppSecret string
	Domain    string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(appID, appSecret string, options ...Option) *Client

func (*Client) Close

func (c *Client) Close() error

func (*Client) Start

func (c *Client) Start(ctx context.Context) error

Start connects to Feishu and reconnects after an unexpected disconnect. It returns when ctx is cancelled, Close is called, or a non-retryable error occurs.

type EventHandler

type EventHandler func(context.Context, []byte) error

type Frame

type Frame struct {
	SeqID           uint64   `protobuf:"varint,1,req,name=SeqID" json:"SeqID"`
	LogID           uint64   `protobuf:"varint,2,req,name=LogID" json:"LogID"`
	Service         int32    `protobuf:"varint,3,req,name=service" json:"service"`
	Method          int32    `protobuf:"varint,4,req,name=method" json:"method"`
	Headers         []Header `protobuf:"bytes,5,rep,name=headers" json:"headers"`
	PayloadEncoding string   `protobuf:"bytes,6,opt,name=payload_encoding" json:"payload_encoding"`
	PayloadType     string   `protobuf:"bytes,7,opt,name=payload_type" json:"payload_type"`
	Payload         []byte   `protobuf:"bytes,8,opt,name=payload" json:"payload"`
	LogIDNew        string   `protobuf:"bytes,9,opt,name=LogIDNew" json:"LogIDNew"`
}

message frame

func (*Frame) Descriptor

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

func (*Frame) GetHeaders

func (m *Frame) GetHeaders() []Header

func (*Frame) GetLogID

func (m *Frame) GetLogID() uint64

func (*Frame) GetLogIDNew

func (m *Frame) GetLogIDNew() string

func (*Frame) GetMethod

func (m *Frame) GetMethod() int32

func (*Frame) GetPayload

func (m *Frame) GetPayload() []byte

func (*Frame) GetPayloadEncoding

func (m *Frame) GetPayloadEncoding() string

func (*Frame) GetPayloadType

func (m *Frame) GetPayloadType() string

func (*Frame) GetSeqID

func (m *Frame) GetSeqID() uint64

func (*Frame) GetService

func (m *Frame) GetService() int32

func (*Frame) Marshal

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

func (*Frame) MarshalTo

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

func (*Frame) MarshalToSizedBuffer

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

func (*Frame) ProtoMessage

func (*Frame) ProtoMessage()

func (*Frame) Reset

func (m *Frame) Reset()

func (*Frame) Size

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

func (*Frame) String

func (m *Frame) String() string

func (*Frame) Unmarshal

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

func (*Frame) XXX_DiscardUnknown

func (m *Frame) XXX_DiscardUnknown()

func (*Frame) XXX_Marshal

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

func (*Frame) XXX_Merge

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

func (*Frame) XXX_Size

func (m *Frame) XXX_Size() int

func (*Frame) XXX_Unmarshal

func (m *Frame) XXX_Unmarshal(b []byte) error
type Header struct {
	Key   string `protobuf:"bytes,1,req,name=key" json:"key"`
	Value string `protobuf:"bytes,2,req,name=value" json:"value"`
}

func (*Header) Descriptor

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

func (*Header) GetKey

func (m *Header) GetKey() string

func (*Header) GetValue

func (m *Header) GetValue() string

func (*Header) Marshal

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

func (*Header) MarshalTo

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

func (*Header) MarshalToSizedBuffer

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

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) Reset

func (m *Header) Reset()

func (*Header) Size

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

func (*Header) String

func (m *Header) String() string

func (*Header) Unmarshal

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

func (*Header) XXX_DiscardUnknown

func (m *Header) XXX_DiscardUnknown()

func (*Header) XXX_Marshal

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

func (*Header) XXX_Merge

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

func (*Header) XXX_Size

func (m *Header) XXX_Size() int

func (*Header) XXX_Unmarshal

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

type Option

type Option func(*Client)

func WithDialer

func WithDialer(dialer *websocket.Dialer) Option

func WithDomain

func WithDomain(domain string) Option

func WithEventHandler

func WithEventHandler(handler EventHandler) Option

Jump to

Keyboard shortcuts

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