Documentation
¶
Overview ¶
Package channel provides the high-level Channel SDK for Go.
Use this package to create a Channel, listen for Feishu/Lark events, send messages, stream replies, handle card callbacks, and configure common OpenAPI client options. Lower-level OpenAPI clients, WebSocket clients, event dispatching, and generated service models continue to come from github.com/larksuite/oapi-sdk-go/v3.
Index ¶
- Constants
- Variables
- type BatchConfig
- type BatchedDispatch
- type BotAddedEvent
- type BotIdentity
- type BotIdentityCacheConfig
- type CardActionContext
- type CardActionEvent
- type CardActionOperator
- type CardActionPayload
- type Channel
- type CommentEvent
- type FeishuChannelError
- type FeishuChannelErrorCode
- type MediaKind
- type Mention
- type NormalizedMessage
- type OperatorInfo
- type Option
- func WithBotIdentityCacheConfig(cfg types.BotIdentityCacheConfig) Option
- func WithClientAssertionProvider(provider larkcore.ClientAssertionProvider) Option
- func WithDomain(domain string) Option
- func WithEnableTokenCache(enable bool) Option
- func WithHTTPClient(httpClient larkcore.HttpClient) Option
- func WithHeaders(headers http.Header) Option
- func WithLogLevel(level larkcore.LogLevel) Option
- func WithLogger(logger larkcore.Logger) Option
- func WithOAuthBaseURL(baseURL string) Option
- func WithOpenBaseURL(baseURL string) Option
- func WithOutboundConfig(cfg types.OutboundConfig) Option
- func WithPolicyConfig(cfg types.PolicyConfig) Option
- func WithReqTimeout(timeout time.Duration) Option
- func WithSafetyConfig(cfg types.SafetyConfig) Option
- func WithSource(source string) Option
- func WithTokenCache(cache larkcore.Cache) Option
- func WithWebSocketDomain(domain string) Option
- type OutboundConfig
- type PolicyConfig
- type PolicyDecision
- type ReactionEvent
- type RejectEvent
- type RejectReason
- type Resource
- type SafetyConfig
- type SendInput
- type SendResult
- type StreamController
- type UploadInput
- type UploadResult
Constants ¶
View Source
const ( MediaKindImage = types.MediaKindImage MediaKindFile = types.MediaKindFile MediaKindAudio = types.MediaKindAudio MediaKindVideo = types.MediaKindVideo )
View Source
const ( RejectReasonGroupNotAllowed = types.RejectReasonGroupNotAllowed RejectReasonNoMention = types.RejectReasonNoMention RejectReasonMentionAll = types.RejectReasonMentionAll RejectReasonDMDisabled = types.RejectReasonDMDisabled RejectReasonSenderNotAllowed = types.RejectReasonSenderNotAllowed )
View Source
const ( ErrCodeTargetRevoked = types.ErrCodeTargetRevoked ErrCodePermissionDenied = types.ErrCodePermissionDenied ErrCodeFormatError = types.ErrCodeFormatError ErrCodeRateLimited = types.ErrCodeRateLimited ErrCodeSSRFBlocked = types.ErrCodeSSRFBlocked ErrCodeSendTimeout = types.ErrCodeSendTimeout ErrCodeUnknown = types.ErrCodeUnknown )
Variables ¶
View Source
var ClassifyError = types.ClassifyError
View Source
var DefaultBatchConfig = types.DefaultBatchConfig
View Source
var IsFormatError = types.IsFormatError
View Source
var IsRetryable = types.IsRetryable
Functions ¶
This section is empty.
Types ¶
type BatchConfig ¶
type BatchConfig = types.BatchConfig
type BatchedDispatch ¶
type BatchedDispatch = types.BatchedDispatch
type BotAddedEvent ¶
type BotAddedEvent = types.BotAddedEvent
type BotIdentity ¶
type BotIdentity = types.BotIdentity
type BotIdentityCacheConfig ¶
type BotIdentityCacheConfig = types.BotIdentityCacheConfig
type CardActionContext ¶
type CardActionContext = types.CardActionContext
type CardActionEvent ¶
type CardActionEvent = types.CardActionEvent
type CardActionOperator ¶
type CardActionOperator = types.CardActionOperator
type CardActionPayload ¶
type CardActionPayload = types.CardActionPayload
type CommentEvent ¶
type CommentEvent = types.CommentEvent
type FeishuChannelError ¶
type FeishuChannelError = types.FeishuChannelError
type FeishuChannelErrorCode ¶
type FeishuChannelErrorCode = types.FeishuChannelErrorCode
type NormalizedMessage ¶
type NormalizedMessage = types.NormalizedMessage
type OperatorInfo ¶
type OperatorInfo = types.OperatorInfo
type Option ¶
type Option func(*config)
func WithBotIdentityCacheConfig ¶
func WithBotIdentityCacheConfig(cfg types.BotIdentityCacheConfig) Option
func WithClientAssertionProvider ¶
func WithClientAssertionProvider(provider larkcore.ClientAssertionProvider) Option
func WithDomain ¶
func WithEnableTokenCache ¶
func WithHTTPClient ¶
func WithHTTPClient(httpClient larkcore.HttpClient) Option
func WithHeaders ¶
func WithLogLevel ¶
func WithLogger ¶
func WithOAuthBaseURL ¶
func WithOpenBaseURL ¶
func WithOutboundConfig ¶
func WithOutboundConfig(cfg types.OutboundConfig) Option
func WithPolicyConfig ¶
func WithPolicyConfig(cfg types.PolicyConfig) Option
func WithReqTimeout ¶
func WithSafetyConfig ¶
func WithSafetyConfig(cfg types.SafetyConfig) Option
func WithSource ¶
func WithTokenCache ¶
func WithWebSocketDomain ¶
type OutboundConfig ¶
type OutboundConfig = types.OutboundConfig
type PolicyConfig ¶
type PolicyConfig = types.PolicyConfig
type PolicyDecision ¶
type PolicyDecision = types.PolicyDecision
type ReactionEvent ¶
type ReactionEvent = types.ReactionEvent
type RejectEvent ¶
type RejectEvent = types.RejectEvent
type RejectReason ¶
type RejectReason = types.RejectReason
type SafetyConfig ¶
type SafetyConfig = types.SafetyConfig
type SendResult ¶
type SendResult = types.SendResult
type StreamController ¶
type StreamController = types.StreamController
type UploadInput ¶
type UploadInput = types.UploadInput
type UploadResult ¶
type UploadResult = types.UploadResult
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
card_action
command
|
|
|
custom_domain
command
|
|
|
echo_bot
command
|
|
|
send_message
command
|
|
|
stream_reply
command
|
|
|
internal
|
|
Click to show internal directories.
Click to hide internal directories.