apps

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewScmProvider

func NewScmProvider(vcsType, vcsPath, token string) (*scm.Client, error)

NewScmProvider ..

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 AppArrangeResp struct {
	ID           int64         `json:"id,omitempty"`
	Name         string        `json:"name,omitempty"`
	EnvID        int64         `json:"env_id,omitempty"`
	ProjectAppID int64         `json:"project_app_id,omitempty"`
	Config       string        `json:"config,omitempty"`
	ImageMapings []ImageMaping `json:"image_mapings,omitempty"`
}

type AppManager

type AppManager struct {
	// contains filtered or unexported fields
}

AppManager ...

func NewAppManager

func NewAppManager() *AppManager

NewAppManager ...

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 ..

type ImageMaping

type ImageMaping struct {
	ID           int64  `json:"id,omitempty"`
	Name         string `json:"name,omitempty"`
	Image        string `json:"image,omitempty"`
	ProjectAppID int64  `json:"project_app_id,omitempty"`
	ImageTagType int64  `json:"image_tag_type,omitempty"`
	ArrangeID    int64  `json:"arrange_id,omitempty"`
}

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

type ScmAppUpdateReq struct {
	BranchName   string `json:"branch_name"`
	Language     string `json:"language"`
	Name         string `json:"name"`
	Path         string `json:"path"`
	CompileEnvID int64  `json:"compile_env_id"`
	BuildPath    string `json:"build_path"`
	Dockerfile   string `json:"dockerfile"`
}

Jump to

Keyboard shortcuts

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