client

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 21 Imported by: 1

Documentation

Overview

Package client contains functions to add and retrieve auth from context

Index

Constants

View Source
const (
	OAuth2KeyAccessToken    = base.OAuth2KeyAccessToken
	AuthHeaderAuthorization = base.AuthHeaderAuthorization
	AuthPrefixBearer        = base.AuthPrefixBearer
	// OAuth2ClientIDKey is the key of the clientID for AuthTypeOAuth2 secrets
	OAuth2ClientIDKey = base.OAuth2ClientIDKey
	// OAuth2ClientSecretKey is the key of the clientSecret for AuthTypeOAuth2 secrets
	OAuth2ClientSecretKey = base.OAuth2ClientSecretKey
	// OAuth2CodeKey is the key of the code for AuthTypeOAuth2 secrets
	OAuth2CodeKey = base.OAuth2CodeKey
	// OAuth2AccessTokenKeyKey is the key of the accessTokenKey for AuthTypeOAuth2 secrets
	OAuth2AccessTokenKeyKey = base.OAuth2AccessTokenKeyKey
	// OAuth2AccessTokenKey is the key of the accessToken for AuthTypeOAuth2 secrets
	OAuth2AccessTokenKey = base.OAuth2AccessTokenKey
	// OAuth2ScopeKey is the key of the scope for AuthTypeOAuth2 secrets
	OAuth2ScopeKey = base.OAuth2ScopeKey
	// OAuth2RefreshTokenKey is the key of the refreshToken for AuthTypeOAuth2 secrets
	OAuth2RefreshTokenKey = base.OAuth2RefreshTokenKey
	// OAuth2ExpiresInKey is the key of the expiresIn for AuthTypeOAuth2 secrets
	OAuth2CreatedAtKey = base.OAuth2CreatedAtKey
	// OAuth2ExpiresInKey is the key of the expiresIn for AuthTypeOAuth2 secrets
	OAuth2ExpiresInKey = base.OAuth2ExpiresInKey
	// OAuth2RedirectURLKey is the key of the redirectURL for AuthTypeOAuth2 secrets
	OAuth2RedirectURLKey = base.OAuth2RedirectURLKey
	// OAuth2BaseURLKey is the key of the baseURL for AuthTypeOAuth2 secrets
	OAuth2BaseURLKey = base.OAuth2BaseURLKey

	// DynamicUsernameKey is the key of the username for  dynamic secrets.
	DynamicUsernameKey = base.DynamicUsernameKey
	// DynamicPasswordKey is the key of the password for  dynamic secrets.
	DynamicPasswordKey = base.DynamicPasswordKey

	// DynamicClientKeyKey is the key of the clientKey for dynamic secret
	DynamicClientKeyKey = base.DynamicClientKeyKey
	// DynamicClientSecretKey is the key of the clientSecret for dynamic secret
	DynamicClientSecretKey = base.DynamicClientSecretKey
	// redefine key for dynamic token refresh.
	DynamicAccessTokenKey  = base.DynamicAccessTokenKey
	DynamicRefreshTokenKey = base.DynamicRefreshTokenKey
	DynamicCreatedAtKey    = base.DynamicCreatedAtKey
	DynamicExpiresInKey    = base.DynamicExpiresInKey
	DynamicBaseURLKey      = base.OAuth2ClientIDKey
)
View Source
const (
	// PluginAuthHeader header for auth type (kubernetes secret type)
	PluginAuthHeader = base.PluginAuthHeader
	// PluginSecretHeader header to store data part of the secret
	PluginSecretHeader = base.PluginSecretHeader
)
View Source
const (
	// PluginMetaHeader header to store metadata for the plugin
	PluginMetaHeader = base.PluginMetaHeader

	// PluginSubresourcesHeader subresources header parameter
	// used as a header to avoid overloading the url query parameters
	// and any url length limits
	PluginSubresourcesHeader = base.PluginSubresourcesHeader
)

Variables

View Source
var AuthFilter = base.AuthFilter

AuthFilter auth filter for go restful, parsing plugin auth

View Source
var AuthFromRequest = base.AuthFromRequest
View Source
var BodyOpts = base.BodyOpts

BodyOpts request body

View Source
var ClientOpts = base.ClientOpts

ClientOpts adds a custom client build options for plugin client

View Source
var DefaultOptions = base.DefaultOptions

DefaultOptions for default plugin client options

View Source
var DoNotParseResponseOpts = base.DoNotParseResponseOpts

DoNotParseResponseOpts do not parse response

View Source
var ErrorOpts = base.ErrorOpts

ErrorOpts error response object

View Source
var ExtraMeta = base.ExtraMeta

ExtraMeta extract meta from a specific context

View Source
var ExtractAuth = base.ExtractAuth
View Source
var FromSecret = base.FromSecret
View Source
var GetGitRepoInfo = purl.GetGitRepoInfo

GetGitRepoInfo get git repo info, such as host, project Deprecated: use `github.com/katanomi/pkg/url` instead

View Source
var GetSubResourcesOptionsFromRequest = base.GetSubResourcesOptionsFromRequest

GetSubResourcesOptionsFromRequest returns SubResourcesOptions based on a request

