extension

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExtensionActionResponse

type ExtensionActionResponse struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Status  string `json:"status"`
}

type ExtensionAgentSyncRequest

type ExtensionAgentSyncRequest struct {
	AgentID string `path:"agentId" json:"agent_id"`
}

type ExtensionAgentSyncResponse

type ExtensionAgentSyncResponse struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Payload interface{} `json:"payload"`
}

type ExtensionBindingItem

type ExtensionBindingItem struct {
	BindingType string `json:"binding_type"`
	BindingKey  string `json:"binding_key"`
	TargetRef   string `json:"target_ref"`
	Status      string `json:"status"`
	LastError   string `json:"last_error"`
}

type ExtensionCapabilitiesResponse

type ExtensionCapabilitiesResponse struct {
	Code         int                         `json:"code"`
	Message      string                      `json:"message"`
	Capabilities []string                    `json:"capabilities"`
	Details      []ExtensionCapabilityDetail `json:"details"`
}

type ExtensionCapabilityDetail

type ExtensionCapabilityDetail struct {
	Type        string            `json:"type"`
	Key         string            `json:"key"`
	Capability  string            `json:"capability"`
	Provider    string            `json:"provider"`
	Operations  []string          `json:"operations"`
	Permissions map[string]string `json:"permissions,omitempty"`
	ConfigKeys  []string          `json:"config_keys,omitempty"`
	Source      string            `json:"source"`
}

type ExtensionCatalogDetailResponse

type ExtensionCatalogDetailResponse struct {
	Code         int                    `json:"code"`
	Message      string                 `json:"message"`
	Item         *ExtensionCatalogItem  `json:"item"`
	Releases     []ExtensionReleaseItem `json:"releases"`
	Manifest     map[string]any         `json:"manifest"`
	Capabilities []string               `json:"capabilities"`
}

type ExtensionCatalogItem

type ExtensionCatalogItem struct {
	ID             string   `json:"id"`
	Name           string   `json:"name"`
	DisplayName    string   `json:"display_name"`
	Vendor         string   `json:"vendor"`
	Kind           string   `json:"kind"`
	Summary        string   `json:"summary"`
	IconURL        string   `json:"icon_url"`
	Status         string   `json:"status"`
	LatestVersion  string   `json:"latest_version"`
	Installed      bool     `json:"installed"`
	DefaultInstall bool     `json:"default_install"`
	Tags           []string `json:"tags"`
}

type ExtensionCatalogListRequest

type ExtensionCatalogListRequest struct {
	Keyword  string `form:"keyword" json:"keyword"`
	Kind     string `form:"kind" json:"kind"`
	Status   string `form:"status" json:"status"`
	Page     int    `form:"page,default=1" json:"page"`
	PageSize int    `form:"page_size,default=20" json:"page_size"`
}

type ExtensionCatalogListResponse

type ExtensionCatalogListResponse struct {
	Code    int                    `json:"code"`
	Message string                 `json:"message"`
	Total   int64                  `json:"total"`
	Items   []ExtensionCatalogItem `json:"items"`
}

type ExtensionCatalogReleasesResponse

type ExtensionCatalogReleasesResponse struct {
	Code     int                    `json:"code"`
	Message  string                 `json:"message"`
	Total    int64                  `json:"total"`
	Releases []ExtensionReleaseItem `json:"releases"`
}

type ExtensionConfigResponse

type ExtensionConfigResponse struct {
	Code       int               `json:"code"`
	Message    string            `json:"message"`
	Config     map[string]any    `json:"config"`
	SecretRefs map[string]string `json:"secret_refs"`
}

type ExtensionConfigSchemaResponse

type ExtensionConfigSchemaResponse struct {
	Code    int            `json:"code"`
	Message string         `json:"message"`
	Schema  map[string]any `json:"schema"`
}

type ExtensionConfigUpdateRequest

type ExtensionConfigUpdateRequest struct {
	Config     map[string]any    `json:"config"`
	SecretRefs map[string]string `json:"secret_refs"`
}

