controllers

package
v1.0.80 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitAPIControllers

func InitAPIControllers(ctx *core.APPContext, api *gin.RouterGroup)

InitAPIControllers api

func InitRootController added in v1.0.50

func InitRootController(ctx *core.APPContext, root *gin.RouterGroup)

func InitV1Controllers

func InitV1Controllers(ctx *core.APPContext, v1 *gin.RouterGroup)

InitV1Controllers api/v1

Types

type AsyncTaskController

type AsyncTaskController struct {
	BaseController
	// contains filtered or unexported fields
}

AsyncTaskController handles async task-related HTTP requests

func (*AsyncTaskController) GetResourceTasks

func (c *AsyncTaskController) GetResourceTasks(ctx *gin.Context)

GetResourceTasks returns all tasks for a specific resource

func (*AsyncTaskController) GetTask

func (c *AsyncTaskController) GetTask(ctx *gin.Context)

GetTask returns a specific task by ID

func (*AsyncTaskController) GetUserTasks

func (c *AsyncTaskController) GetUserTasks(ctx *gin.Context)

GetUserTasks returns all tasks for the authenticated user

func (*AsyncTaskController) Init

func (c *AsyncTaskController) Init(ctx *core.APPContext, router *gin.RouterGroup)

type AuthController

type AuthController struct {
	BaseController
	// contains filtered or unexported fields
}

func (*AuthController) GetCurrentUser

func (c *AuthController) GetCurrentUser(ctx *gin.Context)

GetCurrentUser returns the current authenticated user

func (*AuthController) GithubCallback

func (c *AuthController) GithubCallback(ctx *gin.Context)

GithubCallback handles GitHub OAuth callback

func (*AuthController) GithubLogin

func (c *AuthController) GithubLogin(ctx *gin.Context)

GithubLogin initiates GitHub OAuth flow

func (*AuthController) Init

func (c *AuthController) Init(ctx *core.APPContext, router *gin.RouterGroup)

func (*AuthController) Logout

func (c *AuthController) Logout(context *gin.Context)

type BaseController

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

type Controller

type Controller interface {
	Init(ctx *core.APPContext, router *gin.RouterGroup)
}

type CreateFolderRequest

type CreateFolderRequest struct {
	Path   string `json:"path"`
	Folder string `json:"folder" binding:"required"`
}

type GitHubAppController

type GitHubAppController struct {
	BaseController
	// contains filtered or unexported fields
}

GitHubAppController handles GitHub App related operations

func (*GitHubAppController) GetAppInfo

func (c *GitHubAppController) GetAppInfo(ctx *gin.Context)

GetAppInfo returns information about the GitHub App

func (*GitHubAppController) GetInstallationRepositories

func (c *GitHubAppController) GetInstallationRepositories(ctx *gin.Context)

GetInstallationRepositories returns repositories for a specific installation

func (*GitHubAppController) GetInstallations

func (c *GitHubAppController) GetInstallations(ctx *gin.Context)

GetInstallations returns installations of the GitHub App for the current user

func (*GitHubAppController) ImportRepositories

func (c *GitHubAppController) ImportRepositories(ctx *gin.Context)

ImportRepositories imports repositories from a GitHub App installation

func (*GitHubAppController) Init

func (c *GitHubAppController) Init(ctx *core.APPContext, router *gin.RouterGroup)

type GitHubWebhookController

type GitHubWebhookController struct {
	BaseController
	// contains filtered or unexported fields
}

GitHubWebhookController handles webhook events from GitHub

func (*GitHubWebhookController) HandleWebhook

func (c *GitHubWebhookController) HandleWebhook(ctx *gin.Context)

HandleWebhook processes incoming GitHub webhook events

func (*GitHubWebhookController) Init

func (c *GitHubWebhookController) Init(ctx *core.APPContext, router *gin.RouterGroup)

type MetricsController added in v1.0.50

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

func (*MetricsController) GetMetrics added in v1.0.50

func (mc *MetricsController) GetMetrics(c *gin.Context)

GetMetrics handles the /metrics endpoint for Prometheus scraping

func (*MetricsController) Init added in v1.0.50

func (mc *MetricsController) Init(ctx *core.APPContext, router *gin.RouterGroup)

