converter

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PageToOffset

func PageToOffset(page, pageSize int32) (int, int)

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 ToRepoInfo

func ToRepoInfo(r *model.Repo) *repomodel.RepoInfo

func ToRepoInfoList

func ToRepoInfoList(repos []*model.Repo) []*repomodel.RepoInfo

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.

Jump to

Keyboard shortcuts

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