type ExtensionEventItem

type ExtensionEventItem struct {
	EventType string `json:"event_type"`
	Level     string `json:"level"`
	Message   string `json:"message"`
	Payload   string `json:"payload"`
	CreatedBy string `json:"created_by"`
	CreatedAt int64  `json:"created_at"`
}

type ExtensionEventListRequest

type ExtensionEventListRequest struct {
	Level    string `form:"level" json:"level"`
	Keyword  string `form:"keyword" json:"keyword"`
	Page     int    `form:"page,default=1" json:"page"`
	PageSize int    `form:"page_size,default=20" json:"page_size"`
}

type ExtensionEventListResponse

type ExtensionEventListResponse struct {
	Code    int                  `json:"code"`
	Message string               `json:"message"`
	Total   int64                `json:"total"`
	Items   []ExtensionEventItem `json:"items"`
}

type ExtensionHealthCheckResponse

type ExtensionHealthCheckResponse struct {
	Code      int    `json:"code"`
	Message   string `json:"message"`
	Status    string `json:"status"`
	CheckedAt int64  `json:"checked_at"`
}

type ExtensionInstallRequest

type ExtensionInstallRequest struct {
	ExtensionID    string            `json:"extension_id" binding:"required"`
	ReleaseVersion string            `json:"release_version" binding:"required"`
	ScopeType      string            `json:"scope_type" binding:"required"`
	ScopeID        string            `json:"scope_id" binding:"required"`
	TargetType     string            `json:"target_type" binding:"required"`
	TargetID       string            `json:"target_id"`
	Config         map[string]any    `json:"config"`
	SecretRefs     map[string]string `json:"secret_refs"`
}

type ExtensionInstallResponse

type ExtensionInstallResponse struct {
	Code           int    `json:"code"`
	Message        string `json:"message"`
	InstallationID uint   `json:"installation_id"`
	Status         string `json:"status"`
}

type ExtensionInstallationDetailResponse

type ExtensionInstallationDetailResponse struct {
	Code         int                        `json:"code"`
	Message      string                     `json:"message"`
	Installation *ExtensionInstallationItem `json:"installation"`
	ConfigSchema map[string]any             `json:"config_schema"`
	Config       map[string]any             `json:"config"`
	SecretRefs   map[string]string          `json:"secret_refs"`
	Bindings     []ExtensionBindingItem     `json:"bindings"`
	Events       []ExtensionEventItem       `json:"events"`
}

type ExtensionInstallationItem

type ExtensionInstallationItem struct {
	ID              uint   `json:"id"`
	InstallationKey string `json:"installation_key"`
	ExtensionID     string `json:"extension_id"`
	DisplayName     string `json:"display_name"`
	ReleaseVersion  string `json:"release_version"`
	ScopeType       string `json:"scope_type"`
	ScopeID         string `json:"scope_id"`
	TargetType      string `json:"target_type"`
	TargetID        string `json:"target_id"`
	Status          string `json:"status"`
	DesiredState    string `json:"desired_state"`
	Enabled         bool   `json:"enabled"`
	HealthStatus    string `json:"health_status"`
	LastError       string `json:"last_error"`
	UpdatedAt       int64  `json:"updated_at"`
}

type ExtensionInstallationListRequest

type ExtensionInstallationListRequest struct {
	ExtensionID string `form:"extension_id" json:"extension_id"`
	ScopeType   string `form:"scope_type" json:"scope_type"`
	ScopeID     string `form:"scope_id" json:"scope_id"`
	TargetType  string `form:"target_type" json:"target_type"`
	TargetID    string `form:"target_id" json:"target_id"`
	Status      string `form:"status" json:"status"`
	Enabled     *bool  `form:"enabled" json:"enabled"`
	Page        int    `form:"page,default=1" json:"page"`
	PageSize    int    `form:"page_size,default=20" json:"page_size"`
}

