Documentation
¶
Index ¶
Constants ¶
View Source
const ( RemoteOrigin = "origin" RemoteTarget = "target" )
Git remote name constants
View Source
const (
RepoDir = "repo"
)
Work directory subdirectory name
Variables ¶
This section is empty.
Functions ¶
func ClassifyError ¶
ClassifyError categorizes an error into one of the predefined error types. 优先识别 SDK 结构化错误(provider HTTP 层),再回落到 git 操作关键词匹配。
Types ¶
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
func NewExecutor ¶
type PlatformProvider ¶
type PlatformProvider interface {
GetPlatformByID(ctx context.Context, id uint) (*model.Platform, error)
}
PlatformProvider provides platform lookup by ID.
type RepoProvider ¶
RepoProvider provides repository lookup by key.
type RunManager ¶
type RunManager interface {
CreateRun(task *model.SyncTask, trigger string, webhookEventID *uint) (*model.SyncRun, error)
CreateRunStep(step *model.SyncRunStep) error
UpdateRunStep(step *model.SyncRunStep) error
CompleteRun(run *model.SyncRun) error
UpdateTaskLastRun(task *model.SyncTask, run *model.SyncRun) error
CompleteRunWithTaskUpdate(run *model.SyncRun, task *model.SyncTask) error
}
RunManager handles sync run lifecycle operations.
type S3Config ¶ added in v0.5.0
type S3Config struct {
Endpoint string `yaml:"endpoint"` // https://s3.amazonaws.com 或 https://oss-cn-hangzhou.aliyuncs.com
Region string `yaml:"region"` // us-east-1 等
Bucket string `yaml:"bucket"`
Prefix string `yaml:"prefix"` // 对象 key 前缀
AccessKey string `yaml:"access_key"`
SecretKey string `yaml:"secret_key"`
// PathStyle true=MinIO/部分兼容端点
PathStyle bool `yaml:"path_style"`
}
S3Config S3 兼容对象存储(阿里云 OSS/MinIO/AWS)。
type Service ¶
type Service interface {
GetTempDir(taskKey string) string
GetConfig() *model.Config
RunManager
RepoProvider
PlatformProvider
}
Service is the interface the executor depends on. It exposes only the operations the executor needs — no DAO leakage.
Click to show internal directories.
Click to hide internal directories.