git_sync

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BatchRepos

func BatchRepos(ctx context.Context, c *app.RequestContext)

BatchRepos 批量操作仓库(目前仅支持 delete)。

func CreatePlatform

func CreatePlatform(ctx context.Context, c *app.RequestContext)

CreatePlatform 创建平台

func DeletePlatform

func DeletePlatform(ctx context.Context, c *app.RequestContext)

DeletePlatform 删除平台

func DeletePlatformWebhook added in v1.6.0

func DeletePlatformWebhook(ctx context.Context, c *app.RequestContext)

DeletePlatformWebhook 删除平台侧的 Webhook。 @router /api/v1/webhook/platform/delete [POST]

func GetPlatform

func GetPlatform(ctx context.Context, c *app.RequestContext)

GetPlatform 获取单个平台

func GetSyncService

func GetSyncService() *synccore.Service

func HealthCheck

func HealthCheck(ctx context.Context, c *app.RequestContext)

HealthCheck returns the health status of the service and its dependencies.

func ListEvents

func ListEvents(ctx context.Context, c *app.RequestContext)

func ListOperationLogs

func ListOperationLogs(ctx context.Context, c *app.RequestContext)

ListOperationLogs GET /api/v1/logs/operations 返回 {list, pagination, stats}(stats.total 为全量总数,pagination.total 为过滤后的结果数)。

func ListPlatformRepos

func ListPlatformRepos(ctx context.Context, c *app.RequestContext)

ListPlatformRepos 列出平台上的仓库(从远程 API 获取)

func ListPlatformWebhooks added in v1.6.0

func ListPlatformWebhooks(ctx context.Context, c *app.RequestContext)

ListPlatformWebhooks 列出平台侧已注册的 Webhook。 @router /api/v1/webhook/platform/list [GET]

func ListPlatforms

func ListPlatforms(ctx context.Context, c *app.RequestContext)

ListPlatforms 列出所有平台

func RateLimitMiddleware

func RateLimitMiddleware() app.HandlerFunc

RateLimitMiddleware returns a middleware that enforces webhook rate limiting. When the rate limit is exceeded, it responds with HTTP 429 Too Many Requests.

func ReceiveWebhook

func ReceiveWebhook(ctx context.Context, c *app.RequestContext)

func RegisterPlatformWebhook added in v1.6.0

func RegisterPlatformWebhook(ctx context.Context, c *app.RequestContext)

RegisterPlatformWebhook 在平台侧为仓库注册 Webhook。 @router /api/v1/webhook/platform/register [POST]

func RepoBranches

func RepoBranches(ctx context.Context, c *app.RequestContext)

func RepoCreate

func RepoCreate(ctx context.Context, c *app.RequestContext)

func RepoDelete

func RepoDelete(ctx context.Context, c *app.RequestContext)

func RepoGet

func RepoGet(ctx context.Context, c *app.RequestContext)

func RepoList

func RepoList(ctx context.Context, c *app.RequestContext)

func RepoTest

func RepoTest(ctx context.Context, c *app.RequestContext)

func RepoUpdate

func RepoUpdate(ctx context.Context, c *app.RequestContext)

func RetryEvent

func RetryEvent(ctx context.Context, c *app.RequestContext)

func RuleCreate

func RuleCreate(ctx context.Context, c *app.RequestContext)

func RuleDelete

func RuleDelete(ctx context.Context, c *app.RequestContext)

func RuleGet

func RuleGet(ctx context.Context, c *app.RequestContext)

func RuleList

func RuleList(ctx context.Context, c *app.RequestContext)

func RuleUpdate

func RuleUpdate(ctx context.Context, c *app.RequestContext)

func SetDefaultPlatform

func SetDefaultPlatform(ctx context.Context, c *app.RequestContext)

SetDefaultPlatform 设置默认平台

func SetSyncServiceGetter

func SetSyncServiceGetter(fn func() *synccore.Service)

func SyncPlatformRepos

func SyncPlatformRepos(ctx context.Context, c *app.RequestContext)

SyncPlatformRepos 同步平台仓库到本地

func SystemStatus

func SystemStatus(ctx context.Context, c *app.RequestContext)

SystemStatus 返回系统状态信息(管理面板用)。

func TaskCreate

func TaskCreate(ctx context.Context, c *app.RequestContext)

func TaskDelete

func TaskDelete(ctx context.Context, c *app.RequestContext)

func TaskGet

func TaskGet(ctx context.Context, c *app.RequestContext)

func TaskHistory

func TaskHistory(ctx context.Context, c *app.RequestContext)

func TaskList

func TaskList(ctx context.Context, c *app.RequestContext)

func TaskPreview

func TaskPreview(ctx context.Context, c *app.RequestContext)

func TaskRun

func TaskRun(ctx context.Context, c *app.RequestContext)

func TaskUpdate

func TaskUpdate(ctx context.Context, c *app.RequestContext)

func TestPlatformConnection

func TestPlatformConnection(ctx context.Context, c *app.RequestContext)

TestPlatformConnection 测试平台连接

func UpdatePlatform

func UpdatePlatform(ctx context.Context, c *app.RequestContext)

UpdatePlatform 更新平台

Types

This section is empty.

Jump to

Keyboard shortcuts

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