type ExtensionInstallationListResponse

type ExtensionInstallationListResponse struct {
	Code    int                         `json:"code"`
	Message string                      `json:"message"`
	Total   int64                       `json:"total"`
	Items   []ExtensionInstallationItem `json:"items"`
}

type ExtensionPageItem

type ExtensionPageItem struct {
	Type               string         `json:"type"`
	Key                string         `json:"key"`
	Title              string         `json:"title"`
	Route              string         `json:"route"`
	Icon               string         `json:"icon"`
	Group              string         `json:"group"`
	Order              int            `json:"order"`
	RequiredPermission string         `json:"required_permission,omitempty"`
	Source             string         `json:"source"`
	Schema             map[string]any `json:"schema"`
}

type ExtensionPagesResponse

type ExtensionPagesResponse struct {
	Code    int                 `json:"code"`
	Message string              `json:"message"`
	Pages   []ExtensionPageItem `json:"pages"`
}

type ExtensionReconcileResponse

type ExtensionReconcileResponse struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Status  string `json:"status"`
	Applied int    `json:"applied"`
	Failed  int    `json:"failed"`
}

type ExtensionReleaseItem

type ExtensionReleaseItem struct {
	Version        string `json:"version"`
	ReleaseChannel string `json:"release_channel"`
	MinCoreVersion string `json:"min_core_version"`
	PublishedAt    int64  `json:"published_at"`
	Changelog      string `json:"changelog"`
}

type ExtensionTestConnectionResponse

type ExtensionTestConnectionResponse struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Status  string `json:"status"`
}

type ExtensionUpgradeRequest

type ExtensionUpgradeRequest struct {
	ReleaseVersion string `json:"release_version" binding:"required"`
}

type Handler

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

func NewHandler

func NewHandler(service *Service) *Handler

func (*Handler) AgentExtensions

func (h *Handler) AgentExtensions(c *gin.Context)

func (*Handler) AgentExtensionsSync

func (h *Handler) AgentExtensionsSync(c *gin.Context)

func (*Handler) AgentSyncPayload

func (h *Handler) AgentSyncPayload(c *gin.Context)

func (*Handler) Capabilities

func (h *Handler) Capabilities(c *gin.Context)

func (*Handler) CatalogDetail

func (h *Handler) CatalogDetail(c *gin.Context)

func (*Handler) CatalogList

func (h *Handler) CatalogList(c *gin.Context)

func (*Handler) CatalogReleases

func (h *Handler) CatalogReleases(c *gin.Context)

func (*Handler) CompatCapabilities

func (h *Handler) CompatCapabilities(c *gin.Context)

func (*Handler) CompatConfig

func (h *Handler) CompatConfig(c *gin.Context)

func (*Handler) CompatConfigSchema

func (h *Handler) CompatConfigSchema(c *gin.Context)

func (*Handler) CompatDisable

func (h *Handler) CompatDisable(c *gin.Context)

func (*Handler) CompatEnable

func (h *Handler) CompatEnable(c *gin.Context)

func (*Handler) CompatEvents

func (h *Handler) CompatEvents(c *gin.Context)

func (*Handler) CompatHealthCheck

func (h *Handler) CompatHealthCheck(c *gin.Context)

func (*Handler) CompatPages

func (h *Handler) CompatPages(c *gin.Context)

func (*Handler) CompatReconcile

func (h *Handler) CompatReconcile(c *gin.Context)

func (*Handler) CompatTestConnection

func (h *Handler) CompatTestConnection(c *gin.Context)

func (*Handler) CompatUninstall

func (h *Handler) CompatUninstall(c *gin.Context)

func (*Handler) CompatUpdateConfig

func (h *Handler) CompatUpdateConfig(c *gin.Context)

func (*Handler) CompatUpgrade

func (h *Handler) CompatUpgrade(c *gin.Context)

func (*Handler) Config

func (h *Handler) Config(c *gin.Context)

func (*Handler) ConfigSchema

