fake

package
v0.0.0-...-be065d1 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Devops

type Devops struct {
	Data map[string]interface{}

	Projects map[string]interface{}

	Pipelines map[string]map[string]*devopsv1alpha3.Pipeline

	Credentials map[string]map[string]*v1.Secret
}

func New

func New(projects ...string) *Devops

func NewFakeDevops

func NewFakeDevops(data map[string]interface{}) *Devops

func NewWithCredentials

func NewWithCredentials(project string, credentials ...*v1.Secret) *Devops

func NewWithPipelines

func NewWithPipelines(project string, pipelines ...*devopsv1alpha3.Pipeline) *Devops

func (*Devops) AddGlobalRole

func (d *Devops) AddGlobalRole(roleName string, ids devops.GlobalPermissionIds, overwrite bool) error

func (*Devops) AddProjectRole

func (d *Devops) AddProjectRole(roleName string, pattern string, ids devops.ProjectPermissionIds, overwrite bool) error

func (*Devops) AssignGlobalRole

func (d *Devops) AssignGlobalRole(roleName string, sid string) error

func (*Devops) AssignProjectRole

func (d *Devops) AssignProjectRole(roleName string, sid string) error

func (*Devops) CheckCron

func (d *Devops) CheckCron(projectName string, httpParameters *devops.HttpParameters) (*devops.CheckCronRes, error)

func (*Devops) CheckScriptCompile

func (d *Devops) CheckScriptCompile(projectName, pipelineName string, httpParameters *devops.HttpParameters) (*devops.CheckScript, error)

func (*Devops) CreateCredentialInProject

func (d *Devops) CreateCredentialInProject(projectId string, credential *v1.Secret) (string, error)

CredentialOperator

func (*Devops) CreateDevOpsProject

func (d *Devops) CreateDevOpsProject(projectId string) (string, error)

func (*Devops) CreateProjectPipeline

func (d *Devops) CreateProjectPipeline(projectId string, pipeline *devopsv1alpha3.Pipeline) (string, error)

ProjectPipelineOperator

func (*Devops) CreateSCMServers

func (d *Devops) CreateSCMServers(scmId string, httpParameters *devops.HttpParameters) (*devops.SCMServer, error)

func (*Devops) DeleteCredentialInProject

func (d *Devops) DeleteCredentialInProject(projectId, id string) (string, error)

func (*Devops) DeleteDevOpsProject

func (d *Devops) DeleteDevOpsProject(projectId string) error

func (*Devops) DeleteProjectPipeline

func (d *Devops) DeleteProjectPipeline(projectId string, pipelineId string) (string, error)

func (*Devops) DeleteProjectRoles

func (d *Devops) DeleteProjectRoles(roleName ...string) error

func (*Devops) DeleteUserInProject

func (d *Devops) DeleteUserInProject(sid string) error

func (*Devops) GetArtifacts

func (d *Devops) GetArtifacts(projectName, pipelineName, runId string, httpParameters *devops.HttpParameters) ([]devops.Artifacts, error)

func (*Devops) GetBranchArtifacts

func (d *Devops) GetBranchArtifacts(projectName, pipelineName, branchName, runId string, httpParameters *devops.HttpParameters) ([]devops.Artifacts, error)

func (*Devops) GetBranchNodeSteps

func (d *Devops) GetBranchNodeSteps(projectName, pipelineName, branchName, runId, nodeId string, httpParameters *devops.HttpParameters) ([]devops.NodeSteps, error)

func (*Devops) GetBranchPipeline

func (d *Devops) GetBranchPipeline(projectName, pipelineName, branchName string, httpParameters *devops.HttpParameters) (*devops.BranchPipeline, error)

BranchPipelinne operator interface

func (*Devops) GetBranchPipelineRun

func (d *Devops) GetBranchPipelineRun(projectName, pipelineName, branchName, runId string, httpParameters *devops.HttpParameters) (*devops.PipelineRun, error)

func (*Devops) GetBranchPipelineRunNodes

func (d *Devops) GetBranchPipelineRunNodes(projectName, pipelineName, branchName, runId string, httpParameters *devops.HttpParameters) ([]devops.BranchPipelineRunNodes, error)

func (*Devops) GetBranchRunLog

func (d *Devops) GetBranchRunLog(projectName, pipelineName, branchName, runId string, httpParameters *devops.HttpParameters) ([]byte, error)

func (*Devops) GetBranchStepLog

func (d *Devops) GetBranchStepLog(projectName, pipelineName, branchName, runId, nodeId, stepId string, httpParameters *devops.HttpParameters) ([]byte, http.Header, error)

func (*Devops) GetConsoleLog

func (d *Devops) GetConsoleLog(projectName, pipelineName string, httpParameters *devops.HttpParameters) ([]byte, error)

Common pipeline operator interface

func (*Devops) GetCredentialInProject

func (d *Devops) GetCredentialInProject(projectId, id string) (*devops.Credential, error)

func (*Devops) GetCredentialsInProject

func (d *Devops) GetCredentialsInProject(projectId string) ([]*devops.Credential, error)

func (*Devops) GetCrumb

func (d *Devops) GetCrumb(httpParameters *devops.HttpParameters) (*devops.Crumb, error)

func (*Devops) GetDevOpsProject

func (d *Devops) GetDevOpsProject(projectId string) (string, error)

func (*Devops) GetGlobalRole

func (d *Devops) GetGlobalRole(roleName string) (string, error)

func (*Devops) GetMultiBranchPipelineBuildByType

func (d *Devops) GetMultiBranchPipelineBuildByType(projectId, pipelineId, branch string, status string) (*devops.Build, error)

func (*Devops) GetNodeSteps

