Documentation ¶
Overview ¶
Package route contains useful functionality for the package route
Index ¶
- Constants
- Variables
- func GetListOptionsFromRequest(req *restful.Request) (opts metav1alpha1.ListOptions)
- func GetMethods(c client.Interface) []string
- func GetPluginWebPath(c client.Interface) string
- func HandleSortQuery(ctx context.Context, sortBy string) []metav1alpha1.SortOptions
- func HandleTimeParamInQuery(param string) (res *v1.Time, err error)
- func ListOptionsDocs(bldr *restful.RouteBuilder) *restful.RouteBuilder
- func NewDefaultAuthCheckImplementation() client.AuthChecker
- func NewDefaultService(ctx context.Context) *restful.WebService
- func NewDocService(webservices ...*restful.WebService) *restful.WebService
- func NewDocServiceWithCtx(ctx context.Context, webservices ...*restful.WebService) *restful.WebService
- func NewService(c client.Interface, filters ...restful.FilterFunction) (*restful.WebService, error)
- func NoOpFilter(req *restful.Request, res *restful.Response, chain *restful.FilterChain)
- func ParsePagerFromRequest(req *restful.Request) metav1alpha1.Pager
- func ParseTimeCursorFormRequest(req *restful.Request) *metav1alpha1.TimeCursor
- type ContextRoute
- type Route
- func NewArtifactDelete(impl client.ArtifactDeleter) Route
- func NewArtifactGet(impl client.ArtifactGetter) Route
- func NewArtifactList(impl client.ArtifactLister) Route
- func NewArtifactTagDelete(impl client.ArtifactTagDeleter) Route
- func NewAuthCheck(impl client.AuthChecker) Route
- func NewAuthToken(impl client.AuthTokenGenerator) Route
- func NewBlobStoreLister(impl client.BlobStoreLister) Route
- func NewCodeQualityGetter(impl client.CodeQualityGetter) Route
- func NewGitBranchCreator(impl client.GitBranchCreator) Route
- func NewGitBranchGetter(impl client.GitBranchGetter) Route
- func NewGitBranchLister(impl client.GitBranchLister) Route
- func NewGitCommitCommentCreator(impl client.GitCommitCommentCreator) Route
- func NewGitCommitCommentLister(impl client.GitCommitCommentLister) Route
- func NewGitCommitCreator(impl client.GitCommitCreator) Route
- func NewGitCommitGetter(impl client.GitCommitGetter) Route
- func NewGitCommitLister(impl client.GitCommitLister) Route
- func NewGitCommitStatusCreator(impl client.GitCommitStatusCreator) Route
- func NewGitCommitStatusLister(impl client.GitCommitStatusLister) Route
- func NewGitPullRequestCommentLister(impl client.GitPullRequestCommentLister) Route
- func NewGitPullRequestLister(impl client.GitPullRequestHandler) Route
- func NewGitPullRequestNoteCreator(impl client.GitPullRequestCommentCreator) Route
- func NewGitPullRequestNoteUpdater(impl client.GitPullRequestCommentUpdater) Route
- func NewGitRepoFileCreator(impl client.GitRepoFileCreator) Route
- func NewGitRepoFileGetter(impl client.GitRepoFileGetter) Route
- func NewGitRepositoryFileTreeGetter(impl client.GitRepositoryFileTreeGetter) Route
- func NewGitRepositoryGetter(impl client.GitRepositoryGetter) Route
- func NewGitRepositoryLister(impl client.GitRepositoryLister) Route
- func NewGitRepositoryTagGetter(impl client.GitRepositoryTagGetter) Route
- func NewGitRepositoryTagLister(impl client.GitRepositoryTagLister) Route
- func NewHealthz(ctx context.Context) Route
- func NewImageConifgGetter(impl client.ImageConfigGetter) Route
- func NewInitializer(impl client.Initializer) Route
- func NewIssueAttributeGet(impl client.IssueAttributeGetter) Route
- func NewIssueBranchCreate(impl client.IssueBranchCreator) Route
- func NewIssueBranchDelete(impl client.IssueBranchDeleter) Route
- func NewIssueBranchList(impl client.IssueBranchLister) Route
- func NewIssueGet(impl client.IssueGetter) Route
- func NewIssueList(impl client.IssueLister) Route
- func NewLivenessCheck(impl client.LivenessChecker) Route
- func NewPluginMethodUnsupport() Route
- func NewProjectArtifactDeleter(impl client.ProjectArtifactDeleter) Route
- func NewProjectArtifactFileGet(impl client.ProjectArtifactFileGetter) Route
- func NewProjectArtifactGet(impl client.ProjectArtifactGetter) Route
- func NewProjectArtifactList(impl client.ProjectArtifactLister) Route
- func NewProjectArtifactUploader(impl client.ProjectArtifactUploader) Route
- func NewProjectCreate(impl client.ProjectCreator) Route
- func NewProjectGet(impl client.ProjectGetter) Route
- func NewProjectList(impl client.ProjectLister) Route
- func NewProjectUserList(impl client.ProjectUserLister) Route
- func NewRepositoryList(impl client.RepositoryLister) Route
- func NewScanImage(impl client.ScanImage) Route
- func NewSystem(ctx context.Context) Route
- func NewTestCaseExecutionCreator(impl client.TestCaseExecutionCreator) Route
- func NewTestCaseExecutionLister(impl client.TestCaseExecutionLister) Route
- func NewTestCaseGetter(impl client.TestCaseGetter) Route
- func NewTestCaseLister(impl client.TestCaseLister) Route
- func NewTestModuleLister(impl client.TestModuleLister) Route
- func NewTestPlanGetter(impl client.TestPlanGetter) Route
- func NewTestPlanList(impl client.TestPlanLister) Route
- func NewToolMetadata(impl client.ToolMetadataGetter) Route
Constants ¶
const ( PageQueryKey = "page" ItemsPerPageQueryKey = "itemsPerPage" SortQueryKey = "sortBy" SinceQueryKey = "since" UntilQueryKey = "until" FetchAllQueryKey = "all" )
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 ¶
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 GetPluginWebPath ¶
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
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 ¶
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 ¶
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
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 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 ¶
NewScanImage create a scan image route with plugin client
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
Source Files ¶
- artifact.go
- auth.go
- auth_token.go
- blobstore.go
- code_quality.go
- gitbranch.go
- gitcommit.go
- gitcommitcomment.go
- gitcommitstatus.go
- gitpullrequest.go
- gitrepofile.go
- gitrepofiletree.go
- gitrepository.go
- gitrepotag.go
- healthz.go
- helper.go
- issue.go
- issue_branch.go
- options.go
- plugin.go
- project.go
- project_user.go
- repository.go
- route.go
- system.go
- testcase.go
- testcaseexecution.go
- testmodule.go
- testplan.go
- tool.go