Documentation
¶
Index ¶
- func ApplyPlatformUpdate(p *model.Platform, req *platformmodel.UpdatePlatformReq)
- func PageToOffset(page, pageSize int32) (int, int)
- func ToEventInfo(e *model.WebhookEvent) *webhookmodel.WebhookEventInfo
- func ToEventInfoList(events []*model.WebhookEvent) []*webhookmodel.WebhookEventInfo
- func ToOperationLogInfo(l *model.OperationLog) *olmodel.OperationLogInfo
- func ToOperationLogList(logs []*model.OperationLog) []*olmodel.OperationLogInfo
- func ToPlatformInfo(p *model.Platform) *platformmodel.PlatformInfo
- func ToPlatformList(platforms []*model.Platform) []*platformmodel.PlatformInfo
- func ToRepoInfo(r *model.Repo) *repomodel.RepoInfo
- func ToRepoInfoList(repos []*model.Repo) []*repomodel.RepoInfo
- func ToRuleInfo(r *model.WebhookRule) *webhookmodel.WebhookRuleInfo
- func ToRuleInfoList(rules []*model.WebhookRule) []*webhookmodel.WebhookRuleInfo
- func ToSyncRunInfo(r *model.SyncRun) *taskmodel.SyncRunInfo
- func ToSyncRunInfoList(runs []*model.SyncRun) []*taskmodel.SyncRunInfo
- func ToSyncRunStepInfo(s *model.SyncRunStep) *taskmodel.SyncRunStepInfo
- func ToSyncRunStepInfoList(steps []*model.SyncRunStep) []*taskmodel.SyncRunStepInfo
- func ToTaskInfo(t *model.SyncTask) *taskmodel.SyncTaskInfo
- func ToTaskInfoList(tasks []*model.SyncTask) []*taskmodel.SyncTaskInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyPlatformUpdate ¶ added in v1.6.0
func ApplyPlatformUpdate(p *model.Platform, req *platformmodel.UpdatePlatformReq)
ApplyPlatformUpdate 将更新请求中的非空字段合并进平台模型(空值表示不更新)。
func PageToOffset ¶
func ToEventInfo ¶
func ToEventInfo(e *model.WebhookEvent) *webhookmodel.WebhookEventInfo
func ToEventInfoList ¶
func ToEventInfoList(events []*model.WebhookEvent) []*webhookmodel.WebhookEventInfo
func ToOperationLogInfo ¶
func ToOperationLogInfo(l *model.OperationLog) *olmodel.OperationLogInfo
ToOperationLogInfo 将审计日志模型转为 IDL 生成的对外结构 olmodel.OperationLogInfo。
func ToOperationLogList ¶
func ToOperationLogList(logs []*model.OperationLog) []*olmodel.OperationLogInfo
ToOperationLogList 批量转换审计日志。
func ToPlatformInfo ¶
func ToPlatformInfo(p *model.Platform) *platformmodel.PlatformInfo
ToPlatformInfo 将平台模型转为 IDL 生成的对外结构 platformmodel.PlatformInfo。 日期按 RFC3339 格式化,与 model.Platform(time.Time 默认 JSON)保持一致。
func ToPlatformList ¶
func ToPlatformList(platforms []*model.Platform) []*platformmodel.PlatformInfo
ToPlatformList 批量转换平台。
func ToRuleInfo ¶
func ToRuleInfo(r *model.WebhookRule) *webhookmodel.WebhookRuleInfo
func ToRuleInfoList ¶
func ToRuleInfoList(rules []*model.WebhookRule) []*webhookmodel.WebhookRuleInfo
func ToSyncRunInfo ¶
func ToSyncRunInfo(r *model.SyncRun) *taskmodel.SyncRunInfo
func ToSyncRunInfoList ¶
func ToSyncRunInfoList(runs []*model.SyncRun) []*taskmodel.SyncRunInfo
func ToSyncRunStepInfo ¶
func ToSyncRunStepInfo(s *model.SyncRunStep) *taskmodel.SyncRunStepInfo
func ToSyncRunStepInfoList ¶
func ToSyncRunStepInfoList(steps []*model.SyncRunStep) []*taskmodel.SyncRunStepInfo
func ToTaskInfo ¶
func ToTaskInfo(t *model.SyncTask) *taskmodel.SyncTaskInfo
func ToTaskInfoList ¶
func ToTaskInfoList(tasks []*model.SyncTask) []*taskmodel.SyncTaskInfo
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.