View Source
var HeaderOpts = base.HeaderOpts

HeaderOpts sets a header

View Source
var IsNotImplementedError = base.IsNotImplementedError

IsNotImplementedError returns true if the plugin not implement the specified interface

View Source
var ListOpts = base.ListOpts

ListOpts options for lists

View Source
var MetaFilter = base.MetaFilter

MetaFilter meta filter for go restful, parsing plugin meta

View Source
var MetaFromRequest = base.MetaFromRequest
View Source
var MetaOpts = base.MetaOpts

MetaOpts provides metadata for the request

View Source
var QueryOpts = base.QueryOpts

QueryOpts query parameters for the request

View Source
var ResultOpts = base.ResultOpts

ResultOpts request result automatically marshalled into object

View Source
var SecretOpts = base.SecretOpts

SecretOpts provides a secret to be assigned to the request in the header

View Source
var SubResourcesOpts = base.SubResourcesOpts

SubResourcesOpts set subresources header for the request

Functions

func WithGitPluginClient added in v0.7.0

func WithGitPluginClient(parent context.Context, gitPluginClient *GitPluginClient) context.Context

WithGitPluginClient returns a copy of parent in which the gitPluginClient value is set

func WithPluginClient added in v0.7.0

func WithPluginClient(parent context.Context, pluginClient *PluginClient) context.Context

WithPluginClient returns a copy of parent in which the pluginClient value is set

Types

type AdditionalWebhookRegister added in v0.3.0

type AdditionalWebhookRegister = types.AdditionalWebhookRegister

type ArtifactDeleter

type ArtifactDeleter = types.ArtifactDeleter

ArtifactDeleter delete artifact

type ArtifactGetter

type ArtifactGetter = types.ArtifactGetter

ArtifactGetter get artifact detail

type ArtifactLister

type ArtifactLister = types.ArtifactLister

ArtifactLister list artifact

type ArtifactTagDeleter added in v0.7.0

type ArtifactTagDeleter = types.ArtifactTagDeleter

ArtifactTagDeleter delete a specific tag of the artifact.

type ArtifactTriggerRegister added in v0.3.0

type ArtifactTriggerRegister = types.ArtifactTriggerRegister

ArtifactTriggerRegister used to register ArtifactTrigger

type Auth

type Auth = base.Auth

type AuthChecker added in v0.2.0

type AuthChecker = types.AuthChecker

AuthChecker implements an authorization check method for plugins

type AuthMethod

type AuthMethod = base.AuthMethod

type AuthTokenGenerator added in v0.2.0

type AuthTokenGenerator = types.AuthTokenGenerator

AuthTokenGenerator implements token generation/refresh API method

type BlobStoreLister added in v0.2.0

type BlobStoreLister = types.BlobStoreLister

type BuildOptions

type BuildOptions = base.BuildOptions

BuildOptions Options to build the plugin client

type Client

type Client = base.Client

Client inteface for PluginClient, client code shoud use the interface as dependency

type ClientArtifact added in v0.7.0

type ClientArtifact interface {
	Get(ctx context.Context, baseURL *duckv1.Addressable, project string, repository string, artifact string, options ...OptionFunc) (*metav1alpha1.Artifact, error)
	List(ctx context.Context, baseURL *duckv1.Addressable, project string, repository string, options ...OptionFunc) (*metav1alpha1.ArtifactList, error)
	Delete(ctx context.Context, baseURL *duckv1.Addressable, project string, repository string, artifact string, options ...OptionFunc) error
	DeleteTag(ctx context.Context, baseURL *duckv1.Addressable, project string, repository string, artifact string, tag string, options ...OptionFunc) error
}

type ClientAuth added in v0.2.0

type ClientAuth interface {
	Check(ctx context.Context, baseURL *duckv1.Addressable, options metav1alpha1.AuthCheckOptions, opts ...OptionFunc) (*metav1alpha1.AuthCheck, error)
	Token(ctx context.Context, baseURL *duckv1.Addressable, opts ...OptionFunc) (*metav1alpha1.AuthToken, error)
}

ClientAuth provides methods to verify authentication

type ClientBlobStore added in v0.2.0

type ClientBlobStore interface {
	List(ctx context.Context, baseURL *duckv1.Addressable, options ...OptionFunc) (*metav1alpha1.BlobStoreList, error)
}

type ClientCodeQuality added in v0.2.0

type ClientCodeQuality interface {
	Get(ctx context.Context, baseURL *duckv1.Addressable, projectKey string, options ...OptionFunc) (*metav1alpha1.CodeQuality, error)
	GetOverview(ctx context.Context, baseURL *duckv1.Addressable, options ...OptionFunc) (*metav1alpha1.CodeQualityProjectOverview, error)
	GetByBranch(ctx context.Context, baseURL *duckv1.Addressable, opt metav1alpha1.CodeQualityBaseOption, options ...OptionFunc) (*metav1alpha1.CodeQuality, error)
	GetLineCharts(ctx context.Context, baseURL *duckv1.Addressable, opt metav1alpha1.CodeQualityLineChartOption, options ...OptionFunc) (*metav1alpha1.CodeQualityLineChart, error)
	GetMetricsByTaskID(ctx context.Context, baseURL *duckv1.Addressable, opt metav1alpha1.CodeQualityTaskOption, options ...OptionFunc) (*metav1alpha1.CodeQualityTaskMetrics, error)
}

