|
6 | 6 | "context" |
7 | 7 | "time" |
8 | 8 |
|
9 | | - "github.com/gitploy-io/gitploy/ent" |
10 | | - "github.com/gitploy-io/gitploy/ent/deployment" |
11 | | - "github.com/gitploy-io/gitploy/vo" |
| 9 | + "github.com/gitploy-io/gitploy/model/ent" |
| 10 | + "github.com/gitploy-io/gitploy/model/ent/deployment" |
| 11 | + "github.com/gitploy-io/gitploy/model/extent" |
12 | 12 | ) |
13 | 13 |
|
14 | 14 | type ( |
|
33 | 33 | FindRepoOfUserByID(ctx context.Context, u *ent.User, id int64) (*ent.Repo, error) |
34 | 34 | FindRepoOfUserByNamespaceName(ctx context.Context, u *ent.User, namespace, name string) (*ent.Repo, error) |
35 | 35 | FindRepoByID(ctx context.Context, id int64) (*ent.Repo, error) |
36 | | - SyncRepo(ctx context.Context, r *vo.RemoteRepo) (*ent.Repo, error) |
| 36 | + SyncRepo(ctx context.Context, r *extent.RemoteRepo) (*ent.Repo, error) |
37 | 37 | UpdateRepo(ctx context.Context, r *ent.Repo) (*ent.Repo, error) |
38 | 38 | Activate(ctx context.Context, r *ent.Repo) (*ent.Repo, error) |
39 | 39 | Deactivate(ctx context.Context, r *ent.Repo) (*ent.Repo, error) |
@@ -91,30 +91,30 @@ type ( |
91 | 91 | } |
92 | 92 |
|
93 | 93 | SCM interface { |
94 | | - GetRemoteUserByToken(ctx context.Context, token string) (*vo.RemoteUser, error) |
| 94 | + GetRemoteUserByToken(ctx context.Context, token string) (*extent.RemoteUser, error) |
95 | 95 | ListRemoteOrgsByToken(ctx context.Context, token string) ([]string, error) |
96 | 96 |
|
97 | | - ListRemoteRepos(ctx context.Context, u *ent.User) ([]*vo.RemoteRepo, error) |
| 97 | + ListRemoteRepos(ctx context.Context, u *ent.User) ([]*extent.RemoteRepo, error) |
98 | 98 |
|
99 | 99 | // SCM returns the deployment with UID and SHA. |
100 | | - CreateRemoteDeployment(ctx context.Context, u *ent.User, r *ent.Repo, d *ent.Deployment, e *vo.Env) (*vo.RemoteDeployment, error) |
| 100 | + CreateRemoteDeployment(ctx context.Context, u *ent.User, r *ent.Repo, d *ent.Deployment, e *extent.Env) (*extent.RemoteDeployment, error) |
101 | 101 | CancelDeployment(ctx context.Context, u *ent.User, r *ent.Repo, d *ent.Deployment, s *ent.DeploymentStatus) error |
102 | | - GetConfig(ctx context.Context, u *ent.User, r *ent.Repo) (*vo.Config, error) |
| 102 | + GetConfig(ctx context.Context, u *ent.User, r *ent.Repo) (*extent.Config, error) |
103 | 103 |
|
104 | | - CreateWebhook(ctx context.Context, u *ent.User, r *ent.Repo, c *vo.WebhookConfig) (int64, error) |
| 104 | + CreateWebhook(ctx context.Context, u *ent.User, r *ent.Repo, c *extent.WebhookConfig) (int64, error) |
105 | 105 | DeleteWebhook(ctx context.Context, u *ent.User, r *ent.Repo, id int64) error |
106 | 106 |
|
107 | | - ListCommits(ctx context.Context, u *ent.User, r *ent.Repo, branch string, page, perPage int) ([]*vo.Commit, error) |
108 | | - CompareCommits(ctx context.Context, u *ent.User, r *ent.Repo, base, head string, page, perPage int) ([]*vo.Commit, []*vo.CommitFile, error) |
109 | | - GetCommit(ctx context.Context, u *ent.User, r *ent.Repo, sha string) (*vo.Commit, error) |
110 | | - ListCommitStatuses(ctx context.Context, u *ent.User, r *ent.Repo, sha string) ([]*vo.Status, error) |
| 107 | + ListCommits(ctx context.Context, u *ent.User, r *ent.Repo, branch string, page, perPage int) ([]*extent.Commit, error) |
| 108 | + CompareCommits(ctx context.Context, u *ent.User, r *ent.Repo, base, head string, page, perPage int) ([]*extent.Commit, []*extent.CommitFile, error) |
| 109 | + GetCommit(ctx context.Context, u *ent.User, r *ent.Repo, sha string) (*extent.Commit, error) |
| 110 | + ListCommitStatuses(ctx context.Context, u *ent.User, r *ent.Repo, sha string) ([]*extent.Status, error) |
111 | 111 |
|
112 | | - ListBranches(ctx context.Context, u *ent.User, r *ent.Repo, page, perPage int) ([]*vo.Branch, error) |
113 | | - GetBranch(ctx context.Context, u *ent.User, r *ent.Repo, branch string) (*vo.Branch, error) |
| 112 | + ListBranches(ctx context.Context, u *ent.User, r *ent.Repo, page, perPage int) ([]*extent.Branch, error) |
| 113 | + GetBranch(ctx context.Context, u *ent.User, r *ent.Repo, branch string) (*extent.Branch, error) |
114 | 114 |
|
115 | | - ListTags(ctx context.Context, u *ent.User, r *ent.Repo, page, perPage int) ([]*vo.Tag, error) |
116 | | - GetTag(ctx context.Context, u *ent.User, r *ent.Repo, tag string) (*vo.Tag, error) |
| 115 | + ListTags(ctx context.Context, u *ent.User, r *ent.Repo, page, perPage int) ([]*extent.Tag, error) |
| 116 | + GetTag(ctx context.Context, u *ent.User, r *ent.Repo, tag string) (*extent.Tag, error) |
117 | 117 |
|
118 | | - GetRateLimit(ctx context.Context, u *ent.User) (*vo.RateLimit, error) |
| 118 | + GetRateLimit(ctx context.Context, u *ent.User) (*extent.RateLimit, error) |
119 | 119 | } |
120 | 120 | ) |
0 commit comments