Documentation ¶
Index ¶
- Constants
- type API
- type APIConfig
- type BranchAPI
- type CommitAPI
- type ConfigAPI
- type DeploymentAPI
- type DeploymentPostPayload
- type DeploymentStatusAPI
- type DeploymentStatusPostPayload
- type Interactor
- type LockAPI
- type LockPatchPayload
- type LockPostPayload
- type PermAPI
- type RepoAPI
- type RepoMiddleware
- type RepoPatchPayload
- type ReviewAPI
- type ReviewPatchPayload
- type TagAPI
Constants ¶
View Source
const (
KeyRepo = "gitploy.repo"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { // APIs used for talking to different parts of the entities. Repo *RepoAPI Commits *CommitAPI Branch *BranchAPI Tag *TagAPI Deployment *DeploymentAPI Config *ConfigAPI Review *ReviewAPI DeploymentStatus *DeploymentStatusAPI Lock *LockAPI Perm *PermAPI // contains filtered or unexported fields }
type APIConfig ¶
type APIConfig struct {
Interactor
}
type DeploymentAPI ¶
type DeploymentAPI service
func (*DeploymentAPI) Create ¶
func (s *DeploymentAPI) Create(c *gin.Context)
func (*DeploymentAPI) Get ¶
func (s *DeploymentAPI) Get(c *gin.Context)
func (*DeploymentAPI) List ¶
func (s *DeploymentAPI) List(c *gin.Context)
func (*DeploymentAPI) ListChanges ¶
func (s *DeploymentAPI) ListChanges(c *gin.Context)
func (*DeploymentAPI) Rollback ¶
func (s *DeploymentAPI) Rollback(c *gin.Context)
func (*DeploymentAPI) Update ¶
func (s *DeploymentAPI) Update(c *gin.Context)
UpdateDeployment trigger to request for a waiting deployment, and it patches the deployment status 'created'.
type DeploymentPostPayload ¶
type DeploymentStatusAPI ¶
type DeploymentStatusAPI service
func (*DeploymentStatusAPI) CreateRemote ¶
func (s *DeploymentStatusAPI) CreateRemote(c *gin.Context)
func (*DeploymentStatusAPI) List ¶
func (s *DeploymentStatusAPI) List(c *gin.Context)
type Interactor ¶
type Interactor interface { FindUserByID(ctx context.Context, id int64) (*ent.User, error) ListPermsOfRepo(ctx context.Context, r *ent.Repo, opt *i.ListPermsOfRepoOptions) ([]*ent.Perm, error) FindPermOfRepo(ctx context.Context, r *ent.Repo, u *ent.User) (*ent.Perm, error) ListReposOfUser(ctx context.Context, u *ent.User, opt *i.ListReposOfUserOptions) ([]*ent.Repo, error) FindRepoOfUserByID(ctx context.Context, u *ent.User, id int64) (*ent.Repo, error) FindRepoOfUserByNamespaceName(ctx context.Context, u *ent.User, opt *i.FindRepoOfUserByNamespaceNameOptions) (*ent.Repo, error) UpdateRepo(ctx context.Context, r *ent.Repo) (*ent.Repo, error) ActivateRepo(ctx context.Context, u *ent.User, r *ent.Repo) (*ent.Repo, error) DeactivateRepo(ctx context.Context, u *ent.User, r *ent.Repo) (*ent.Repo, error) ListDeploymentsOfRepo(ctx context.Context, r *ent.Repo, opt *i.ListDeploymentsOfRepoOptions) ([]*ent.Deployment, error) FindDeploymentByID(ctx context.Context, id int) (*ent.Deployment, error) FindDeploymentOfRepoByNumber(ctx context.Context, r *ent.Repo, number int) (*ent.Deployment, error) FindPrevSuccessDeployment(ctx context.Context, d *ent.Deployment) (*ent.Deployment, error) Deploy(ctx context.Context, u *ent.User, re *ent.Repo, d *ent.Deployment, env *extent.Env) (*ent.Deployment, error) DeployToRemote(ctx context.Context, u *ent.User, r *ent.Repo, d *ent.Deployment, env *extent.Env) (*ent.Deployment, error) GetConfig(ctx context.Context, u *ent.User, r *ent.Repo) (*extent.Config, error) GetEvaluatedConfig(ctx context.Context, u *ent.User, r *ent.Repo, v *extent.EvalValues) (*extent.Config, error) ListDeploymentStatuses(ctx context.Context, d *ent.Deployment) ([]*ent.DeploymentStatus, error) CreateRemoteDeploymentStatus(ctx context.Context, u *ent.User, r *ent.Repo, d *ent.Deployment, ds *extent.RemoteDeploymentStatus) (*extent.RemoteDeploymentStatus, error) ListReviews(ctx context.Context, d *ent.Deployment) ([]*ent.Review, error) FindReviewOfUser(ctx context.Context, u *ent.User, d *ent.Deployment) (*ent.Review, error) UpdateReview(ctx context.Context, rv *ent.Review) (*ent.Review, error) RespondReview(ctx context.Context, rv *ent.Review) (*ent.Review, error) ListLocksOfRepo(ctx context.Context, r *ent.Repo) ([]*ent.Lock, error) HasLockOfRepoForEnv(ctx context.Context, r *ent.Repo, env string) (bool, error) FindLockByID(ctx context.Context, id int) (*ent.Lock, error) CreateLock(ctx context.Context, l *ent.Lock) (*ent.Lock, error) UpdateLock(ctx context.Context, l *ent.Lock) (*ent.Lock, error) DeleteLock(ctx context.Context, l *ent.Lock) error ListCommits(ctx context.Context, u *ent.User, r *ent.Repo, branch string, opt *i.ListOptions) ([]*extent.Commit, error) CompareCommits(ctx context.Context, u *ent.User, r *ent.Repo, base, head string, opt *i.ListOptions) ([]*extent.Commit, []*extent.CommitFile, error) GetCommit(ctx context.Context, u *ent.User, r *ent.Repo, sha string) (*extent.Commit, error) ListCommitStatuses(ctx context.Context, u *ent.User, r *ent.Repo, sha string) ([]*extent.Status, error) ListBranches(ctx context.Context, u *ent.User, r *ent.Repo, opt *i.ListOptions) ([]*extent.Branch, error) GetBranch(ctx context.Context, u *ent.User, r *ent.Repo, branch string) (*extent.Branch, error) GetDefaultBranch(ctx context.Context, u *ent.User, r *ent.Repo) (*extent.Branch, error) ListTags(ctx context.Context, u *ent.User, r *ent.Repo, opt *i.ListOptions) ([]*extent.Tag, error) GetTag(ctx context.Context, u *ent.User, r *ent.Repo, tag string) (*extent.Tag, error) }
type LockPatchPayload ¶
type LockPatchPayload struct {
ExpiredAt *string `json:"expired_at,omitempty"`
}
type LockPostPayload ¶
type RepoMiddleware ¶
type RepoMiddleware struct {
// contains filtered or unexported fields
}
func NewRepoMiddleware ¶
func NewRepoMiddleware(i Interactor) *RepoMiddleware
func (*RepoMiddleware) RepoAdminPerm ¶
func (rm *RepoMiddleware) RepoAdminPerm() gin.HandlerFunc
func (*RepoMiddleware) RepoReadPerm ¶
func (rm *RepoMiddleware) RepoReadPerm() gin.HandlerFunc
func (*RepoMiddleware) RepoWritePerm ¶
func (rm *RepoMiddleware) RepoWritePerm() gin.HandlerFunc
type RepoPatchPayload ¶
type ReviewPatchPayload ¶
Source Files ¶
- api.go
- branch.go
- branch_get.go
- branch_list.go
- commit.go
- commit_get.go
- commit_list.go
- commit_status_list.go
- config.go
- config_get.go
- deployment.go
- deployment_change.go
- deployment_create.go
- deployment_get.go
- deployment_list.go
- deployment_rollback.go
- deployment_status.go
- deployment_status_create.go
- deployment_status_list.go
- deployment_update.go
- interface.go
- lock.go
- lock_create.go
- lock_delete.go
- lock_list.go
- lock_update.go
- middleware.go
- perm.go
- perm_list.go
- repo.go
- repo_get.go
- repo_list.go
- repo_update.go
- review.go
- review_get.go
- review_list.go
- review_update.go
- shared.go
- tag.go
- tag_get.go
- tag_list.go
Click to show internal directories.
Click to hide internal directories.