type ClientGitBranch

type ClientGitBranch interface {
	List(ctx context.Context, baseURL *duckv1.Addressable, repo metav1alpha1.GitBranchOption, options ...OptionFunc) (*metav1alpha1.GitBranchList, error)
	Create(ctx context.Context, baseURL *duckv1.Addressable, payload metav1alpha1.CreateBranchPayload, options ...OptionFunc) (*metav1alpha1.GitBranch, error)
	Get(ctx context.Context, baseURL *duckv1.Addressable, repo metav1alpha1.GitRepo, branch string, options ...OptionFunc) (*metav1alpha1.GitBranch, error)
}

ClientGitBranch client for branch

type ClientGitCommit

ClientGitCommit client for commit

type ClientGitCommitComment

type ClientGitCommitComment interface {
	List(ctx context.Context, baseURL *duckv1.Addressable, option metav1alpha1.GitCommitOption, options ...OptionFunc) (*metav1alpha1.GitCommitCommentList, error)
	Create(ctx context.Context, baseURL *duckv1.Addressable, payload metav1alpha1.CreateCommitCommentPayload, options ...OptionFunc) (*metav1alpha1.GitCommitComment, error)
}

type ClientGitCommitStatus

type ClientGitCommitStatus interface {
	List(ctx context.Context, baseURL *duckv1.Addressable, option metav1alpha1.GitCommitOption, options ...OptionFunc) (*metav1alpha1.GitCommitStatusList, error)
	Create(ctx context.Context, baseURL *duckv1.Addressable, payload metav1alpha1.CreateCommitStatusPayload, options ...OptionFunc) (*metav1alpha1.GitCommitStatus, error)
}

type ClientGitContent

type ClientGitContent interface {
	Get(ctx context.Context, baseURL *duckv1.Addressable, option metav1alpha1.GitRepoFileOption, options ...OptionFunc) (*metav1alpha1.GitRepoFile, error)
	Create(ctx context.Context, baseURL *duckv1.Addressable, payload metav1alpha1.CreateRepoFilePayload, options ...OptionFunc) (*metav1alpha1.GitCommit, error)
}

type ClientGitPullRequest

ClientGitPullRequest is interface for Create and Read pull requests Deprecated: Integrations should implement GitPullRequestCRUClient instead (or additionally).

type ClientGitRepository

type ClientGitRepository interface {
	List(ctx context.Context, baseURL *duckv1.Addressable, project, keyword string, subtype metav1alpha1.ProjectSubType, options ...OptionFunc) (*metav1alpha1.GitRepositoryList, error)
	Get(ctx context.Context, baseURL *duckv1.Addressable, project, repo string, options ...OptionFunc) (*metav1alpha1.GitRepository, error)
}

ClientGitRepository client for repo

type ClientGitRepositoryFileTree added in v0.7.0

type ClientGitRepositoryFileTree interface {
	GetGitRepositoryFileTree(
		ctx context.Context,
		baseURL *duckv1.Addressable,
		option metav1alpha1.GitRepoFileTreeOption,
		options ...OptionFunc,
	) (*metav1alpha1.GitRepositoryFileTree, error)
}

ClientGitRepositoryFileTree defines the request interface for the file tree

type ClientGitRepositoryTag added in v0.7.0

type ClientGitRepositoryTag interface {
	Get(ctx context.Context, baseURL *duckv1.Addressable, option metav1alpha1.GitRepositoryTagOption, options ...OptionFunc) (*metav1alpha1.GitRepositoryTag, error)
	List(ctx context.Context, baseURL *duckv1.Addressable, option metav1alpha1.GitRepositoryTagListOption, options ...OptionFunc) (*metav1alpha1.GitRepositoryTagList, error)
}

ClientGitRepositoryTag client for repository tag

type ClientProject

type ClientProject interface {
	List(ctx context.Context, baseURL *duckv1.Addressable, options ...OptionFunc) (*metav1alpha1.ProjectList, error)
	Create(ctx context.Context, baseURL *duckv1.Addressable, project *metav1alpha1.Project, options ...OptionFunc) (*metav1alpha1.Project, error)
	Get(ctx context.Context, baseURL *duckv1.Addressable, id string, options ...OptionFunc) (*metav1alpha1.Project, error)
}

type ClientProjectArtifact added in v0.9.0

type ClientProjectArtifact interface {
	List(ctx context.Context, baseURL *duckv1.Addressable, project string, options ...OptionFunc) (*metav1alpha1.ArtifactList, error)
	Get(ctx context.Context, baseURL *duckv1.Addressable, project string, artifact string, options ...OptionFunc) (*metav1alpha1.Artifact, error)
	Put(ctx context.Context, baseURL *duckv1.Addressable, project string, artifact string, options ...OptionFunc) error
	Download(ctx context.Context, baseURL *duckv1.Addressable, project string, artifact string, options ...OptionFunc) (io.ReadCloser, error)
	Delete(ctx context.Context, baseURL *duckv1.Addressable, project string, artifact string, options ...OptionFunc) error
}