func (d *Devops) GetNodeSteps(projectName, pipelineName, runId, nodeId string, httpParameters *devops.HttpParameters) ([]devops.NodeSteps, error)

func (*Devops) GetNotifyCommit

func (d *Devops) GetNotifyCommit(httpParameters *devops.HttpParameters) ([]byte, error)

Webhook operator interface

func (*Devops) GetOrgRepo

func (d *Devops) GetOrgRepo(scmId, organizationId string, httpParameters *devops.HttpParameters) (devops.OrgRepo, error)

func (*Devops) GetPipeline

func (d *Devops) GetPipeline(projectName, pipelineName string, httpParameters *devops.HttpParameters) (*devops.Pipeline, error)

Pipelinne operator interface

func (*Devops) GetPipelineBranch

func (d *Devops) GetPipelineBranch(projectName, pipelineName string, httpParameters *devops.HttpParameters) (*devops.PipelineBranch, error)

func (*Devops) GetPipelineRun

func (d *Devops) GetPipelineRun(projectName, pipelineName, runId string, httpParameters *devops.HttpParameters) (*devops.PipelineRun, error)

func (*Devops) GetPipelineRunNodes

func (d *Devops) GetPipelineRunNodes(projectName, pipelineName, runId string, httpParameters *devops.HttpParameters) ([]devops.PipelineRunNodes, error)

func (*Devops) GetProjectPipelineBuildByType

func (d *Devops) GetProjectPipelineBuildByType(projectId, pipelineId string, status string) (*devops.Build, error)

BuildGetter

func (*Devops) GetProjectPipelineConfig

func (d *Devops) GetProjectPipelineConfig(projectId, pipelineId string) (*devopsv1alpha3.Pipeline, error)

func (*Devops) GetRunLog

func (d *Devops) GetRunLog(projectName, pipelineName, runId string, httpParameters *devops.HttpParameters) ([]byte, error)

func (*Devops) GetSCMOrg

func (d *Devops) GetSCMOrg(scmId string, httpParameters *devops.HttpParameters) ([]devops.SCMOrg, error)

func (*Devops) GetSCMServers

func (d *Devops) GetSCMServers(scmId string, httpParameters *devops.HttpParameters) ([]devops.SCMServer, error)

SCM operator interface

func (*Devops) GetStepLog

func (d *Devops) GetStepLog(projectName, pipelineName, runId, nodeId, stepId string, httpParameters *devops.HttpParameters) ([]byte, http.Header, error)

func (*Devops) GithubWebhook

func (d *Devops) GithubWebhook(httpParameters *devops.HttpParameters) ([]byte, error)

func (*Devops) ListPipelineRuns

func (d *Devops) ListPipelineRuns(projectName, pipelineName string, httpParameters *devops.HttpParameters) (*devops.PipelineRunList, error)

func (*Devops) ListPipelines

func (d *Devops) ListPipelines(httpParameters *devops.HttpParameters) (*devops.PipelineList, error)

func (*Devops) ReplayBranchPipeline

func (d *Devops) ReplayBranchPipeline(projectName, pipelineName, branchName, runId string, httpParameters *devops.HttpParameters) (*devops.ReplayPipeline, error)

func (*Devops) ReplayPipeline

func (d *Devops) ReplayPipeline(projectName, pipelineName, runId string, httpParameters *devops.HttpParameters) (*devops.ReplayPipeline, error)

func (*Devops) RunBranchPipeline

func (d *Devops) RunBranchPipeline(projectName, pipelineName, branchName string, httpParameters *devops.HttpParameters) (*devops.RunPipeline, error)

func (*Devops) RunPipeline

func (d *Devops) RunPipeline(projectName, pipelineName string, httpParameters *devops.HttpParameters) (*devops.RunPipeline, error)

func (*Devops) ScanBranch

func (d *Devops) ScanBranch(projectName, pipelineName string, httpParameters *devops.HttpParameters) ([]byte, error)

func (*Devops) StopBranchPipeline

func (d *Devops) StopBranchPipeline(projectName, pipelineName, branchName, runId string, httpParameters *devops.HttpParameters) (*devops.StopPipeline, error)

func (*Devops) StopPipeline

func (d *Devops) StopPipeline(projectName, pipelineName, runId string, httpParameters *devops.HttpParameters) (*devops.StopPipeline, error)

func (*Devops) SubmitBranchInputStep

func (d *Devops) SubmitBranchInputStep(projectName, pipelineName, branchName, runId, nodeId, stepId string, httpParameters *devops.HttpParameters) ([]byte, error)

func (*Devops) SubmitInputStep

func (d *Devops) SubmitInputStep(projectName, pipelineName, runId, nodeId, stepId string, httpParameters *devops.HttpParameters) ([]byte, error)

func (*Devops) ToJenkinsfile

func (d *Devops) ToJenkinsfile(httpParameters *devops.HttpParameters) (*devops.ResJenkinsfile, error)

func (*Devops) ToJson

func (d *Devops) ToJson(httpParameters *devops.HttpParameters) (map[string]interface{}, error)

func (*Devops) UnAssignGlobalRole

func (d *Devops) UnAssignGlobalRole(roleName string, sid string) error

func (*Devops) UnAssignProjectRole

func (d *Devops) UnAssignProjectRole(roleName string, sid string) error

func (*Devops) UpdateCredentialInProject

func (d *Devops) UpdateCredentialInProject(projectId string, credential *v1.Secret) (string, error)

func (*Devops) UpdateProjectPipeline

func (d *Devops) UpdateProjectPipeline(projectId string, pipeline *devopsv1alpha3.Pipeline) (string, error)

func (*Devops) Validate

func (d *Devops) Validate(scmId string, httpParameters *devops.HttpParameters) (*devops.Validates, error)

Jump to

Keyboard shortcuts

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