type RenameFileRequest

type RenameFileRequest struct {
	OldPath string `json:"oldPath" binding:"required"`
	NewPath string `json:"newPath" binding:"required"`
}

RenameFileRequest represents the request body for renaming a file

type SiteController

type SiteController struct {
	BaseController
}

func (*SiteController) Init

func (c *SiteController) Init(ctx *core.APPContext, router *gin.RouterGroup)

type StorageController

type StorageController struct {
	BaseController
	// contains filtered or unexported fields
}

func (*StorageController) AttachFile

func (s *StorageController) AttachFile(c *gin.Context)

func (*StorageController) GetAttachedFile

func (s *StorageController) GetAttachedFile(c *gin.Context)

func (*StorageController) Init

func (s *StorageController) Init(ctx *core.APPContext, router *gin.RouterGroup)

type UpdateFileRequest

type UpdateFileRequest struct {
	Path    string `json:"path" binding:"required"`
	Content string `json:"content" binding:"required"`
}

type UserGitRepoCollectionController

type UserGitRepoCollectionController struct {
	BaseController
	// contains filtered or unexported fields
}

func (*UserGitRepoCollectionController) CreateFolder

func (ctrl *UserGitRepoCollectionController) CreateFolder(c *gin.Context)

func (*UserGitRepoCollectionController) DeleteFile

func (ctrl *UserGitRepoCollectionController) DeleteFile(c *gin.Context)

DeleteFile deletes a file or directory within a collection

func (*UserGitRepoCollectionController) GetCollectionFilesInPath

func (ctrl *UserGitRepoCollectionController) GetCollectionFilesInPath(c *gin.Context)

GetCollectionFilesInPath returns all files in a specific path within a collection

func (*UserGitRepoCollectionController) GetCollectionsByRepo

func (ctrl *UserGitRepoCollectionController) GetCollectionsByRepo(c *gin.Context)

GetCollectionsByRepo returns all collections for a specific repository

func (*UserGitRepoCollectionController) GetFileContent

func (ctrl *UserGitRepoCollectionController) GetFileContent(c *gin.Context)

GetFileContent returns the content of a file within a collection

func (*UserGitRepoCollectionController) Init

func (*UserGitRepoCollectionController) RenameFile

func (ctrl *UserGitRepoCollectionController) RenameFile(c *gin.Context)

RenameFile renames a file in a collection

func (*UserGitRepoCollectionController) UpdateFileContent

func (ctrl *UserGitRepoCollectionController) UpdateFileContent(c *gin.Context)

UpdateFileContent updates the content of a file within a collection

func (*UserGitRepoCollectionController) UploadFile

func (ctrl *UserGitRepoCollectionController) UploadFile(c *gin.Context)

UploadFile uploads a file to a collection using JSON request

type UserGitRepoController

type UserGitRepoController struct {
	BaseController
	// contains filtered or unexported fields
}

UserGitRepoController handles git repository-related HTTP requests

func (*UserGitRepoController) DeleteRepo

func (c *UserGitRepoController) DeleteRepo(ctx *gin.Context)

DeleteRepo deletes a git repository

func (*UserGitRepoController) GetRepo

func (c *UserGitRepoController) GetRepo(ctx *gin.Context)

GetRepo returns a specific git repository

func (*UserGitRepoController) GetRepoBranches

func (c *UserGitRepoController) GetRepoBranches(ctx *gin.Context)

GetRepoBranches returns all branches for a specific git repository

func (*UserGitRepoController) GetReposByUser

func (c *UserGitRepoController) GetReposByUser(ctx *gin.Context)

GetReposByUser returns all git repositories for a specific user

func (*UserGitRepoController) Init

func (c *UserGitRepoController) Init(ctx *core.APPContext, router *gin.RouterGroup)

func (*UserGitRepoController) SyncRepo

func (c *UserGitRepoController) SyncRepo(ctx *gin.Context)

SyncRepo synchronizes a git repository with its remote

func (*UserGitRepoController) UpdateRepo

func (c *UserGitRepoController) UpdateRepo(ctx *gin.Context)

UpdateRepo updates an existing git repository

Jump to

Keyboard shortcuts

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