type ClientProjectGetter

type ClientProjectGetter interface {
	Project(meta Meta, secret corev1.Secret) ClientProject
}

type ClientRepository added in v0.2.0

type ClientRepository interface {
	List(ctx context.Context, baseURL *duckv1.Addressable, project string, options ...OptionFunc) (*metav1alpha1.RepositoryList, error)
}

type ClientTestCase added in v0.7.0

type ClientTestCase interface {
	List(ctx context.Context, baseURL *duckv1.Addressable, params metav1alpha1.TestProjectOptions, options ...OptionFunc) (*metav1alpha1.TestCaseList, error)
	Get(ctx context.Context, baseURL *duckv1.Addressable, params metav1alpha1.TestProjectOptions, options ...OptionFunc) (*metav1alpha1.TestCase, error)
}

ClientTestCase for test case

type ClientTestCaseExecution added in v0.7.0

type ClientTestCaseExecution interface {
	List(ctx context.Context,
		baseURL *duckv1.Addressable,
		params metav1alpha1.TestProjectOptions,
		options ...OptionFunc) (*metav1alpha1.TestCaseExecutionList, error)
	Create(ctx context.Context,
		baseURL *duckv1.Addressable,
		params metav1alpha1.TestProjectOptions,
		payload metav1alpha1.TestCaseExecution,
		options ...OptionFunc,
	) (*metav1alpha1.TestCaseExecution, error)
}

ClientTestCaseExecution client for test case execution

type ClientTestModule added in v0.7.0

type ClientTestModule interface {
	List(ctx context.Context, baseURL *duckv1.Addressable, params metav1alpha1.TestProjectOptions, options ...OptionFunc) (*metav1alpha1.TestModuleList, error)
}

ClientTestModule client for test module

type ClientTestPlan added in v0.7.0

type ClientTestPlan interface {
	List(ctx context.Context,
		baseURL *duckv1.Addressable,
		params metav1alpha1.TestProjectOptions,
		options ...OptionFunc,
	) (*metav1alpha1.TestPlanList, error)

	Get(ctx context.Context, baseURL *duckv1.Addressable, params metav1alpha1.TestProjectOptions,
		options ...OptionFunc) (*metav1alpha1.TestPlan, error)
}

ClientTestPlan client for test plan

type ClientToolMetadata added in v0.9.0

type ClientToolMetadata interface {
	GetToolMetadata(ctx context.Context, baseURL *duckv1.Addressable) (*metav1alpha1.ToolMeta, error)
}

type ClientToolService added in v0.7.0

type ClientToolService interface {
	CheckAlive(ctx context.Context, options ...OptionFunc) error
	Initialize(ctx context.Context, options ...OptionFunc) error
}

type CodeQualityGetter added in v0.2.0

type CodeQualityGetter = types.CodeQualityGetter

type DependentResourceGetter added in v0.7.0

type DependentResourceGetter = types.DependentResourceGetter

DependentResourceGetter checks and returns dependent resource references

type DisplayColumnsManager added in v0.11.0

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

DisplayColumnsManager provide default displayColumn management. When the default implementation is not satisfied, you need to implement it yourself.

func (*DisplayColumnsManager) GetDisplayColumns added in v0.11.0

func (d *DisplayColumnsManager) GetDisplayColumns() map[string]v1alpha1.DisplayColumns

GetDisplayColumns get display columns

func (*DisplayColumnsManager) SetDisplayColumns added in v0.11.0

func (d *DisplayColumnsManager) SetDisplayColumns(key string, values ...v1alpha1.DisplayColumn)

SetDisplayColumns set display columns

type GitBranchCreator

type GitBranchCreator = types.GitBranchCreator

GitBranchCreator create git branch,github, gogs don't support create branch

type GitBranchGetter

type GitBranchGetter = types.GitBranchGetter

GitBranchGetter get git branch

type GitBranchLister

type GitBranchLister = types.GitBranchLister

GitBranchLister List git branch

type GitCommitCommentCreator

type GitCommitCommentCreator = types.GitCommitCommentCreator

GitCommitCommentCreator create git commit comment

type GitCommitCommentLister

type GitCommitCommentLister = types.GitCommitCommentLister

GitCommitCommentLister list git commit comment

type GitCommitCreator added in v0.8.0

type GitCommitCreator = types.GitCommitCreator

GitCommitCreator create git commit

type GitCommitGetter

type GitCommitGetter = types.GitCommitGetter

GitCommitGetter get git commit

type GitCommitLister added in v0.3.0

type GitCommitLister = types.GitCommitLister

GitCommitLister List git commit

type GitCommitStatusCreator

type GitCommitStatusCreator = types.GitCommitStatusCreator

GitCommitStatusCreator create git commit status

type GitCommitStatusLister

type GitCommitStatusLister = types.GitCommitStatusLister

GitCommitStatusLister list git commit status

type GitPluginClient added in v0.7.0

type GitPluginClient struct {
	*PluginClient

	// GitRepo Repo base info, such as project, repository
	GitRepo metav1alpha1.GitRepo

	// ClassObject store the integration class object
	// +optional
	ClassObject ctrlclient.Object
}

GitPluginClient client for plugins

