Documentation
¶
Index ¶
- Variables
- func AddProfileEndpoints(e *echo.Echo)
- func ArtifactMiddleware(repository shared.ArtifactRepository) func(next echo.HandlerFunc) echo.HandlerFunc
- func AssetAccessControlFactory(assetRepository shared.AssetRepository) shared.RBACMiddleware
- func AssetNameMiddleware() shared.MiddlewareFunc
- func AssetVersionMiddleware(repository shared.AssetVersionRepository) func(next echo.HandlerFunc) echo.HandlerFunc
- func BlockHandler() echo.HandlerFunc
- func CmdlineHandler() echo.HandlerFunc
- func CsafMiddleware(orgLevel bool, orgRepository shared.OrganizationRepository, ...) echo.MiddlewareFunc
- func EventMiddleware(repository shared.VulnEventRepository) func(next echo.HandlerFunc) echo.HandlerFunc
- func ExternalEntityProviderOrgSyncMiddleware(externalEntityProviderService shared.ExternalEntityProviderService) shared.MiddlewareFunc
- func ExternalEntityProviderRefreshMiddleware(externalEntityProviderService shared.ExternalEntityProviderService) shared.MiddlewareFunc
- func GoroutineHandler() echo.HandlerFunc
- func GoroutineSafeContext(c shared.Context) shared.Context
- func HeapHandler() echo.HandlerFunc
- func IndexHandler() echo.HandlerFunc
- func MultiOrganizationMiddlewareRBAC(rbacProvider shared.RBACProvider, organizationService shared.OrgService, ...) shared.MiddlewareFunc
- func MutexHandler() echo.HandlerFunc
- func NeededScope(NeededScopes []string) shared.MiddlewareFunc
- func OrganizationAccessControlMiddleware(obj shared.Object, act shared.Action) echo.MiddlewareFunc
- func ProfileHandler() echo.HandlerFunc
- func ProjectAccessControlFactory(projectRepository shared.ProjectRepository) shared.RBACMiddleware
- func ScanMiddleware(assetVersionRepository shared.AssetVersionRepository) func(next echo.HandlerFunc) echo.HandlerFunc
- func Server() *echo.Echo
- func SessionMiddleware(oryAPIClient shared.PublicClient, verifier shared.Verifier) echo.MiddlewareFunc
- func ShareMiddleware(orgRepository shared.OrganizationRepository, ...) echo.MiddlewareFunc
- func SymbolHandler() echo.HandlerFunc
- func ThreadCreateHandler() echo.HandlerFunc
- func TraceHandler() echo.HandlerFunc
- func WrapGroup(prefix string, g *echo.Group)
Constants ¶
This section is empty.
Variables ¶
var E *echo.Echo
Functions ¶
func AddProfileEndpoints ¶
AddProfileEndpoints adds several routes from package `net/http/pprof` to *echo.Echo object.
func ArtifactMiddleware ¶
func ArtifactMiddleware(repository shared.ArtifactRepository) func(next echo.HandlerFunc) echo.HandlerFunc
func AssetAccessControlFactory ¶
func AssetAccessControlFactory(assetRepository shared.AssetRepository) shared.RBACMiddleware
func AssetNameMiddleware ¶
func AssetNameMiddleware() shared.MiddlewareFunc
this middleware is used to set the project slug parameter based on an X-Asset-ID header. it is useful for reusing the projectAccessControl middleware and rely on the rbac to determine if the user has access to an specific asset
func AssetVersionMiddleware ¶
func AssetVersionMiddleware(repository shared.AssetVersionRepository) func(next echo.HandlerFunc) echo.HandlerFunc
func BlockHandler ¶
func BlockHandler() echo.HandlerFunc
BlockHandler will pass the call from /debug/pprof/block to pprof.
func CmdlineHandler ¶
func CmdlineHandler() echo.HandlerFunc
CmdlineHandler will pass the call from /debug/pprof/cmdline to pprof.
func CsafMiddleware ¶
func CsafMiddleware(orgLevel bool, orgRepository shared.OrganizationRepository, projectRepository shared.ProjectRepository, assetRepository shared.AssetRepository, assetVersionRepository shared.AssetVersionRepository, artifactRepository shared.ArtifactRepository) echo.MiddlewareFunc
func EventMiddleware ¶
func EventMiddleware(repository shared.VulnEventRepository) func(next echo.HandlerFunc) echo.HandlerFunc
func ExternalEntityProviderOrgSyncMiddleware ¶
func ExternalEntityProviderOrgSyncMiddleware(externalEntityProviderService shared.ExternalEntityProviderService) shared.MiddlewareFunc
ExternalEntityProviderOrgSyncMiddleware returns a middleware that triggers a background org sync for external entity providers. It rate-limits per user so the sync runs at most once every 15 minutes.
func ExternalEntityProviderRefreshMiddleware ¶
func ExternalEntityProviderRefreshMiddleware(externalEntityProviderService shared.ExternalEntityProviderService) shared.MiddlewareFunc
ExternalEntityProviderRefreshMiddleware returns a middleware that refreshes external-entity-provider projects for orgs that are external entities. It rate-limits per org+user combination to once every 15 minutes.
func GoroutineHandler ¶
func GoroutineHandler() echo.HandlerFunc
GoroutineHandler will pass the call from /debug/pprof/goroutine to pprof.
func HeapHandler ¶
func HeapHandler() echo.HandlerFunc
HeapHandler will pass the call from /debug/pprof/heap to pprof.
func IndexHandler ¶
func IndexHandler() echo.HandlerFunc
IndexHandler will pass the call from /debug/pprof to pprof.
func MultiOrganizationMiddlewareRBAC ¶
func MultiOrganizationMiddlewareRBAC(rbacProvider shared.RBACProvider, organizationService shared.OrgService, oauth2Config map[string]*gitlabint.GitlabOauth2Config) shared.MiddlewareFunc
func MutexHandler ¶
func MutexHandler() echo.HandlerFunc
MutexHandler will pass the call from /debug/pprof/mutex to pprof.
func NeededScope ¶
func NeededScope(NeededScopes []string) shared.MiddlewareFunc
func ProfileHandler ¶
func ProfileHandler() echo.HandlerFunc
ProfileHandler will pass the call from /debug/pprof/profile to pprof.
func ProjectAccessControlFactory ¶
func ProjectAccessControlFactory(projectRepository shared.ProjectRepository) shared.RBACMiddleware
func ScanMiddleware ¶
func ScanMiddleware(assetVersionRepository shared.AssetVersionRepository) func(next echo.HandlerFunc) echo.HandlerFunc
func SessionMiddleware ¶
func SessionMiddleware(oryAPIClient shared.PublicClient, verifier shared.Verifier) echo.MiddlewareFunc
func ShareMiddleware ¶
func ShareMiddleware(orgRepository shared.OrganizationRepository, projectRepository shared.ProjectRepository, assetRepository shared.AssetRepository, assetVersionRepository shared.AssetVersionRepository, artifactRepository shared.ArtifactRepository) echo.MiddlewareFunc
func SymbolHandler ¶
func SymbolHandler() echo.HandlerFunc
SymbolHandler will pass the call from /debug/pprof/symbol to pprof.
func ThreadCreateHandler ¶
func ThreadCreateHandler() echo.HandlerFunc
ThreadCreateHandler will pass the call from /debug/pprof/threadcreate to pprof.
func TraceHandler ¶
func TraceHandler() echo.HandlerFunc
TraceHandler will pass the call from /debug/pprof/trace to pprof.
Types ¶
This section is empty.