controller

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2025 License: Apache-2.0 Imports: 51 Imported by: 1 module, 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

Overview

Package controller provides HTTP handlers for plugin management operations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CaptureInternalServerError

func CaptureInternalServerError(err error, scopes map[string]interface{}) error

func GetAuthController

func GetAuthController(cfg *models.Config, commonFn *resolver.GraphQLServer) *authCtrl

func GetFieldByType

func GetFieldByType(name string, inputType string, fieldType string, validation *models.Validation, argType string, update bool) interface{}

Types

type CreatePluginRequest added in v1.2.0

type CreatePluginRequest struct {
	ID               string            `json:"id" form:"id"`
	Language         string            `json:"language" form:"language"`
	Title            string            `json:"title" form:"title"`
	Description      string            `json:"description" form:"description"`
	Type             string            `json:"type" form:"type"`
	Version          string            `json:"version" form:"version"`
	Author           string            `json:"author" form:"author"`
	RepositoryURL    string            `json:"repository_url" form:"repository_url"`
	Branch           string            `json:"branch" form:"branch"`
	BinaryPath       string            `json:"binary_path" form:"binary_path"`
	Enable           bool              `json:"enable" form:"enable"`
	Debug            bool              `json:"debug" form:"debug"`
	EnvVars          map[string]string `json:"env_vars" form:"env_vars"`
	ExportedVariable string            `json:"exported_variable" form:"exported_variable"`
}

type DatabaseRequest added in v1.0.7

type DatabaseRequest struct {
	File     string `json:"file"`
	Type     string `json:"type"`
	Host     string `json:"host"`
	Port     int    `json:"port"`
	Database string `json:"database"`
	Username string `json:"username"`
	Password string `json:"password"`
}

type DeleteSyncTokenRequest added in v1.2.1

type DeleteSyncTokenRequest struct {
	Token    string `json:"token"`
	Duration string `json:"duration"`
}

type GenerateSyncTokenRequest added in v1.2.1

type GenerateSyncTokenRequest struct {
	Name       string   `json:"name"`
	Duration   string   `json:"duration"`
	ProjectIDs []string `json:"project_ids"`
	Scopes     []string `json:"scopes"`
}

type GraphCtrl

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

func GetGraphQLController

func GetGraphQLController(cfg *models.Config, commonFn *resolver.GraphQLServer) *GraphCtrl

func (*GraphCtrl) FunctionExecute

func (g *GraphCtrl) FunctionExecute(c echo.Context) error

func (*GraphCtrl) GetGraphQLAggregateField

func (g *GraphCtrl) GetGraphQLAggregateField(name string, field *models.FieldInfo, update bool) *graphql.Field

func (*GraphCtrl) GetGraphQLArgumentObjectField

func (g *GraphCtrl) GetGraphQLArgumentObjectField(name string, field *models.FieldInfo, update bool) *graphql.InputObjectFieldConfig

func (*GraphCtrl) GetGraphQLField

func (g *GraphCtrl) GetGraphQLField(name string, field *models.FieldInfo, update bool) *graphql.Field

func (*GraphCtrl) GetSystemCacheInfo

func (g *GraphCtrl) GetSystemCacheInfo(i echo.Context) error

func (*GraphCtrl) PluginUpload

func (g *GraphCtrl) PluginUpload(router echo.Context) error

func (*GraphCtrl) PublicGraphQL

func (g *GraphCtrl) PublicGraphQL(i echo.Context) error

func (*GraphCtrl) RESTApiDocGenerator

func (g *GraphCtrl) RESTApiDocGenerator(c echo.Context) error

func (*GraphCtrl) RestToGraphQL

func (g *GraphCtrl) RestToGraphQL(c echo.Context) error

func (*GraphCtrl) SubscriptionWrapHandler

func (g *GraphCtrl) SubscriptionWrapHandler(c echo.Context) error

func (*GraphCtrl) SystemGraphQL