func GenerateGitPluginClient added in v0.7.0

func GenerateGitPluginClient(ctx context.Context, secretRef *corev1.ObjectReference,
	gitRepoURL, integrationClassName string, classAddress *duckv1.Addressable) (
	gpclient *GitPluginClient, err error)

GenerateGitPluginClient generate git plugin client params

func GitPluginClientFrom added in v0.7.0

func GitPluginClientFrom(ctx context.Context) (*GitPluginClient, bool)

GitPluginClientFrom returns the value of the gitPluginClient key on the ctx

func GitPluginClientValue added in v0.7.0

func GitPluginClientValue(ctx context.Context) *GitPluginClient

GitPluginClientValue returns the value of the gitPluginClient key on the ctx, or the nil if none

func (*GitPluginClient) WithClassObject added in v0.7.0

func (p *GitPluginClient) WithClassObject(object ctrlclient.Object) *GitPluginClient

func (*GitPluginClient) WithGitRepo added in v0.7.0

func (p *GitPluginClient) WithGitRepo(gitRepo metav1alpha1.GitRepo) *GitPluginClient

type GitPullRequestCRUClient added in v0.7.0

type GitPullRequestCRUClient interface {
	ClientGitPullRequest
	UpdateNote(
		ctx context.Context,
		baseURL *duckv1.Addressable,
		payload metav1alpha1.UpdatePullRequestCommentPayload,
		options ...OptionFunc,
	) (*metav1alpha1.GitPullRequestNote, error)
}

GitPullRequestCRUClient is the client interface with Create Read and Update operations

type GitPullRequestCommentCreator

type GitPullRequestCommentCreator = types.GitPullRequestCommentCreator

GitPullRequestCommentCreator create pull request comment functions

type GitPullRequestCommentLister

type GitPullRequestCommentLister = types.GitPullRequestCommentLister

GitPullRequestCommentLister list pull request comment functions

type GitPullRequestCommentUpdater added in v0.7.0

type GitPullRequestCommentUpdater = types.GitPullRequestCommentUpdater

GitPullRequestCommentUpdater updates pull request comment

type GitPullRequestHandler

type GitPullRequestHandler = types.GitPullRequestHandler

GitPullRequestHandler list, get and create pr function

type GitRepoFileCreator

type GitRepoFileCreator = types.GitRepoFileCreator

GitRepoFileCreator used to create a file, gogs don't support

type GitRepoFileGetter

type GitRepoFileGetter = types.GitRepoFileGetter

GitRepoFileGetter used to get a file content

type GitRepositoryCreator added in v0.9.0

type GitRepositoryCreator = types.GitRepositoryCreator

GitRepositoryCreator create a git repository

type GitRepositoryDeleter added in v0.9.0

type GitRepositoryDeleter = types.GitRepositoryDeleter

GitRepositoryDeleter delete a git repository

type GitRepositoryFileTreeGetter added in v0.7.0

type GitRepositoryFileTreeGetter types.GitRepositoryFileTreeGetter

GitRepositoryFileTreeGetter get git repository file tree

type GitRepositoryGetter

type GitRepositoryGetter = types.GitRepositoryGetter

GitRepositoryGetter get git repository

type GitRepositoryLister

type GitRepositoryLister = types.GitRepositoryLister

GitRepositoryLister list git repository

type GitRepositoryTagCreator added in v0.10.0

type GitRepositoryTagCreator = types.GitRepositoryTagCreator

GitRepositoryTagCreator create git repository tag

type GitRepositoryTagGetter added in v0.7.0

type GitRepositoryTagGetter = types.GitRepositoryTagGetter

GitRepositoryTagGetter get git repository Tag

type GitRepositoryTagLister added in v0.7.0

type GitRepositoryTagLister = types.GitRepositoryTagLister

GitRepositoryTagLister list git repository Tag

type GitTriggerRegister

type GitTriggerRegister = types.GitTriggerRegister

GitTriggerRegister used to register GitTrigger TODO: need refactor: maybe integration plugin should decided how to generate cloudevents filters up to now, it is not a better solution that relying on plugins to give some events type to GitTriggerReconcile.

PullRequestCloudEventFilter() CloudEventFilters BranchCloudEventFilter() CloudEventFilters TagCloudEventFilter() CloudEventFilters WebHook() WebHook

type ImageConfigGetter added in v0.3.0

type ImageConfigGetter = types.ImageConfigGetter

ImageConfigGetter get image config

type Initializer added in v0.7.0

type Initializer = types.Initializer

Initializer initialize the tool service

type Interface

type Interface = types.Interface

Interface base interface for plugins

type IssueAttributeGetter added in v0.3.0

type IssueAttributeGetter = types.IssueAttributeGetter

type IssueBranchCreator added in v0.3.0

type IssueBranchCreator = types.IssueBranchCreator

type IssueBranchDeleter added in v0.3.0

type IssueBranchDeleter = types.IssueBranchDeleter

type IssueBranchLister added in v0.3.0

type IssueBranchLister = types.IssueBranchLister

type IssueGetter added in v0.3.0

type IssueGetter = types.IssueGetter

type IssueLister added in v0.3.0

type IssueLister = types.IssueLister

IssueLister issue lister