func (h *Handler) ConfigSchema(c *gin.Context)

func (*Handler) Disable

func (h *Handler) Disable(c *gin.Context)

func (*Handler) Enable

func (h *Handler) Enable(c *gin.Context)

func (*Handler) Events

func (h *Handler) Events(c *gin.Context)

func (*Handler) HealthCheck

func (h *Handler) HealthCheck(c *gin.Context)

func (*Handler) Install

func (h *Handler) Install(c *gin.Context)

func (*Handler) InstallationDetail

func (h *Handler) InstallationDetail(c *gin.Context)

func (*Handler) InstallationList

func (h *Handler) InstallationList(c *gin.Context)

func (*Handler) Pages

func (h *Handler) Pages(c *gin.Context)

func (*Handler) Reconcile

func (h *Handler) Reconcile(c *gin.Context)

func (*Handler) TestConnection

func (h *Handler) TestConnection(c *gin.Context)

func (*Handler) Uninstall

func (h *Handler) Uninstall(c *gin.Context)

func (*Handler) UpdateConfig

func (h *Handler) UpdateConfig(c *gin.Context)

func (*Handler) Upgrade

func (h *Handler) Upgrade(c *gin.Context)

type Service

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

func NewService

func NewService(svcCtx *svc.ServiceContext) *Service

func (*Service) AgentSyncPayload

func (s *Service) AgentSyncPayload(ctx context.Context, agentID string) (*ExtensionAgentSyncResponse, error)

func (*Service) Capabilities

func (s *Service) Capabilities(ctx context.Context, id uint) (*ExtensionCapabilitiesResponse, error)

func (*Service) CatalogDetail

func (s *Service) CatalogDetail(ctx context.Context, extensionID string) (*ExtensionCatalogDetailResponse, error)

func (*Service) CatalogReleases

func (s *Service) CatalogReleases(ctx context.Context, extensionID string) (*ExtensionCatalogReleasesResponse, error)

func (*Service) Config

func (s *Service) Config(ctx context.Context, id uint) (*ExtensionConfigResponse, error)

func (*Service) ConfigSchema

func (s *Service) ConfigSchema(ctx context.Context, id uint) (*ExtensionConfigSchemaResponse, error)

func (*Service) Disable

func (s *Service) Disable(ctx context.Context, id uint, operator string) (*ExtensionActionResponse, error)

func (*Service) Enable

func (s *Service) Enable(ctx context.Context, id uint, operator string) (*ExtensionActionResponse, error)

func (*Service) Events

func (*Service) HealthCheck

func (s *Service) HealthCheck(ctx context.Context, id uint, operator string) (*ExtensionHealthCheckResponse, error)

func (*Service) Install

func (*Service) InstallationDetail

func (s *Service) InstallationDetail(ctx context.Context, id uint) (*ExtensionInstallationDetailResponse, error)

func (*Service) Pages

func (s *Service) Pages(ctx context.Context, id uint) (*ExtensionPagesResponse, error)

func (*Service) Reconcile

func (s *Service) Reconcile(ctx context.Context, id uint) (*ExtensionReconcileResponse, error)

func (*Service) ResolveInstallationID

func (s *Service) ResolveInstallationID(ctx context.Context, identifier string) (uint, error)

func (*Service) TestConnection

func (s *Service) TestConnection(ctx context.Context, id uint, operator string) (*ExtensionTestConnectionResponse, error)

func (*Service) Uninstall

func (s *Service) Uninstall(ctx context.Context, id uint, operator string) (*ExtensionActionResponse, error)

func (*Service) UpdateConfig

func (s *Service) UpdateConfig(ctx context.Context, id uint, req ExtensionConfigUpdateRequest, operator string) (*ExtensionActionResponse, error)

func (*Service) Upgrade

func (s *Service) Upgrade(ctx context.Context, id uint, version, operator string) (*ExtensionActionResponse, error)

Jump to

Keyboard shortcuts

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