route

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: 25 Imported by: 0

Documentation

Overview

Package route contains useful functionality for the package route

Index

Constants

View Source
const (
	PageQueryKey         = "page"
	ItemsPerPageQueryKey = "itemsPerPage"
	SortQueryKey         = "sortBy"
	SinceQueryKey        = "since"
	UntilQueryKey        = "until"
	FetchAllQueryKey     = "all"
)
View Source
const (
	// Defines the query key value for the search.
	SearchQueryKey = "name" // NOSONAR // ignore: "Key" detected here, make sure this is not a hard-coded credential
)

Variables

View Source
var DefaultFilters = []restful.FilterFunction{
	tracing.Filter,
	metrics.Filter,
	client.AuthFilter,
	client.MetaFilter,
}

Functions

func GetListOptionsFromRequest

func GetListOptionsFromRequest(req *restful.Request) (opts metav1alpha1.ListOptions)

GetListOptionsFromRequest returns ListOptions based on a request

func GetMethods

func GetMethods(c client.Interface) []string

func GetPluginWebPath

func GetPluginWebPath(c client.Interface) string

GetPluginWebPath returns a plugin

func HandleSortQuery added in v0.3.0

func HandleSortQuery(ctx context.Context, sortBy string) []metav1alpha1.SortOptions

HandleSortQuery parse the sorting parameters in the query and return a list of sorting parameters

func HandleTimeParamInQuery added in v0.3.0

func HandleTimeParamInQuery(param string) (res *v1.Time, err error)

HandleTimeParamInQuery Processing parameters related to time filtering in query

func ListOptionsDocs

func ListOptionsDocs(bldr *restful.RouteBuilder) *restful.RouteBuilder

ListOptionsDocs adds list options query parameters to the documentation

func NewDefaultAuthCheckImplementation added in v0.2.0

func NewDefaultAuthCheckImplementation() client.AuthChecker

func NewDefaultService

func NewDefaultService(ctx context.Context) *restful.WebService

NewDefaultService default service included with metrics,pprof

func NewDocService

func NewDocService(webservices ...*restful.WebService) *restful.WebService

NewDocService go restful api doc Deprecated: use NewDocServiceWithCtx instead

func NewDocServiceWithCtx added in v0.12.0

func NewDocServiceWithCtx(ctx context.Context, webservices ...*restful.WebService) *restful.WebService

NewDocServiceWithCtx go restful api doc

func NewService

func NewService(c client.Interface, filters ...restful.FilterFunction) (*restful.WebService, error)

NewService new service from plugin client

func NoOpFilter added in v0.10.0

func NoOpFilter(req *restful.Request, res *restful.Response, chain *restful.FilterChain)

NoOpFilter creates a default no operation filter

func ParsePagerFromRequest added in v0.7.0

func ParsePagerFromRequest(req *restful.Request) metav1alpha1.Pager

ParsePagerFromRequest parse the paging params from request

func ParseTimeCursorFormRequest added in v0.7.0

func ParseTimeCursorFormRequest(req *restful.Request) *metav1alpha1.TimeCursor

ParseTimeCursorFormRequest parse cursor from request

Types

type ContextRoute added in v0.7.0

type ContextRoute interface {
	Register(ctx context.Context, ws *restful.WebService) error
}

ContextRoute is a service should implement register func to register go restful webservice

type Route

type Route interface {
	Register(ws *restful.WebService)
}

Route a service should implement register func to register go restful webservice Deprecated: replaced by ContextRoute

func NewArtifactDelete

func NewArtifactDelete(impl client.ArtifactDeleter) Route

NewArtifactDelete create a delete artifact route with plugin client

func NewArtifactGet

func NewArtifactGet(impl client.ArtifactGetter) Route

NewArtifactGet create a get artifact route with plugin client

func NewArtifactList

func NewArtifactList(impl client.ArtifactLister) Route

NewArtifactList create a list artifact route with plugin client

func NewArtifactTagDelete added in v0.7.0

func NewArtifactTagDelete(impl client.ArtifactTagDeleter) Route

NewArtifactTagDelete create a delete artifact tag route with plugin client

func NewAuthCheck added in v0.2.0

func NewAuthCheck(impl client.AuthChecker) Route

NewAuthCheck new route for auth checking

func NewAuthToken added in v0.2.0

func NewAuthToken(impl client.AuthTokenGenerator) Route

NewAuthToken new route for auth checking

func NewBlobStoreLister added in v0.2.0

func NewBlobStoreLister(impl client.BlobStoreLister) Route

NewBlobStoreLister create a get codeQuality route with plugin client

func NewCodeQualityGetter added in v0.2.0