type LivenessChecker added in v0.7.0

type LivenessChecker = types.LivenessChecker

LivenessChecker check the tool service is alive

type Meta

type Meta = base.Meta

Meta Plugin meta with base url and version info, for calling plugin api

type OptionFunc

type OptionFunc = base.OptionFunc

OptionFunc options for requests

type PluginAddressable added in v0.7.0

type PluginAddressable = types.PluginAddressable

PluginAddressable provides methods to get plugin address url

type PluginAttributes added in v0.2.0

type PluginAttributes = types.PluginAttributes

type PluginClient

type PluginClient struct {
	*base.PluginClient

	// IntegrationClassName is the name of the integration class
	// +optional
	IntegrationClassName string
}

PluginClient client for plugins

func NewPluginClient

func NewPluginClient(opts ...BuildOptions) *PluginClient

NewPluginClient creates a new plugin client

func PluginClientFrom added in v0.7.0

func PluginClientFrom(ctx context.Context) (*PluginClient, bool)

PluginClientFrom returns the value of the pluginClient key on the ctx

func PluginClientValue added in v0.7.0

func PluginClientValue(ctx context.Context) *PluginClient

PluginClientValue returns the value of the pluginClient key on the ctx, or the nil if none

func (*PluginClient) Artifact added in v0.7.0

func (p *PluginClient) Artifact(meta Meta, secret corev1.Secret) ClientArtifact

Artifact get Artifact client

func (*PluginClient) Auth added in v0.2.0

func (p *PluginClient) Auth(meta Meta, secret corev1.Secret) ClientAuth

Auth provides an auth methods for clients

func (*PluginClient) BlobStore added in v0.2.0

func (p *PluginClient) BlobStore(meta Meta, secret corev1.Secret) ClientBlobStore

BlobStore get blob store client

func (*PluginClient) Body

func (p *PluginClient) Body(body interface{}) OptionFunc

Body request body

func (*PluginClient) Clone added in v0.7.0

func (p *PluginClient) Clone() *PluginClient

Clone shallow clone the plugin client used to update some fields without changing the original

func (*PluginClient) CodeQuality added in v0.2.0

func (p *PluginClient) CodeQuality(meta Meta, secret corev1.Secret) ClientCodeQuality

CodeQuality get code quality client

func (*PluginClient) Dest

func (p *PluginClient) Dest(dest interface{}) OptionFunc

Dest request result automatically marshalled into object

func (*PluginClient) Error

func (p *PluginClient) Error(err interface{}) OptionFunc

Error error response object

func (*PluginClient) GitBranch

func (p *PluginClient) GitBranch(meta Meta, secret corev1.Secret) ClientGitBranch

GitBranch get branch client

func (*PluginClient) GitCommit

func (p *PluginClient) GitCommit(meta Meta, secret corev1.Secret) ClientGitCommit

GitCommit get pr client

func (*PluginClient) GitCommitComment

func (p *PluginClient) GitCommitComment(meta Meta, secret corev1.Secret) ClientGitCommitComment

GitCommitComment get commit comment client

func (*PluginClient) GitCommitStatus

func (p *PluginClient) GitCommitStatus(meta Meta, secret corev1.Secret) ClientGitCommitStatus

GitCommitStatus get commit comment client

func (*PluginClient) GitContent

func (p *PluginClient) GitContent(meta Meta, secret corev1.Secret) ClientGitContent

GitContent get content client

func (*PluginClient) GitPluginClient added in v0.7.0

func (p *PluginClient) GitPluginClient() *GitPluginClient

GitPluginClient convert PluginClient to GitPluginClient

func (*PluginClient) GitPullRequest

func (p *PluginClient) GitPullRequest(meta Meta, secret corev1.Secret) GitPullRequestCRUClient

GitPullRequest get pr client

func (*PluginClient) GitRepository

func (p *PluginClient) GitRepository(meta Meta, secret corev1.Secret) ClientGitRepository

GitRepository get repo client

func (*PluginClient) GitRepositoryFileTree added in v0.7.0

func (p *PluginClient) GitRepositoryFileTree(meta Meta, secret corev1.Secret) ClientGitRepositoryFileTree

GitRepositoryFileTree get repo file tree client

func (*PluginClient) GitRepositoryTag added in v0.7.0

func (p *PluginClient) GitRepositoryTag(meta Meta, secret corev1.Secret) ClientGitRepositoryTag

GitRepositoryTag get repository tag client

func (*PluginClient) Header

func (p *PluginClient) Header(key, value string) OptionFunc

Header sets a header

func (*PluginClient) ListOptions

func (p *PluginClient) ListOptions(opts metav1alpha1.ListOptions) OptionFunc

ListOptions options for lists

func (*PluginClient) Meta

func (p *PluginClient) Meta(meta Meta) OptionFunc

Meta provides metadata for the request

func (*PluginClient) NewArtifact added in v0.7.0

func (p *PluginClient) NewArtifact() ClientArtifact

NewArtifact get Artifact client Use the internal meta and secret to generate the client, please assign in advance.

func (*PluginClient) NewAuth added in v0.7.0

func (p *PluginClient) NewAuth() ClientAuth

