appmeta

package
v1.0.65 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package appmeta exposes read-only views of a Feishu app's published version, subscribed event types, and scopes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchSubscribedCallbacks added in v1.0.55

func FetchSubscribedCallbacks(ctx context.Context, client APIClient, appID string) ([]string, error)

FetchSubscribedCallbacks returns the app's currently subscribed callback names from application/get. On a successful fetch it always returns a non-nil slice (empty when callback_info is absent or lists no callbacks) so callers can distinguish "fetched, zero callbacks subscribed" — a definitive console state that must fail the precheck — from a fetch error (nil), which is a weak-dependency skip. Identity must be bot: the endpoint is app-level.

Types

type APIClient

type APIClient = event.APIClient

APIClient aliases event.APIClient so one concrete adapter satisfies event, appmeta, and consume.

type AppVersion

type AppVersion struct {
	VersionID    string
	Version      string
	EventTypes   []string
	TenantScopes []string
}

AppVersion is the projected subset of one /app_versions item preflight cares about.

func FetchCurrentPublished

func FetchCurrentPublished(ctx context.Context, client APIClient, appID string) (*AppVersion, error)

FetchCurrentPublished returns the most recently published version of appID, or (nil, nil) if never published. page_size=2 suffices: Feishu disallows a new version while an in-progress one exists, so the first status==1 item with publish_time is the live one.

Jump to

Keyboard shortcuts

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