func (g *GraphCtrl) SystemGraphQL(i echo.Context) error

func (*GraphCtrl) SystemHealth added in v1.2.1

func (g *GraphCtrl) SystemHealth(c echo.Context) error

type ModelWithFilter

type ModelWithFilter struct {
	Model             *models.ModelType
	Filter            *models.FilteredModel
	HasMetaQuery      bool
	IsDataloaderModel bool
	KnownAs           string
}

type PlatformInfo added in v1.2.0

type PlatformInfo struct {
	OS           string `json:"os"`
	Architecture string `json:"architecture"`
	Version      string `json:"version"`
	Hostname     string `json:"hostname"`
}

PlatformInfo represents server platform information

type PlatformResponse added in v1.2.0

type PlatformResponse struct {
	Success  bool         `json:"success"`
	Message  string       `json:"message"`
	Platform PlatformInfo `json:"platform"`
}

PlatformResponse represents the platform API response

type PluginListResponse added in v1.2.0

type PluginListResponse struct {
	Success bool               `json:"success"`
	Message string             `json:"message"`
	Plugins []PluginStatusInfo `json:"plugins"`
}

type PluginOperationResponse added in v1.2.0

type PluginOperationResponse struct {
	Success  bool   `json:"success"`
	Message  string `json:"message"`
	PluginID string `json:"plugin_id,omitempty"`
	Status   string `json:"status,omitempty"`
	Error    string `json:"error,omitempty"`
}

type PluginStatusInfo added in v1.2.0

type PluginStatusInfo struct {
	ID          string `json:"id"`
	Title       string `json:"title"`
	Version     string `json:"version"`
	Status      string `json:"status"` // loaded, stopped, error
	Language    string `json:"language"`
	Type        string `json:"type"`
	Enable      bool   `json:"enable"`
	Debug       bool   `json:"debug"`
	LastUpdated string `json:"last_updated"`
	Error       string `json:"error,omitempty"`
}

type PluginV2Controller added in v1.2.0

type PluginV2Controller struct {
	Server *resolver.GraphQLServer
}

PluginV2Controller handles plugin management operations

func NewPluginV2Controller added in v1.2.0

func NewPluginV2Controller(server *resolver.GraphQLServer) *PluginV2Controller

NewPluginV2Controller creates a new plugin v2 controller

func (*PluginV2Controller) CreateOrUpdatePlugin added in v1.2.0

func (pc *PluginV2Controller) CreateOrUpdatePlugin(c echo.Context) error

CreateOrUpdatePlugin handles plugin creation and updates via multipart upload

func (*PluginV2Controller) DeletePlugin added in v1.2.0

func (pc *PluginV2Controller) DeletePlugin(c echo.Context) error

DeletePlugin removes a plugin completely

func (*PluginV2Controller) GetPlatformInfo added in v1.2.0

func (pc *PluginV2Controller) GetPlatformInfo(c echo.Context) error

GetPlatformInfo returns the server's platform information for compatibility checking

func (*PluginV2Controller) GetPluginStatus added in v1.2.0

func (pc *PluginV2Controller) GetPluginStatus(c echo.Context) error

GetPluginStatus returns the status of a specific plugin

func (*PluginV2Controller) ListPlugins added in v1.2.0

func (pc *PluginV2Controller) ListPlugins(c echo.Context) error

ListPlugins returns the status of all plugins

func (*PluginV2Controller) RestartPlugin added in v1.2.0

func (pc *PluginV2Controller) RestartPlugin(c echo.Context) error

RestartPlugin restarts a specific plugin

func (*PluginV2Controller) StopPlugin added in v1.2.0

func (pc *PluginV2Controller) StopPlugin(c echo.Context) error

StopPlugin stops a specific plugin

Directories

Path Synopsis
Package middleware provides authentication and authorization middleware for HTTP handlers
Package middleware provides authentication and authorization middleware for HTTP handlers

Jump to

Keyboard shortcuts

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