NewAuth provides an auth methods for clients Use the internal meta and secret to generate the client, please assign in advance.

func (*PluginClient) NewBlobStore added in v0.7.0

func (p *PluginClient) NewBlobStore() ClientBlobStore

NewBlobStore get blob store client Use the internal meta and secret to generate the client, please assign in advance.

func (*PluginClient) NewCodeQuality added in v0.7.0

func (p *PluginClient) NewCodeQuality() ClientCodeQuality

NewCodeQuality get code quality client Use the internal meta and secret to generate the client, please assign in advance.

func (*PluginClient) NewGitBranch added in v0.7.0

func (p *PluginClient) NewGitBranch() ClientGitBranch

NewGitBranch get branch client Use the internal meta and secret to generate the client, please assign in advance.

func (*PluginClient) NewGitCommit added in v0.7.0

func (p *PluginClient) NewGitCommit() ClientGitCommit

NewGitCommit get pr client Use the internal meta and secret to generate the client, please assign in advance.

func (*PluginClient) NewGitCommitComment added in v0.7.0

func (p *PluginClient) NewGitCommitComment() ClientGitCommitComment

NewGitCommitComment get commit comment client Use the internal meta and secret to generate the client, please assign in advance.

func (*PluginClient) NewGitCommitStatus added in v0.7.0

func (p *PluginClient) NewGitCommitStatus() ClientGitCommitStatus

NewGitCommitStatus get commit comment client Use the internal meta and secret to generate the client, please assign in advance.

func (*PluginClient) NewGitContent added in v0.7.0

func (p *PluginClient) NewGitContent() ClientGitContent

NewGitContent get content client Use the internal meta and secret to generate the client, please assign in advance.

func (*PluginClient) NewGitPullRequest added in v0.7.0

func (p *PluginClient) NewGitPullRequest() GitPullRequestCRUClient

NewGitPullRequest get pr client Use the internal meta and secret to generate the client, please assign in advance.

func (*PluginClient) NewGitRepository added in v0.7.0

func (p *PluginClient) NewGitRepository() ClientGitRepository

NewGitRepository get repo client Use the internal meta and secret to generate the client, please assign in advance.

func (*PluginClient) NewGitRepositoryFileTree added in v0.7.0

func (p *PluginClient) NewGitRepositoryFileTree() ClientGitRepositoryFileTree

NewGitRepositoryFileTree get repo file tree client Use the internal meta and secret to generate the client, please assign in advance.

func (*PluginClient) NewGitRepositoryTag added in v0.7.0

func (p *PluginClient) NewGitRepositoryTag() ClientGitRepositoryTag

NewGitRepositoryTag get repository tag client Use the internal meta and secret to generate the client, please assign in advance.

func (*PluginClient) NewProject added in v0.7.0

func (p *PluginClient) NewProject() ClientProject

NewProject get project client Use the internal meta and secret to generate the client, please assign in advance.

func (*PluginClient) NewProjectArtifact added in v0.9.0

func (p *PluginClient) NewProjectArtifact() ClientProjectArtifact

NewProjectArtifact get ProjectArtifact client Use the internal meta and secret to generate the client, please assign in advance.

func (*PluginClient) NewRepository added in v0.7.0

func (p *PluginClient) NewRepository() ClientRepository

NewRepository get Repository client Use the internal meta and secret to generate the client, please assign in advance.

func (*PluginClient) NewToolMetadata added in v0.9.0

func (p *PluginClient) NewToolMetadata(meta Meta, secret corev1.Secret) ClientToolMetadata

NewToolMetadata get tool metadata execution client

func (*PluginClient) NewToolService added in v0.7.0

func (p *PluginClient) NewToolService() ClientToolService

NewToolService get tool service execution client

func (*PluginClient) Project

func (p *PluginClient) Project(meta Meta, secret corev1.Secret) ClientProject

Project get project client

func (*PluginClient) ProjectArtifact added in v0.9.0

func (p *PluginClient) ProjectArtifact(meta Meta, secret corev1.Secret) ClientProjectArtifact

ProjectArtifact get ProjectArtifact client

func (*PluginClient) Query

func (p *PluginClient) Query(params map[string]string) OptionFunc

Query query parameters for the request

func (*PluginClient) Repository added in v0.2.0

func (p *PluginClient) Repository(meta Meta, secret corev1.Secret) ClientRepository

Repository get Repository client

func (*PluginClient) Secret

func (p *PluginClient) Secret(secret corev1.Secret) OptionFunc

Secret provides a secret to be assigned to the request in the header

func (*PluginClient) TestCase added in v0.7.0

func (p *PluginClient) TestCase(meta Meta, secret corev1.Secret) ClientTestCase

TestCase get test case client

func (*PluginClient) TestCaseExecution added in v0.7.0

func (p *PluginClient) TestCaseExecution(meta Meta, secret corev1.Secret) ClientTestCaseExecution

TestCaseExecution get test case execution client

func (*PluginClient) TestModule added in v0.7.0

func (p *PluginClient) TestModule(meta Meta, secret corev1.Secret) ClientTestModule

TestModule get test module client

func (*PluginClient) TestPlan added in v0.7.0

func (p *PluginClient) TestPlan(meta Meta, secret corev1.Secret) ClientTestPlan