func NewCodeQualityGetter(impl client.CodeQualityGetter) Route

NewCodeQualityGetter create a get codeQuality route with plugin client

func NewGitBranchCreator

func NewGitBranchCreator(impl client.GitBranchCreator) Route

NewGitBranchCreator create a git branch create route with plugin client

func NewGitBranchGetter

func NewGitBranchGetter(impl client.GitBranchGetter) Route

NewGitBranchGetter create a git branch getter route with plugin client

func NewGitBranchLister

func NewGitBranchLister(impl client.GitBranchLister) Route

NewGitBranchLister create a git branch lister route with plugin client

func NewGitCommitCommentCreator

func NewGitCommitCommentCreator(impl client.GitCommitCommentCreator) Route

NewGitCommitCommentCreator create git Commit comment route with plugin client

func NewGitCommitCommentLister

func NewGitCommitCommentLister(impl client.GitCommitCommentLister) Route

NewGitCommitCommentLister get git Commit comment route with plugin client

func NewGitCommitCreator added in v0.8.0

func NewGitCommitCreator(impl client.GitCommitCreator) Route

NewGitCommitCreator get a git Commit route with plugin client

func NewGitCommitGetter

func NewGitCommitGetter(impl client.GitCommitGetter) Route

NewGitCommitGetter get a git Commit route with plugin client

func NewGitCommitLister added in v0.3.0

func NewGitCommitLister(impl client.GitCommitLister) Route

NewGitCommitLister get list git Commit route with plugin client

func NewGitCommitStatusCreator

func NewGitCommitStatusCreator(impl client.GitCommitStatusCreator) Route

NewGitCommitStatusCreator create git Commit status route with plugin client

func NewGitCommitStatusLister

func NewGitCommitStatusLister(impl client.GitCommitStatusLister) Route

NewGitCommitStatusLister list git Commit status route with plugin client

func NewGitPullRequestCommentLister

func NewGitPullRequestCommentLister(impl client.GitPullRequestCommentLister) Route

NewGitPullRequestCommentLister list a git pr note route with plugin client

func NewGitPullRequestLister

func NewGitPullRequestLister(impl client.GitPullRequestHandler) Route

NewGitPullRequestLister get a git pr route with plugin client

func NewGitPullRequestNoteCreator

func NewGitPullRequestNoteCreator(impl client.GitPullRequestCommentCreator) Route

NewGitPullRequestNoteCreator create a git pr note route with plugin client

func NewGitPullRequestNoteUpdater added in v0.7.0

func NewGitPullRequestNoteUpdater(impl client.GitPullRequestCommentUpdater) Route

NewGitPullRequestNoteUpdater updates a git pr note route with plugin client

func NewGitRepoFileCreator

func NewGitRepoFileCreator(impl client.GitRepoFileCreator) Route

NewGitRepoFileCreator create a git GitRepoFile route with plugin client

func NewGitRepoFileGetter

func NewGitRepoFileGetter(impl client.GitRepoFileGetter) Route

NewGitRepoFileGetter create a git GitRepoFile route with plugin client

func NewGitRepositoryFileTreeGetter added in v0.7.0

func NewGitRepositoryFileTreeGetter(impl client.GitRepositoryFileTreeGetter) Route

NewGitRepositoryFileTreeGetter get a git repo route with plugin client

func NewGitRepositoryGetter

func NewGitRepositoryGetter(impl client.GitRepositoryGetter) Route

NewGitRepositoryGetter get a git repo route with plugin client

func NewGitRepositoryLister

func NewGitRepositoryLister(impl client.GitRepositoryLister) Route

NewGitRepositoryLister get a git repo route with plugin client

func NewGitRepositoryTagGetter added in v0.7.0

func NewGitRepositoryTagGetter(impl client.GitRepositoryTagGetter) Route

NewGitRepositoryTagGetter get a git repo route with plugin client

func NewGitRepositoryTagLister added in v0.7.0

func NewGitRepositoryTagLister(impl client.GitRepositoryTagLister) Route

NewGitRepositoryTagLister get a git repository tag route with plugin client

func NewHealthz

func NewHealthz(ctx context.Context) Route

NewHealthz basic health check service

func NewImageConifgGetter added in v0.3.0

func NewImageConifgGetter(impl client.ImageConfigGetter) Route

NewImageConifgGetter create a get image config route with plugin client

func NewInitializer added in v0.7.0

func NewInitializer(impl client.Initializer) Route

NewInitializer create a route for the tool service initializer

func NewIssueAttributeGet added in v0.3.0

func NewIssueAttributeGet(impl client.IssueAttributeGetter) Route

NewIssueAttributeGet create a get issue attribute route with plugin client

