Documentation ¶
Overview ¶
Package pkg implementation of plugin interface
Index ¶
- Variables
- type TemplateCoding
- func (t *TemplateCoding) Attributes() map[string][]string
- func (t *TemplateCoding) AuthCheck(ctx context.Context, options v1alpha1.AuthCheckOptions) (*v1alpha1.AuthCheck, error)
- func (t *TemplateCoding) AuthToken(ctx context.Context) (*v1alpha1.AuthToken, error)
- func (t *TemplateCoding) CreateGitBranch(ctx context.Context, payload metav1alpha1.CreateBranchPayload) (metav1alpha1.GitBranch, error)
- func (t *TemplateCoding) CreateGitCommitComment(ctx context.Context, payload metav1alpha1.CreateCommitCommentPayload) (metav1alpha1.GitCommitComment, error)
- func (t *TemplateCoding) CreateGitCommitStatus(ctx context.Context, payload metav1alpha1.CreateCommitStatusPayload) (metav1alpha1.GitCommitStatus, error)
- func (t *TemplateCoding) CreateIssueBranch(ctx context.Context, params metav1alpha1.IssueOptions, ...) (*metav1alpha1.Branch, error)
- func (t *TemplateCoding) CreateProject(ctx context.Context, project *v1alpha1.Project) (result *v1alpha1.Project, err error)
- func (t *TemplateCoding) CreatePullRequest(ctx context.Context, payload metav1alpha1.CreatePullRequestPayload) (metav1alpha1.GitPullRequest, error)
- func (t *TemplateCoding) CreatePullRequestComment(ctx context.Context, option metav1alpha1.CreatePullRequestCommentPayload) (metav1alpha1.GitPullRequestNote, error)
- func (t *TemplateCoding) CreateWebhook(ctx context.Context, spec metav1alpha1.WebhookRegisterSpec, ...) (result metav1alpha1.WebhookRegisterStatus, err error)
- func (t *TemplateCoding) DeleteArtifact(ctx context.Context, params metav1alpha1.ArtifactOptions) error
- func (t *TemplateCoding) DeleteArtifactTag(ctx context.Context, params metav1alpha1.ArtifactTagOptions) error
- func (t *TemplateCoding) DeleteIssueBranch(ctx context.Context, params metav1alpha1.IssueOptions, ...) error
- func (t *TemplateCoding) DeleteWebhook(ctx context.Context, spec metav1alpha1.WebhookRegisterSpec, ...) (err error)
- func (t *TemplateCoding) GetAddressURL() *apis.URL
- func (n *TemplateCoding) GetAllowEmptySecret() []string
- func (t *TemplateCoding) GetArtifact(ctx context.Context, params metav1alpha1.ArtifactOptions) (*metav1alpha1.Artifact, error)
- func (t *TemplateCoding) GetAttribute(key string) []string
- func (t *TemplateCoding) GetCodeQuality(ctx context.Context, projectKey string) (*metav1alpha1.CodeQuality, error)
- func (t *TemplateCoding) GetCodeQualityLineCharts(ctx context.Context, opt metav1alpha1.CodeQualityLineChartOption) (*metav1alpha1.CodeQualityLineChart, error)
- func (t *TemplateCoding) GetCodeQualityOverviewByBranch(ctx context.Context, opt metav1alpha1.CodeQualityBaseOption) (*metav1alpha1.CodeQuality, error)
- func (t *TemplateCoding) GetGitBranch(ctx context.Context, repoOption metav1alpha1.GitRepo, branch string) (metav1alpha1.GitBranch, error)
- func (t *TemplateCoding) GetGitCommit(ctx context.Context, option metav1alpha1.GitCommitOption) (metav1alpha1.GitCommit, error)
- func (t *TemplateCoding) GetGitPullRequest(ctx context.Context, option metav1alpha1.GitPullRequestOption) (metav1alpha1.GitPullRequest, error)
- func (t *TemplateCoding) GetGitRepository(ctx context.Context, repoOption metav1alpha1.GitRepo) (metav1alpha1.GitRepository, error)
- func (t *TemplateCoding) GetImageConfig(ctx context.Context, params metav1alpha1.ArtifactOptions) (*metav1alpha1.ImageConfig, error)
- func (t *TemplateCoding) GetIntegrationClassName() string
- func (t *TemplateCoding) GetIssue(ctx context.Context, params metav1alpha1.IssueOptions, ...) (*metav1alpha1.Issue, error)
- func (t *TemplateCoding) GetIssueAttribute(ctx context.Context, params metav1alpha1.IssueOptions, ...) (*metav1alpha1.Attribute, error)
- func (t *TemplateCoding) GetOverview(ctx context.Context) (*metav1alpha1.CodeQualityProjectOverview, error)
- func (t *TemplateCoding) GetReplicationPolicyTypes() []string
- func (t *TemplateCoding) GetResourceTypes() []string
- func (t *TemplateCoding) GetSecretTypes() []string
- func (t *TemplateCoding) GetSummaryByTaskID(ctx context.Context, opt metav1alpha1.CodeQualityTaskOption) (*metav1alpha1.CodeQualityTaskMetrics, error)
- func (t *TemplateCoding) GetSupportedVersions() []string
- func (t *TemplateCoding) GetWebhookURL() (*apis.URL, bool)
- func (t *TemplateCoding) IsSameResource(ctx context.Context, i, j metav1alpha1.ResourceURI) bool
- func (t *TemplateCoding) ListArtifacts(ctx context.Context, params metav1alpha1.ArtifactOptions, ...) (*metav1alpha1.ArtifactList, error)
- func (t *TemplateCoding) ListGitBranch(ctx context.Context, branchOption metav1alpha1.GitBranchOption, ...) (metav1alpha1.GitBranchList, error)
- func (t *TemplateCoding) ListGitCommit(ctx context.Context, option metav1alpha1.GitCommitListOption, ...) (metav1alpha1.GitCommitList, error)
- func (t *TemplateCoding) ListGitCommitComment(ctx context.Context, option metav1alpha1.GitCommitOption, ...) (metav1alpha1.GitCommitCommentList, error)
- func (t *TemplateCoding) ListGitCommitStatus(ctx context.Context, option metav1alpha1.GitCommitOption, ...) (metav1alpha1.GitCommitStatusList, error)
- func (t *TemplateCoding) ListGitPullRequest(ctx context.Context, option metav1alpha1.GitPullRequestListOption, ...) (metav1alpha1.GitPullRequestList, error)
- func (t *TemplateCoding) ListGitRepository(ctx context.Context, id, keyword string, subtype metav1alpha1.ProjectSubType, ...) (metav1alpha1.GitRepositoryList, error)
- func (t *TemplateCoding) ListIssueBranches(ctx context.Context, params metav1alpha1.IssueOptions, ...) (*metav1alpha1.BranchList, error)
- func (t *TemplateCoding) ListIssues(ctx context.Context, params metav1alpha1.IssueOptions, ...) (*metav1alpha1.IssueList, error)
- func (t *TemplateCoding) ListProjectUsers(ctx context.Context, params metav1alpha1.UserOptions, ...) (*metav1alpha1.UserList, error)
- func (t *TemplateCoding) ListProjects(ctx context.Context, option v1alpha1.ListOptions) (list *v1alpha1.ProjectList, err error)
- func (t *TemplateCoding) ListPullRequestComment(ctx context.Context, option metav1alpha1.GitPullRequestOption, ...) (metav1alpha1.GitPullRequestNoteList, error)
- func (t *TemplateCoding) ListRepositories(ctx context.Context, params metav1alpha1.RepositoryOptions, ...) (*metav1alpha1.RepositoryList, error)
- func (h *TemplateCoding) ListWebhooks(ctx context.Context, uri apis.URL, secret corev1.Secret) ([]metav1alpha1.WebhookRegisterStatus, error)
- func (t *TemplateCoding) Path() string
- func (t *TemplateCoding) PullRequestEventType() string
- func (t *TemplateCoding) PushEventType() string
- func (t *TemplateCoding) ReceiveWebhook(ctx context.Context, req *restful.Request, secret string) (event cloudevent.Event, err error)
- func (t *TemplateCoding) ScanImage(ctx context.Context, params metav1alpha1.ArtifactOptions) error
- func (t *TemplateCoding) SetAttribute(key string, values ...string)
- func (t *TemplateCoding) Setup(ctx context.Context, logger *zap.SugaredLogger) error
- func (t *TemplateCoding) TagEventType() string
- func (t *TemplateCoding) UpdateWebhook(ctx context.Context, spec metav1alpha1.WebhookRegisterSpec, ...) (result metav1alpha1.WebhookRegisterStatus, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotImplemented = fmt.Errorf("not Implemented")
Functions ¶
This section is empty.
Types ¶
type TemplateCoding ¶
type TemplateCoding struct { *zap.SugaredLogger Client ctrlclient.Client // contains filtered or unexported fields }
func (*TemplateCoding) Attributes ¶
func (t *TemplateCoding) Attributes() map[string][]string
func (*TemplateCoding) AuthCheck ¶
func (t *TemplateCoding) AuthCheck(ctx context.Context, options v1alpha1.AuthCheckOptions) (*v1alpha1.AuthCheck, error)
func (*TemplateCoding) CreateGitBranch ¶
func (t *TemplateCoding) CreateGitBranch(ctx context.Context, payload metav1alpha1.CreateBranchPayload) (metav1alpha1.GitBranch, error)
func (*TemplateCoding) CreateGitCommitComment ¶
func (t *TemplateCoding) CreateGitCommitComment(ctx context.Context, payload metav1alpha1.CreateCommitCommentPayload) (metav1alpha1.GitCommitComment, error)
func (*TemplateCoding) CreateGitCommitStatus ¶
func (t *TemplateCoding) CreateGitCommitStatus(ctx context.Context, payload metav1alpha1.CreateCommitStatusPayload) (metav1alpha1.GitCommitStatus, error)
func (*TemplateCoding) CreateIssueBranch ¶
func (t *TemplateCoding) CreateIssueBranch(ctx context.Context, params metav1alpha1.IssueOptions, payload metav1alpha1.Branch) (*metav1alpha1.Branch, error)
func (*TemplateCoding) CreateProject ¶
func (t *TemplateCoding) CreateProject(ctx context.Context, project *v1alpha1.Project) (result *v1alpha1.Project, err error)
CreateProject create a project in a plugin
func (*TemplateCoding) CreatePullRequest ¶
func (t *TemplateCoding) CreatePullRequest(ctx context.Context, payload metav1alpha1.CreatePullRequestPayload) (metav1alpha1.GitPullRequest, error)
func (*TemplateCoding) CreatePullRequestComment ¶
func (t *TemplateCoding) CreatePullRequestComment(ctx context.Context, option metav1alpha1.CreatePullRequestCommentPayload) (metav1alpha1.GitPullRequestNote, error)
func (*TemplateCoding) CreateWebhook ¶
func (t *TemplateCoding) CreateWebhook(ctx context.Context, spec metav1alpha1.WebhookRegisterSpec, secret corev1.Secret) (result metav1alpha1.WebhookRegisterStatus, err error)
func (*TemplateCoding) DeleteArtifact ¶
func (t *TemplateCoding) DeleteArtifact(ctx context.Context, params metav1alpha1.ArtifactOptions) error
func (*TemplateCoding) DeleteArtifactTag ¶
func (t *TemplateCoding) DeleteArtifactTag(ctx context.Context, params metav1alpha1.ArtifactTagOptions) error
func (*TemplateCoding) DeleteIssueBranch ¶
func (t *TemplateCoding) DeleteIssueBranch(ctx context.Context, params metav1alpha1.IssueOptions, option metav1alpha1.ListOptions) error
func (*TemplateCoding) DeleteWebhook ¶
func (t *TemplateCoding) DeleteWebhook(ctx context.Context, spec metav1alpha1.WebhookRegisterSpec, secret corev1.Secret) (err error)
func (*TemplateCoding) GetAddressURL ¶
func (t *TemplateCoding) GetAddressURL() *apis.URL
func (*TemplateCoding) GetAllowEmptySecret ¶
func (n *TemplateCoding) GetAllowEmptySecret() []string
func (*TemplateCoding) GetArtifact ¶
func (t *TemplateCoding) GetArtifact(ctx context.Context, params metav1alpha1.ArtifactOptions) (*metav1alpha1.Artifact, error)
func (*TemplateCoding) GetAttribute ¶
func (t *TemplateCoding) GetAttribute(key string) []string
func (*TemplateCoding) GetCodeQuality ¶
func (t *TemplateCoding) GetCodeQuality(ctx context.Context, projectKey string) (*metav1alpha1.CodeQuality, error)
func (*TemplateCoding) GetCodeQualityLineCharts ¶
func (t *TemplateCoding) GetCodeQualityLineCharts(ctx context.Context, opt metav1alpha1.CodeQualityLineChartOption) (*metav1alpha1.CodeQualityLineChart, error)
func (*TemplateCoding) GetCodeQualityOverviewByBranch ¶
func (t *TemplateCoding) GetCodeQualityOverviewByBranch(ctx context.Context, opt metav1alpha1.CodeQualityBaseOption) (*metav1alpha1.CodeQuality, error)
func (*TemplateCoding) GetGitBranch ¶
func (t *TemplateCoding) GetGitBranch(ctx context.Context, repoOption metav1alpha1.GitRepo, branch string) (metav1alpha1.GitBranch, error)
func (*TemplateCoding) GetGitCommit ¶
func (t *TemplateCoding) GetGitCommit(ctx context.Context, option metav1alpha1.GitCommitOption) (metav1alpha1.GitCommit, error)
func (*TemplateCoding) GetGitPullRequest ¶
func (t *TemplateCoding) GetGitPullRequest(ctx context.Context, option metav1alpha1.GitPullRequestOption) (metav1alpha1.GitPullRequest, error)
func (*TemplateCoding) GetGitRepository ¶
func (t *TemplateCoding) GetGitRepository(ctx context.Context, repoOption metav1alpha1.GitRepo) (metav1alpha1.GitRepository, error)
func (*TemplateCoding) GetImageConfig ¶
func (t *TemplateCoding) GetImageConfig(ctx context.Context, params metav1alpha1.ArtifactOptions) (*metav1alpha1.ImageConfig, error)
func (*TemplateCoding) GetIntegrationClassName ¶
func (t *TemplateCoding) GetIntegrationClassName() string
func (*TemplateCoding) GetIssue ¶
func (t *TemplateCoding) GetIssue(ctx context.Context, params metav1alpha1.IssueOptions, option metav1alpha1.ListOptions) (*metav1alpha1.Issue, error)
func (*TemplateCoding) GetIssueAttribute ¶
func (t *TemplateCoding) GetIssueAttribute(ctx context.Context, params metav1alpha1.IssueOptions, option metav1alpha1.ListOptions) (*metav1alpha1.Attribute, error)
func (*TemplateCoding) GetOverview ¶
func (t *TemplateCoding) GetOverview(ctx context.Context) (*metav1alpha1.CodeQualityProjectOverview, error)
func (*TemplateCoding) GetReplicationPolicyTypes ¶
func (t *TemplateCoding) GetReplicationPolicyTypes() []string
func (*TemplateCoding) GetResourceTypes ¶
func (t *TemplateCoding) GetResourceTypes() []string
func (*TemplateCoding) GetSecretTypes ¶
func (t *TemplateCoding) GetSecretTypes() []string
func (*TemplateCoding) GetSummaryByTaskID ¶
func (t *TemplateCoding) GetSummaryByTaskID(ctx context.Context, opt metav1alpha1.CodeQualityTaskOption) (*metav1alpha1.CodeQualityTaskMetrics, error)
func (*TemplateCoding) GetSupportedVersions ¶
func (t *TemplateCoding) GetSupportedVersions() []string
func (*TemplateCoding) GetWebhookURL ¶
func (t *TemplateCoding) GetWebhookURL() (*apis.URL, bool)
func (*TemplateCoding) IsSameResource ¶
func (t *TemplateCoding) IsSameResource(ctx context.Context, i, j metav1alpha1.ResourceURI) bool
func (*TemplateCoding) ListArtifacts ¶
func (t *TemplateCoding) ListArtifacts(ctx context.Context, params metav1alpha1.ArtifactOptions, option metav1alpha1.ListOptions) (*metav1alpha1.ArtifactList, error)
func (*TemplateCoding) ListGitBranch ¶
func (t *TemplateCoding) ListGitBranch(ctx context.Context, branchOption metav1alpha1.GitBranchOption, option metav1alpha1.ListOptions) (metav1alpha1.GitBranchList, error)
func (*TemplateCoding) ListGitCommit ¶
func (t *TemplateCoding) ListGitCommit(ctx context.Context, option metav1alpha1.GitCommitListOption, listOption metav1alpha1.ListOptions) (metav1alpha1.GitCommitList, error)
func (*TemplateCoding) ListGitCommitComment ¶
func (t *TemplateCoding) ListGitCommitComment(ctx context.Context, option metav1alpha1.GitCommitOption, listOption metav1alpha1.ListOptions) (metav1alpha1.GitCommitCommentList, error)
func (*TemplateCoding) ListGitCommitStatus ¶
func (t *TemplateCoding) ListGitCommitStatus(ctx context.Context, option metav1alpha1.GitCommitOption, listOption metav1alpha1.ListOptions) (metav1alpha1.GitCommitStatusList, error)
func (*TemplateCoding) ListGitPullRequest ¶
func (t *TemplateCoding) ListGitPullRequest(ctx context.Context, option metav1alpha1.GitPullRequestListOption, listOption metav1alpha1.ListOptions) (metav1alpha1.GitPullRequestList, error)
func (*TemplateCoding) ListGitRepository ¶
func (t *TemplateCoding) ListGitRepository(ctx context.Context, id, keyword string, subtype metav1alpha1.ProjectSubType, listOption metav1alpha1.ListOptions) (metav1alpha1.GitRepositoryList, error)
func (*TemplateCoding) ListIssueBranches ¶
func (t *TemplateCoding) ListIssueBranches(ctx context.Context, params metav1alpha1.IssueOptions, option metav1alpha1.ListOptions) (*metav1alpha1.BranchList, error)
func (*TemplateCoding) ListIssues ¶
func (t *TemplateCoding) ListIssues(ctx context.Context, params metav1alpha1.IssueOptions, option metav1alpha1.ListOptions) (*metav1alpha1.IssueList, error)
func (*TemplateCoding) ListProjectUsers ¶
func (t *TemplateCoding) ListProjectUsers(ctx context.Context, params metav1alpha1.UserOptions, option metav1alpha1.ListOptions) (*metav1alpha1.UserList, error)
func (*TemplateCoding) ListProjects ¶
func (t *TemplateCoding) ListProjects(ctx context.Context, option v1alpha1.ListOptions) (list *v1alpha1.ProjectList, err error)
ListProjects lists projects in a plugin
func (*TemplateCoding) ListPullRequestComment ¶
func (t *TemplateCoding) ListPullRequestComment(ctx context.Context, option metav1alpha1.GitPullRequestOption, listOption metav1alpha1.ListOptions) (metav1alpha1.GitPullRequestNoteList, error)
func (*TemplateCoding) ListRepositories ¶
func (t *TemplateCoding) ListRepositories(ctx context.Context, params metav1alpha1.RepositoryOptions, option metav1alpha1.ListOptions) (*metav1alpha1.RepositoryList, error)
func (*TemplateCoding) ListWebhooks ¶
func (h *TemplateCoding) ListWebhooks(ctx context.Context, uri apis.URL, secret corev1.Secret) ([]metav1alpha1.WebhookRegisterStatus, error)
func (*TemplateCoding) Path ¶
func (t *TemplateCoding) Path() string
Path custom url path to access this plugin
func (*TemplateCoding) PullRequestEventType ¶
func (t *TemplateCoding) PullRequestEventType() string
PullRequestEventType cloud event type of pull request hook that will match
func (*TemplateCoding) PushEventType ¶
func (t *TemplateCoding) PushEventType() string
PushEventType cloud event type of push hook that will match
func (*TemplateCoding) ReceiveWebhook ¶
func (t *TemplateCoding) ReceiveWebhook(ctx context.Context, req *restful.Request, secret string) (event cloudevent.Event, err error)
ReceiveWebhook basic webhook receiver actually it just receives cloud events and returns
func (*TemplateCoding) ScanImage ¶
func (t *TemplateCoding) ScanImage(ctx context.Context, params metav1alpha1.ArtifactOptions) error
func (*TemplateCoding) SetAttribute ¶
func (t *TemplateCoding) SetAttribute(key string, values ...string)
func (*TemplateCoding) Setup ¶
func (t *TemplateCoding) Setup(ctx context.Context, logger *zap.SugaredLogger) error
Setup basic initialization setup for plugins
func (*TemplateCoding) TagEventType ¶
func (t *TemplateCoding) TagEventType() string
TagEventType cloud event type of push hook that will match
func (*TemplateCoding) UpdateWebhook ¶
func (t *TemplateCoding) UpdateWebhook(ctx context.Context, spec metav1alpha1.WebhookRegisterSpec, secret corev1.Secret) (result metav1alpha1.WebhookRegisterStatus, err error)
Click to show internal directories.
Click to hide internal directories.