v1

package
v0.0.0-...-8902c11 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CodeupWebhookHandler

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

CodeupWebhookHandler 云效 Codeup Webhook 处理器

func NewCodeupWebhookHandler

func NewCodeupWebhookHandler(i *do.Injector) (*CodeupWebhookHandler, error)

NewCodeupWebhookHandler 创建 Codeup Webhook 处理器

func (*CodeupWebhookHandler) Webhook

func (h *CodeupWebhookHandler) Webhook(c *web.Context) error

Webhook 处理 Codeup Webhook 请求

Codeup 在 Header `X-Codeup-Token` 或 `X-Yunxiao-Token` 中携带 secretToken 校验; 事件类型在 `X-Event-Type` / `X-Codeup-Event` 中。

type GitBotHandler

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

GitBotHandler GitBot 处理器

func NewGitBotHandler

func NewGitBotHandler(i *do.Injector) (*GitBotHandler, error)

NewGitBotHandler 创建 GitBot 处理器

func (*GitBotHandler) Create

func (h *GitBotHandler) Create(c *web.Context, req domain.CreateGitBotReq) error

Create 创建 GitBot

@Summary		创建 Git Bot
@Description	创建 Git Bot
@Tags			【用户】Git Bot
@Accept			json
@Produce		json
@Security		MonkeyCodeAIAuth
@Param			req	body		domain.CreateGitBotReq			true	"参数"
@Success		200	{object}	web.Resp{data=domain.GitBot}	"成功"
@Failure		401	{object}	web.Resp						"未授权"
@Failure		500	{object}	web.Resp						"服务器错误"
@Router			/api/v1/users/git-bots [post]

func (*GitBotHandler) Delete

func (h *GitBotHandler) Delete(c *web.Context, req domain.IDReq[uuid.UUID]) error

Delete 删除 GitBot

@Summary		删除 Git Bot
@Description	删除 Git Bot
@Tags			【用户】Git Bot
@Accept			json
@Produce		json
@Security		MonkeyCodeAIAuth
@Param			id	path		string		true	"ID"
@Success		200	{object}	web.Resp{}	"成功"
@Failure		401	{object}	web.Resp	"未授权"
@Failure		500	{object}	web.Resp	"服务器错误"
@Router			/api/v1/users/git-bots/{id} [delete]

func (*GitBotHandler) List

func (h *GitBotHandler) List(c *web.Context) error

List 获取用户的 GitBot 列表

@Summary		Git Bot 列表
@Description	Git Bot 列表
@Tags			【用户】Git Bot
@Accept			json
@Produce		json
@Security		MonkeyCodeAIAuth
@Success		200	{object}	web.Resp{data=domain.ListGitBotResp}	"成功"
@Failure		401	{object}	web.Resp								"未授权"
@Failure		500	{object}	web.Resp								"服务器错误"
@Router			/api/v1/users/git-bots [get]

func (*GitBotHandler) ListTask

func (h *GitBotHandler) ListTask(c *web.Context, req domain.ListGitBotTaskReq) error

ListTask 获取 GitBot 任务列表

@Summary		Git Bot 任务列表
@Description	Git Bot 任务列表,支持分页
@Tags			【用户】Git Bot
@Accept			json
@Produce		json
@Security		MonkeyCodeAIAuth
@Param			req	query		domain.ListGitBotTaskReq					true	"分页参数,可选 id 指定 Git Bot"
@Success		200	{object}	web.Resp{data=domain.ListGitBotTaskResp}	"成功"
@Failure		401	{object}	web.Resp									"未授权"
@Failure		500	{object}	web.Resp									"服务器错误"
@Router			/api/v1/users/git-bots/tasks [get]

func (*GitBotHandler) ShareBot

func (h *GitBotHandler) ShareBot(c *web.Context, req domain.ShareGitBotReq) error

ShareBot 共享 GitBot

