Documentation
¶
Index ¶
- func NewScmProvider(vcsType, vcsPath, token string) (*scm.Client, error)
- type AppArrangConfig
- type AppArrangeReq
- type AppArrangeResp
- type AppManager
- func (manager *AppManager) AppBranches(appID int64, filter *query.FilterQuery) (*query.QueryResult, error)
- func (manager *AppManager) CreateSCMApp(item *ScmAppReq, creator string) (int64, error)
- func (manager *AppManager) DeleteSCMApp(scmAppID int64) error
- func (manager *AppManager) GetArrange(ProjectAppID, envID int64) (*AppArrangeResp, error)
- func (manager *AppManager) GetRealArrange(appID, envID int64) (*models.AppArrange, error)
- func (manager *AppManager) GetScmApp(appID int64) (*SCMAppRsp, error)
- func (manager *AppManager) GetScmApps() ([]*models.ScmApp, error)
- func (manager *AppManager) GetScmAppsByPagination(filter *query.FilterQuery) (*query.QueryResult, error)
- func (manager *AppManager) GetScmProjectsByRepoID(repoID int64) (interface{}, error)
- func (manager *AppManager) SetArrange(projectAppID int64, arrangeEnvID int64, request *AppArrangeReq) error
- func (manager *AppManager) SyncAppBranches(appID int64) error
- func (manager *AppManager) UpdateProjectApp(scmAppID int64, req *ScmAppUpdateReq) error
- func (manager *AppManager) VerifyAppConnetion(repoID int64, url string, repo string) error
- func (manager *AppManager) VerifyRepoConnetion(scmType string, url string, token string) error
- type ImageMaping
- type RepoProjectRsp
- type SCMAppRsp
- type ScmAppReq
- type ScmAppUpdateReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppArrangConfig ¶
type AppArrangConfig struct {
Config string `json:"config,omitempty"`
}
type AppArrangeReq ¶
type AppArrangeReq struct {
ProjectAppID int64 `json:"project_app_id,omitempty"`
CopyToEnvIDs []int64 `json:"copy_to_env_ids,omitempty"`
Config string `json:"config,omitempty"`
ImageMapings []ImageMaping `json:"image_mapings,omitempty"`
}
AppArrangeReq ..
type AppArrangeResp ¶
type AppManager ¶
type AppManager struct {
// contains filtered or unexported fields
}
AppManager ...
func (*AppManager) AppBranches ¶
func (manager *AppManager) AppBranches(appID int64, filter *query.FilterQuery) (*query.QueryResult, error)
AppBranches ...
func (*AppManager) CreateSCMApp ¶ added in v1.5.0
func (manager *AppManager) CreateSCMApp(item *ScmAppReq, creator string) (int64, error)
CreateSCMApp ...
func (*AppManager) DeleteSCMApp ¶ added in v1.5.0
func (manager *AppManager) DeleteSCMApp(scmAppID int64) error
func (*AppManager) GetArrange ¶
func (manager *AppManager) GetArrange(ProjectAppID, envID int64) (*AppArrangeResp, error)
GetArrange ...
func (*AppManager) GetRealArrange ¶
func (manager *AppManager) GetRealArrange(appID, envID int64) (*models.AppArrange, error)
GetRealArrange do not return template
func (*AppManager) GetScmApp ¶ added in v1.5.0
func (manager *AppManager) GetScmApp(appID int64) (*SCMAppRsp, error)
func (*AppManager) GetScmApps ¶ added in v1.5.0
func (manager *AppManager) GetScmApps() ([]*models.ScmApp, error)
GetProjectAppsByPagination ..
func (*AppManager) GetScmAppsByPagination ¶ added in v1.5.0
func (manager *AppManager) GetScmAppsByPagination(filter *query.FilterQuery) (*query.QueryResult, error)
GetProjectAppsByPagination ..
func (*AppManager) GetScmProjectsByRepoID ¶ added in v1.5.0
func (manager *AppManager) GetScmProjectsByRepoID(repoID int64) (interface{}, error)
GetScmProjectsByRepoID ..
func (*AppManager) SetArrange ¶
func (manager *AppManager) SetArrange( projectAppID int64, arrangeEnvID int64, request *AppArrangeReq, ) error
SetArrange ...
func (*AppManager) SyncAppBranches ¶
func (manager *AppManager) SyncAppBranches(appID int64) error
SyncAppBranches ...
func (*AppManager) UpdateProjectApp ¶ added in v1.5.0
func (manager *AppManager) UpdateProjectApp(scmAppID int64, req *ScmAppUpdateReq) error
UpdateProjectApp ..
func (*AppManager) VerifyAppConnetion ¶ added in v1.5.1
func (manager *AppManager) VerifyAppConnetion(repoID int64, url string, repo string) error
验证仓库地址是否能正常连通,方式通过获取代码分支,若能正常获取,则表示通过
func (*AppManager) VerifyRepoConnetion ¶ added in v1.5.1
func (manager *AppManager) VerifyRepoConnetion(scmType string, url string, token string) error
验证仓库源是否能正常连通,若无token,只要地址能通就行;若有token,则必须认证通过
type ImageMaping ¶
type RepoProjectRsp ¶
type RepoProjectRsp struct {
RepoID int64 `json:"repo_id"`
Path string `json:"path"`
FullName string `json:"full_name"`
Name string `json:"name"`
}
RepoProjectRsp ..
type SCMAppRsp ¶ added in v1.5.0
type SCMAppRsp struct {
*models.ScmApp
BranchHistoryList []string `json:"branch_history_list,omitempty"`
CompileEnv string `json:"compile_env"`
}
SCMAppRsp ..
type ScmAppReq ¶ added in v1.5.0
type ScmAppReq struct {
// ProjectAppReq add app into project request body.
Name string `json:"name"`
CompileEnvID int64 `json:"compile_env_id"`
Language string `json:"language"`
Path string `json:"path"`
RepoID int64 `json:"repo_id"`
FullName string `json:"full_name"`
BranchName string `json:"branch_name"`
BuildPath string `json:"build_path"`
Dockerfile string `json:"dockerfile"`
}
type ScmAppUpdateReq ¶ added in v1.5.0
Click to show internal directories.
Click to hide internal directories.