func NewIssueBranchCreate added in v0.3.0

func NewIssueBranchCreate(impl client.IssueBranchCreator) Route

NewIssueBranchCreate create a create issue relate branch route with plugin client

func NewIssueBranchDelete added in v0.3.0

func NewIssueBranchDelete(impl client.IssueBranchDeleter) Route

NewIssueBranchDelete create a create issue relate branch route with plugin client

func NewIssueBranchList added in v0.3.0

func NewIssueBranchList(impl client.IssueBranchLister) Route

NewIssueBranchList create a list issue branch route with plugin client

func NewIssueGet added in v0.3.0

func NewIssueGet(impl client.IssueGetter) Route

NewIssueGet create a get issue route with plugin client

func NewIssueList added in v0.3.0

func NewIssueList(impl client.IssueLister) Route

NewIssueList create a list issue route with plugin client

func NewLivenessCheck added in v0.7.0

func NewLivenessCheck(impl client.LivenessChecker) Route

NewLivenessCheck create a liveness check route with plugin client

func NewPluginMethodUnsupport added in v0.3.0

func NewPluginMethodUnsupport() Route

NewPluginMethodUnsupport return an error with plugin client

func NewProjectArtifactDeleter added in v0.9.0

func NewProjectArtifactDeleter(impl client.ProjectArtifactDeleter) Route

NewProjectArtifactDeleter create a delete artifact route with plugin client

func NewProjectArtifactFileGet added in v0.9.0

func NewProjectArtifactFileGet(impl client.ProjectArtifactFileGetter) Route

NewProjectArtifactFileGet create a get or download artifact route with plugin client

func NewProjectArtifactGet added in v0.9.0

func NewProjectArtifactGet(impl client.ProjectArtifactGetter) Route

NewProjectArtifactGet create a get or download artifact route with plugin client

func NewProjectArtifactList added in v0.9.0

func NewProjectArtifactList(impl client.ProjectArtifactLister) Route

NewProjectArtifactList create a list project artifacts route with plugin client

func NewProjectArtifactUploader added in v0.9.0

func NewProjectArtifactUploader(impl client.ProjectArtifactUploader) Route

NewProjectArtifactUploader create an upload artifact route with plugin client

func NewProjectCreate

func NewProjectCreate(impl client.ProjectCreator) Route

NewProjectCreate create a create project route with plugin client

func NewProjectGet

func NewProjectGet(impl client.ProjectGetter) Route

NewProjectGet create a get project route with plugin client

func NewProjectList

func NewProjectList(impl client.ProjectLister) Route

NewProjectList create a list project route with plugin client

func NewProjectUserList added in v0.3.0

func NewProjectUserList(impl client.ProjectUserLister) Route

NewProjectUserList create a list user route with plugin client

func NewRepositoryList

func NewRepositoryList(impl client.RepositoryLister) Route

NewRepositoryList create a list repository route with plugin client

func NewScanImage

func NewScanImage(impl client.ScanImage) Route

NewScanImage create a scan image route with plugin client

func NewSystem

func NewSystem(ctx context.Context) Route

func NewTestCaseExecutionCreator added in v0.7.0

func NewTestCaseExecutionCreator(impl client.TestCaseExecutionCreator) Route

NewTestCaseExecutionCreator creates a creating testCaseExecution route with plugin client

func NewTestCaseExecutionLister added in v0.7.0

func NewTestCaseExecutionLister(impl client.TestCaseExecutionLister) Route

NewTestCaseExecutionLister creates a list testCaseExecution route with plugin client

func NewTestCaseGetter added in v0.7.0

func NewTestCaseGetter(impl client.TestCaseGetter) Route

NewTestCaseGetter creates a list testCase route with plugin client

func NewTestCaseLister added in v0.7.0

func NewTestCaseLister(impl client.TestCaseLister) Route

NewTestCaseLister creates a list testCase route with plugin client

func NewTestModuleLister added in v0.7.0

func NewTestModuleLister(impl client.TestModuleLister) Route

NewTestModuleLister creates a list testModule route with plugin client

func NewTestPlanGetter added in v0.7.0

func NewTestPlanGetter(impl client.TestPlanGetter) Route

NewTestPlanGetter creates a list testPlan route with plugin client

func NewTestPlanList added in v0.7.0

func NewTestPlanList(impl client.TestPlanLister) Route

NewTestPlanList creates a list testPlan route with plugin client

func NewToolMetadata added in v0.9.0

func NewToolMetadata(impl client.ToolMetadataGetter) Route

NewToolMetadata create a route for the tool service toolMetadata

Jump to

Keyboard shortcuts

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