@Summary		分享 Git Bot
@Description	分享 Git Bot
@Tags			【用户】Git Bot
@Accept			json
@Produce		json
@Security		MonkeyCodeAIAuth
@Param			req	body		domain.ShareGitBotReq	true	"参数"
@Success		200	{object}	web.Resp{}				"成功"
@Failure		401	{object}	web.Resp				"未授权"
@Failure		500	{object}	web.Resp				"服务器错误"
@Router			/api/v1/users/git-bots/share [post]

func (*GitBotHandler) Update

func (h *GitBotHandler) Update(c *web.Context, req domain.UpdateGitBotReq) error

Update 更新 GitBot

@Summary		更新 Git Bot
@Description	更新 Git Bot
@Tags			【用户】Git Bot
@Accept			json
@Produce		json
@Security		MonkeyCodeAIAuth
@Param			req	body		domain.UpdateGitBotReq	true	"参数"
@Success		200	{object}	web.Resp{}				"成功"
@Failure		401	{object}	web.Resp				"未授权"
@Failure		500	{object}	web.Resp				"服务器错误"
@Router			/api/v1/users/git-bots [put]

type GitIdentityHandler

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

GitIdentityHandler Git 身份认证处理器

func NewGitIdentityHandler

func NewGitIdentityHandler(i *do.Injector) (*GitIdentityHandler, error)

NewGitIdentityHandler 创建 Git 身份认证处理器

func (*GitIdentityHandler) Add

Add 添加 Git 身份认证

@Summary		添加
@Description	添加 Git 身份认证
@Tags			【用户】git 身份管理
@Accept			json
@Produce		json
@Security		MonkeyCodeAIAuth
@Param			req	body		domain.AddGitIdentityReq			true	"添加 Git 身份认证请求"
@Success		200	{object}	web.Resp{data=domain.GitIdentity}	"成功"
@Failure		400	{object}	web.Resp							"请求参数错误"
@Failure		500	{object}	web.Resp							"服务器内部错误"
@Router			/api/v1/users/git-identities [post]

func (*GitIdentityHandler) Delete

Delete 删除 Git 身份认证

@Summary		删除
@Description	删除 Git 身份认证
@Tags			【用户】git 身份管理
@Accept			json
@Produce		json
@Security		MonkeyCodeAIAuth
@Param			id	path		string		true	"Git 身份认证ID"
@Success		200	{object}	web.Resp{}	"成功"
@Failure		400	{object}	web.Resp	"请求参数错误"
@Failure		404	{object}	web.Resp	"资源不存在"
@Failure		409	{object}	web.Resp	"该 Git 身份已被项目使用,无法删除"
@Failure		500	{object}	web.Resp	"服务器内部错误"
@Router			/api/v1/users/git-identities/{id} [delete]

func (*GitIdentityHandler) Get

Get 获取单个 Git 身份认证详情

@Summary		详情
@Description	获取单个 Git 身份认证详情
@Tags			【用户】git 身份管理
@Accept			json
@Produce		json
@Security		MonkeyCodeAIAuth
@Param			id		path		string								true	"Git 身份认证ID"
@Param			flush	query		bool								false	"是否刷新缓存"
@Param			page	query		int									false	"页码(>0 时启用分页,目前 GitHub/GitLab 支持)"
@Param			size	query		int									false	"每页数量(默认 20,上限 100)"
@Param			keyword	query		string								false	"按仓库名关键字过滤"
@Success		200		{object}	web.Resp{data=domain.GitIdentity}	"成功,分页时 data.repo_page_info 含 total_count/has_next_page"
@Failure		400		{object}	web.Resp							"请求参数错误"
@Failure		404		{object}	web.Resp							"资源不存在"
@Failure		500		{object}	web.Resp							"服务器内部错误"
@Router			/api/v1/users/git-identities/{id} [get]

func (*GitIdentityHandler) List

func (h *GitIdentityHandler) List(c *web.Context) error

List 获取当前用户的 Git 身份认证列表

@Summary		列表
@Description	获取当前用户的 Git 身份认证列表
@Tags			【用户】git 身份管理
@Accept			json
@Produce		json
@Security		MonkeyCodeAIAuth
@Success		200	{object}	web.Resp{data=[]domain.GitIdentity}	"成功"
@Failure		500	{object}	web.Resp							"服务器内部错误"
@Router			/api/v1/users/git-identities [get]

