Documentation
¶
Overview ¶
Package controller provides HTTP handlers for plugin management operations
Index ¶
- func ApplyDBConfigFromMap(d *models.DriverCredentials, dbConfig map[string]interface{})
- func CaptureInternalServerError(err error, scopes map[string]interface{}) error
- func DatabaseCheckCore(a *AuthController, c echo.Context, req *DatabaseRequest) error
- func DatabaseCheckPort(v interface{}, defaultPort string) string
- func GetFieldByType(name string, inputType string, fieldType string, validation *models.Validation, ...) interface{}
- type AuthController
- func (a *AuthController) AdminResetPasswordV2(c echo.Context) error
- func (a *AuthController) CSVTempGen(c echo.Context) error
- func (a *AuthController) ChangePasswordV2(c echo.Context) error
- func (a *AuthController) DatabaseCheck(c echo.Context) error
- func (a *AuthController) DeleteSyncToken(c echo.Context) error
- func (a *AuthController) DemoProjectSwitch(c echo.Context) error
- func (a *AuthController) ForgetPasswordConfirmedV2(c echo.Context) error
- func (a *AuthController) ForgetPasswordRequestV2(c echo.Context) error
- func (a *AuthController) GenerateSyncToken(c echo.Context) error
- func (a *AuthController) GetProfile(c echo.Context) error
- func (a *AuthController) Journey(c echo.Context) error
- func (a *AuthController) ListSyncTokens(c echo.Context) error
- func (a *AuthController) LoginV2(c echo.Context) error
- func (a *AuthController) LogoutV2(c echo.Context) error
- func (a *AuthController) ProjectCreation(c echo.Context) error
- func (a *AuthController) ProjectDelete(c echo.Context) error
- func (a *AuthController) ProjectList(c echo.Context) error
- func (a *AuthController) ProjectNameCheck(c echo.Context) error
- func (a *AuthController) ProjectSwitchV2(c echo.Context) error
- func (a *AuthController) RegisterV2(c echo.Context) error
- func (a *AuthController) SyncProject(c echo.Context) error
- func (a *AuthController) UpdateProfile(c echo.Context) error
- func (a *AuthController) VerifyV2(c echo.Context) error
- type CreatePluginRequest
- type DatabaseRequest
- type DeleteSyncTokenRequest
- type FilesController
- type GenerateSyncTokenRequest
- type GraphCtrl
- func (g *GraphCtrl) FunctionExecute(c echo.Context) error
- func (g *GraphCtrl) GetGraphQLAggregateField(name string, field *models.FieldInfo, update bool) *graphql.Field
- func (g *GraphCtrl) GetGraphQLArgumentObjectField(name string, field *models.FieldInfo, update bool) *graphql.InputObjectFieldConfig
- func (g *GraphCtrl) GetGraphQLField(name string, field *models.FieldInfo, update bool) *graphql.Field
- func (g *GraphCtrl) GetSystemCacheInfo(i echo.Context) error
- func (g *GraphCtrl) PluginUpload(router echo.Context) error
- func (g *GraphCtrl) PublicGraphQL(i echo.Context) error
- func (g *GraphCtrl) PublicSubscriptionWrapHandler(c echo.Context) error
- func (g *GraphCtrl) RESTApiDocGenerator(c echo.Context) error
- func (g *GraphCtrl) RestToGraphQL(c echo.Context) error
- func (g *GraphCtrl) SubscriptionWrapHandler(c echo.Context) error
- func (g *GraphCtrl) SystemGraphQL(i echo.Context) error
- func (g *GraphCtrl) SystemHealth(c echo.Context) error
- type ObjectUploader
- type PlatformInfo
- type PlatformResponse
- type PluginListResponse
- type PluginOperationResponse
- type PluginStatusInfo
- type PluginV2Controller
- func (pc *PluginV2Controller) CreateOrUpdatePlugin(c echo.Context) error
- func (pc *PluginV2Controller) DeletePlugin(c echo.Context) error
- func (pc *PluginV2Controller) GetPlatformInfo(c echo.Context) error
- func (pc *PluginV2Controller) GetPluginStatus(c echo.Context) error
- func (pc *PluginV2Controller) ListPlugins(c echo.Context) error
- func (pc *PluginV2Controller) RestartPlugin(c echo.Context) error
- func (pc *PluginV2Controller) StopPlugin(c echo.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyDBConfigFromMap ¶ added in v1.6.0
func ApplyDBConfigFromMap(d *models.DriverCredentials, dbConfig map[string]interface{})
ApplyDBConfigFromMap merges db_config map values into driver credentials (open-core fields only).
func DatabaseCheckCore ¶ added in v1.6.0
func DatabaseCheckCore(a *AuthController, c echo.Context, req *DatabaseRequest) error
DatabaseCheckCore runs open-core database connectivity checks (Mongo, SQL family, coredb). Pro wraps this for hosted providers.
func DatabaseCheckPort ¶ added in v1.6.0
DatabaseCheckPort coerces JSON port values for database check requests.
func GetFieldByType ¶
Types ¶
type AuthController ¶ added in v1.6.0
func GetAuthController ¶
func GetAuthController(cfg *models.Config, commonFn *resolver.GraphQLServer) *AuthController
func (*AuthController) AdminResetPasswordV2 ¶ added in v1.6.0
func (a *AuthController) AdminResetPasswordV2(c echo.Context) error
AdminResetPasswordV2 handles POST /admin/reset-password. Requires APITO_ADMIN_RESET_SECRET in request body and config.
func (*AuthController) CSVTempGen ¶ added in v1.6.0
func (a *AuthController) CSVTempGen(c echo.Context) error
func (*AuthController) ChangePasswordV2 ¶ added in v1.6.0
func (a *AuthController) ChangePasswordV2(c echo.Context) error
func (*AuthController) DatabaseCheck ¶ added in v1.6.0
func (a *AuthController) DatabaseCheck(c echo.Context) error
func (*AuthController) DeleteSyncToken ¶ added in v1.6.0
func (a *AuthController) DeleteSyncToken(c echo.Context) error
func (*AuthController) DemoProjectSwitch ¶ added in v1.6.0
func (a *AuthController) DemoProjectSwitch(c echo.Context) error
func (*AuthController) ForgetPasswordConfirmedV2 ¶ added in v1.6.0
func (a *AuthController) ForgetPasswordConfirmedV2(c echo.Context) error
func (*AuthController) ForgetPasswordRequestV2 ¶ added in v1.6.0
func (a *AuthController) ForgetPasswordRequestV2(c echo.Context) error
func (*AuthController) GenerateSyncToken ¶ added in v1.6.0
func (a *AuthController) GenerateSyncToken(c echo.Context) error
func (*AuthController) GetProfile ¶ added in v1.6.0
func (a *AuthController) GetProfile(c echo.Context) error
func (*AuthController) Journey ¶ added in v1.6.0
func (a *AuthController) Journey(c echo.Context) error
func (*AuthController) ListSyncTokens ¶ added in v1.6.0
func (a *AuthController) ListSyncTokens(c echo.Context) error
func (*AuthController) LoginV2 ¶ added in v1.6.0
func (a *AuthController) LoginV2(c echo.Context) error
func (*AuthController) LogoutV2 ¶ added in v1.6.0
func (a *AuthController) LogoutV2(c echo.Context) error
func (*AuthController) ProjectCreation ¶ added in v1.6.0
func (a *AuthController) ProjectCreation(c echo.Context) error
func (*AuthController) ProjectDelete ¶ added in v1.6.0
func (a *AuthController) ProjectDelete(c echo.Context) error
func (*AuthController) ProjectList ¶ added in v1.6.0
func (a *AuthController) ProjectList(c echo.Context) error
func (*AuthController) ProjectNameCheck ¶ added in v1.6.0
func (a *AuthController) ProjectNameCheck(c echo.Context) error
func (*AuthController) ProjectSwitchV2 ¶ added in v1.6.0
func (a *AuthController) ProjectSwitchV2(c echo.Context) error
func (*AuthController) RegisterV2 ¶ added in v1.6.0
func (a *AuthController) RegisterV2(c echo.Context) error
func (*AuthController) SyncProject ¶ added in v1.6.0
func (a *AuthController) SyncProject(c echo.Context) error
func (*AuthController) UpdateProfile ¶ added in v1.6.0
func (a *AuthController) UpdateProfile(c echo.Context) error
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 DeleteSyncTokenRequest ¶ added in v1.2.1
type FilesController ¶ added in v1.7.0
type FilesController struct {
Cfg *models.Config
Storage func(project *models.Project, cfg *models.Config) (ObjectUploader, error)
// contains filtered or unexported fields
}
FilesController handles /secured/files REST endpoints.
func NewFilesController ¶ added in v1.7.0
func NewFilesController(cfg *models.Config, server *resolver.GraphQLServer) *FilesController
NewFilesController creates a FilesController with default S3 storage factory.
func (*FilesController) Delete ¶ added in v1.7.0
func (fc *FilesController) Delete(c echo.Context) error
Delete handles POST /secured/files/delete.
type GenerateSyncTokenRequest ¶ added in v1.2.1
type GraphCtrl ¶
type GraphCtrl struct {
// contains filtered or unexported fields
}
func GetGraphQLController ¶
func GetGraphQLController(cfg *models.Config, commonFn *resolver.GraphQLServer) *GraphCtrl
func (*GraphCtrl) GetGraphQLAggregateField ¶
func (*GraphCtrl) GetGraphQLArgumentObjectField ¶
func (*GraphCtrl) GetGraphQLField ¶
func (*GraphCtrl) PublicSubscriptionWrapHandler ¶ added in v1.7.0
PublicSubscriptionWrapHandler serves per-project public GraphQL subscriptions over websockets. The subscription schema (auto-generated <model>Changed fields + broadcast) is built per connection from the authenticated project/role, then served via a per-connection wsgraphql server.
func (*GraphCtrl) RESTApiDocGenerator ¶
func (*GraphCtrl) SubscriptionWrapHandler ¶
type ObjectUploader ¶ added in v1.7.0
type ObjectUploader interface {
Upload(ctx context.Context, key string, body io.Reader, contentType string, size int64) (publicURL string, err error)
DeleteObjects(ctx context.Context, keys []string) (failed []string, err error)
}
ObjectUploader uploads and deletes blobs in project storage (injectable for tests).
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 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
Source Files
¶
- access_token_type.go
- auth_controller.go
- files_controller.go
- graph_controller.go
- graphql_utility.go
- plugin_controller.go
- project_controller.go
- public_schema_builder.go
- public_schema_builder_build.go
- public_schema_builder_helpers.go
- public_schema_builder_role.go
- public_schema_builder_steps.go
- public_schema_builder_testfixtures.go
- public_schema_cache.go
- schema_build_metrics.go
- token_controller.go
- upload_controller.go
Directories
¶
| Path | Synopsis |
|---|---|
|
Package middleware provides authentication and authorization middleware for HTTP handlers
|
Package middleware provides authentication and authorization middleware for HTTP handlers |