common

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildCheckLoop

func BuildCheckLoop(ctx *command.Context, pipelineID uint64) error

BuildCheckLoop checks build status in a loop while interactive is true

func ConstructURL

func ConstructURL(ctx *command.Context, entity ErdaEntity, params url.Values) (string, error)

func CreateApplication

func CreateApplication(ctx *command.Context, orgID, projectID uint64, application, mode, desc,
	sonarhost, sonartoken, sonarproject string) (apistructs.ApplicationDTO, error)

func CreateIssueComment

func CreateIssueComment(ctx *command.Context, orgID uint64, request *pb.CommentIssueStreamBatchCreateRequest) error

func CreateMSPProject

func CreateMSPProject(ctx *command.Context, projectID uint64, name string) (*pb.Project, error)

func CreateMr

func CreateMr(ctx *command.Context, orgID uint64, project, application string, request *apistructs.GittarCreateMergeRequest) (*apistructs.MergeRequestInfo, error)

func CreateProject

func CreateProject(ctx *command.Context, orgID uint64, name, desc string,
	resourceConfigs *apistructs.ResourceConfigs) (uint64, error)

func DelelteProjectWorkspaceConfigs

func DelelteProjectWorkspaceConfigs(ctx *command.Context, org, project, workspace string) error

func DeleteApplication

func DeleteApplication(ctx *command.Context, applicationID uint64) error

func GetApplicationDetail

func GetApplicationDetail(ctx *command.Context, orgID, projectID, applicationID uint64) (
	apistructs.ApplicationDTO, error)

func GetApplicationID

func GetApplicationID(ctx *command.Context, orgID, projectID uint64, application string) (string, uint64, error)

func GetApplicationIdByName

func GetApplicationIdByName(ctx *command.Context, orgID, projectID uint64, application string) (uint64, error)

func GetApplications

func GetApplications(ctx *command.Context, orgID, projectID uint64) ([]apistructs.ApplicationDTO, error)

func GetIssue

func GetIssue(ctx *command.Context, orgID, projectID, issueID uint64) (*apistructs.Issue, error)

func GetMergeState

func GetMergeState()

func GetMyApplications

func GetMyApplications(ctx *command.Context, orgID, projectID uint64) ([]apistructs.ApplicationDTO, error)

func GetOrgDetail

func GetOrgDetail(ctx *command.Context, orgIDorName string) (apistructs.OrgDTO, error)

func GetOrgID

func GetOrgID(ctx *command.Context, org string) (string, uint64, error)

func GetPagingApplications

func GetPagingApplications(ctx *command.Context, orgID, projectID uint64, pageNo, pageSize int) (apistructs.ApplicationListResponseData, error)

func GetPagingMyApplications

func GetPagingMyApplications(ctx *command.Context, orgID, projectID uint64, pageNo, pageSize int) (apistructs.ApplicationListResponseData, error)

func GetPagingProjects

func GetPagingProjects(ctx *command.Context, orgId uint64, pageNo, pageSize int) (apistructs.PagingProjectDTO, error)

func GetPipeline

func GetPipeline(ctx *command.Context, pipelineID uint64) (pipelinepb.PipelineDetailDTO, error)

func GetProjectByName

func GetProjectByName(ctx *command.Context, orgId uint64, project string) (apistructs.ProjectDTO, error)

func GetProjectDetail

func GetProjectDetail(ctx *command.Context, orgID, projectID uint64) (apistructs.ProjectDTO, error)

func GetProjectID

func GetProjectID(ctx *command.Context, orgID uint64, project string) (string, uint64, error)

func GetProjectIDByName

func GetProjectIDByName(ctx *command.Context, orgId uint64, project string) (uint64, error)

func GetProjectWorkspaceConfigs

func GetProjectWorkspaceConfigs(ctx *command.Context, org, project, workspace string) error

GetProjectWorkspaceConfigs 获取指定项目的指定环境支持的 features

func GetProjects

func GetProjects(ctx *command.Context, orgId uint64) ([]apistructs.ProjectDTO, error)

func GetRecord

func GetRecord(ctx *command.Context, orgID, id uint64) (apistructs.TestFileRecord, error)

func GetRepoStats

func GetRepoStats(ctx *command.Context, orgID uint64, project, application string) (apistructs.GittarStatsData, error)

func GetTodoStateIds

func GetTodoStateIds(states []apistructs.IssueStateRelation) ([]int64, error)

func ImportPackage

func ImportPackage(ctx *command.Context, orgID, projectID uint64, pkg string) (uint64, error)

func ListMyProjectInOrg

func ListMyProjectInOrg(ctx *command.Context, orgId string, projectName string) ([]apistructs.ProjectDTO, error)

ListMyProjectInOrg 获取指定组织下的我的项目列表

func Open

func Open(ctx *command.Context, entity ErdaEntity, params url.Values) error

func ParseProjectWorkspaceConfigs

func ParseProjectWorkspaceConfigs(featureList string) (string, error)

ParseProjectWorkspaceConfigs 解析 project workspace 的 feature list

func PushApplication

func PushApplication(dir, repo string, force bool) error

func SetProjectWorkspaceConfigs

func SetProjectWorkspaceConfigs(ctx *command.Context, feature, orgName, projectName, workspace string) error

SetProjectWorkspaceConfigss 为指定项目的指定环境设置 features

func UpdateIssue

func UpdateIssue(ctx *command.Context, orgID uint64, request *apistructs.IssueUpdateRequest) error

func UpdateProjectWorkspaceConfigs

func UpdateProjectWorkspaceConfigs(ctx *command.Context, feature, org, project, workspace string) error

UpdateProjectWorkspaceConfigs 为指定项目的指定环境更新 features

Types

type EntityType

type EntityType string
var (
	OrgEntity        EntityType = "org"
	ProjectEntity    EntityType = "project"
	AppEntity        EntityType = "app"
	ReleaseEntity    EntityType = "release"
	IssueEntity      EntityType = "issue"
	MrEntity         EntityType = "mr"
	MrCompaireEntity EntityType = "mr-compare"
	GittarBranch     EntityType = "gittar-branch"
)

type ErdaEntity

type ErdaEntity struct {
	Type           EntityType
	Org            string
	OrgID          uint64
	ProjectID      uint64
	ApplicationID  uint64
	IssueID        uint64
	MergeRequestID uint64
	GittarBranch   string
}

type UserOrgProj

type UserOrgProj struct {
	UserId    string
	OrgId     string
	ProjectId string
}

func GetUserOrgProjID

func GetUserOrgProjID(ctx *command.Context, orgName, projectName string) (UserOrgProj, error)

GetUserOrgProjID get UserId,ProjectId,OrgID info

Jump to

Keyboard shortcuts

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