func (*GitIdentityHandler) ListBranches

func (h *GitIdentityHandler) ListBranches(c *web.Context, req domain.ListBranchesReq) error

ListBranches 获取仓库分支列表

@Summary		获取仓库分支列表
@Description	根据 Git 身份获取指定仓库的分支列表
@Tags			【用户】git 身份管理
@Accept			json
@Produce		json
@Security		MonkeyCodeAIAuth
@Param			identity_id				path		string							true	"Git 身份认证ID"
@Param			escaped_repo_full_name	path		string							true	"URL 编码的仓库全名 (owner%2Frepo)"
@Param			page					query		int								false	"页码(默认1)"
@Param			per_page				query		int								false	"每页数量(默认50,最大100)"
@Success		200						{object}	web.Resp{data=[]domain.Branch}	"成功"
@Failure		400						{object}	web.Resp						"请求参数错误"
@Failure		404						{object}	web.Resp						"资源不存在"
@Failure		500						{object}	web.Resp						"服务器内部错误"
@Router			/api/v1/users/git-identities/{identity_id}/{escaped_repo_full_name}/branches [get]

func (*GitIdentityHandler) Update

Update 更新 Git 身份认证

@Summary		更新
@Description	更新 Git 身份认证
@Tags			【用户】git 身份管理
@Accept			json
@Produce		json
@Security		MonkeyCodeAIAuth
@Param			id	path		string						true	"Git 身份认证ID"
@Param			req	body		domain.UpdateGitIdentityReq	true	"更新 Git 身份认证请求"
@Success		200	{object}	web.Resp{}					"成功"
@Failure		400	{object}	web.Resp					"请求参数错误"
@Failure		404	{object}	web.Resp					"资源不存在"
@Failure		500	{object}	web.Resp					"服务器内部错误"
@Router			/api/v1/users/git-identities/{id} [put]

type GiteaWebhookHandler

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

GiteaWebhookHandler Gitea Webhook 处理器

func NewGiteaWebhookHandler

func NewGiteaWebhookHandler(i *do.Injector) (*GiteaWebhookHandler, error)

NewGiteaWebhookHandler 创建 Gitea Webhook 处理器

func (*GiteaWebhookHandler) Webhook

func (h *GiteaWebhookHandler) Webhook(c *web.Context) error

Webhook 处理 Gitea Webhook 请求

type GiteeWebhookHandler

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

GiteeWebhookHandler Gitee Webhook 处理器

func NewGiteeWebhookHandler

func NewGiteeWebhookHandler(i *do.Injector) (*GiteeWebhookHandler, error)

NewGiteeWebhookHandler 创建 Gitee Webhook 处理器

func (*GiteeWebhookHandler) Webhook

func (h *GiteeWebhookHandler) Webhook(c *web.Context) error

Webhook 处理 Gitee Webhook 请求

type GithubWebhookHandler

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

GithubWebhookHandler GitHub Webhook 处理器

func NewGithubWebhookHandler

func NewGithubWebhookHandler(i *do.Injector) (*GithubWebhookHandler, error)

NewGithubWebhookHandler 创建 GitHub Webhook 处理器

func (*GithubWebhookHandler) Webhook

func (h *GithubWebhookHandler) Webhook(c *web.Context) error

Webhook 处理 GitHub Webhook 请求

type GitlabWebhookHandler

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

GitlabWebhookHandler GitLab Webhook 处理器

func NewGitlabWebhookHandler

func NewGitlabWebhookHandler(i *do.Injector) (*GitlabWebhookHandler, error)

NewGitlabWebhookHandler 创建 GitLab Webhook 处理器

func (*GitlabWebhookHandler) Webhook

func (h *GitlabWebhookHandler) Webhook(c *web.Context) error

Webhook 处理 GitLab Webhook 请求

Jump to

Keyboard shortcuts

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