TestPlan get test plan client

func (*PluginClient) WithClassAddress added in v0.7.0

func (p *PluginClient) WithClassAddress(classAddress *duckv1.Addressable) *PluginClient

func (*PluginClient) WithIntegrationClassName added in v0.7.0

func (p *PluginClient) WithIntegrationClassName(integrationClassName string) *PluginClient

func (*PluginClient) WithMeta added in v0.7.0

func (p *PluginClient) WithMeta(meta Meta) *PluginClient

func (*PluginClient) WithRequestOptions added in v0.11.0

func (p *PluginClient) WithRequestOptions(opts ...OptionFunc) *PluginClient

func (*PluginClient) WithSecret added in v0.7.0

func (p *PluginClient) WithSecret(secret corev1.Secret) *PluginClient

type PluginDisplayColumns added in v0.11.0

type PluginDisplayColumns = types.PluginDisplayColumns

PluginDisplayColumns implements display columns manager.

type PluginRegister

type PluginRegister = types.PluginRegister

PluginRegister plugin registration methods to update IntegrationClass status

type PluginVersionAttributes added in v0.9.0

type PluginVersionAttributes = types.PluginVersionAttributes

PluginVersionAttributes get diff configurations for different versions.

type ProjectArtifactDeleter added in v0.9.0

type ProjectArtifactDeleter = types.ProjectArtifactDeleter

ProjectArtifactDeleter delete artifact

type ProjectArtifactFileGetter added in v0.9.0

type ProjectArtifactFileGetter = types.ProjectArtifactFileGetter

ProjectArtifactFileGetter download artifact within a project

type ProjectArtifactGetter added in v0.9.0

type ProjectArtifactGetter = types.ProjectArtifactGetter

ProjectArtifactGetter get artifact detail

type ProjectArtifactLister added in v0.9.0

type ProjectArtifactLister = types.ProjectArtifactLister

ProjectArtifactLister list project-level artifacts

type ProjectArtifactUploader added in v0.9.0

type ProjectArtifactUploader = types.ProjectArtifactUploader

ProjectArtifactUploader upload artifact

type ProjectCreator

type ProjectCreator = types.ProjectCreator

ProjectCreator create project api

type ProjectDeleter added in v0.10.0

type ProjectDeleter = types.ProjectDeleter

ProjectDeleter create project api

type ProjectGetter

type ProjectGetter = types.ProjectGetter

ProjectGetter list project api

type ProjectLister

type ProjectLister = types.ProjectLister

ProjectLister list project api

type ProjectUserLister added in v0.3.0

type ProjectUserLister = types.ProjectUserLister

type RepositoryGetter added in v0.10.0

type RepositoryGetter = types.RepositoryGetter

RepositoryGetter get repository

type RepositoryLister

type RepositoryLister = types.RepositoryLister

RepositoryLister list repository

type ResourcePathFormatter added in v0.7.0

type ResourcePathFormatter = types.ResourcePathFormatter

ResourcePathFormatter implements a formatter for resource path base on different scene

type ResponseStatusErr added in v0.7.0

type ResponseStatusErr = base.ResponseStatusErr

ResponseStatusErr is an error with `Status` type, used to handle plugin response

type ScanImage

type ScanImage = types.ScanImage

ScanImage scan image

type TestCaseExecutionCreator added in v0.7.0

type TestCaseExecutionCreator = types.TestCaseExecutionCreator

TestCaseExecutionCreator create a new test case execution

type TestCaseExecutionLister added in v0.7.0

type TestCaseExecutionLister = types.TestCaseExecutionLister

TestCaseExecutionLister list test case executions

type TestCaseGetter added in v0.7.0

type TestCaseGetter = types.TestCaseGetter

TestCaseGetter get a test case

type TestCaseLister added in v0.7.0

type TestCaseLister = types.TestCaseLister

TestCaseLister list test cases

type TestModuleLister added in v0.7.0

type TestModuleLister = types.TestModuleLister

TestModuleLister list a test module

type TestPlanGetter added in v0.7.0

type TestPlanGetter = types.TestPlanGetter

TestPlanGetter get a test plan

type TestPlanLister added in v0.7.0

type TestPlanLister = types.TestPlanLister

TestPlanLister list test plans

type ToolMetadataGetter added in v0.9.0

type ToolMetadataGetter = types.ToolMetadataGetter

ToolMetadataGetter get the version information corresponding to the address.

type WebhookReceiver

type WebhookReceiver = types.WebhookReceiver

WebhookReceiver receives a webhook request with validation and transform it into a cloud event

type WebhookRegister

type WebhookRegister = types.WebhookRegister

WebhookRegister used to register and manage webhooks

type WebhookResourceDiffer

type WebhookResourceDiffer = types.WebhookResourceDiffer

WebhookResourceDiffer used to compare different webhook resources in order to provide a way to merge webhook registration requests. If not provided, the resource's URI will be directly compared

Directories

Path Synopsis
Package base contains functions to add and retrieve auth from context
Package base contains functions to add and retrieve auth from context
Package v2 the v2 version of plugin sdk
Package v2 the v2 version of plugin sdk

Jump to

Keyboard shortcuts

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