mirror of
https://github.com/grafana/grafana.git
synced 2025-07-29 17:02:20 +08:00

* Spike: Extras * Attempt to wire it up * Hack * Fix issue with jobs * Wire more things up * Fix more wiring stuff * Remove webhook secret key from main registration * Move secret encryption also outside register * Add TODOs in code * Add more explanations * Move connectors to different package * Move pull request job into webhooks * Separate registration * Remove duplicate files * Fix missing function * Extract webhook repository logic out of the core github repository * Use status patcher in webhook connector * Fix change in go mod * Change hooks signature * Remove TODOs * Remove Webhook methos from go-git * Remove leftover * Fix mistake in OpenAPI spec * Fix some tests * Fix some issues * Fix linting
24 lines
850 B
Go
24 lines
850 B
Go
package provisioning
|
|
|
|
import (
|
|
"context"
|
|
|
|
provisioning "github.com/grafana/grafana/pkg/apis/provisioning/v0alpha1"
|
|
"github.com/grafana/grafana/pkg/registry/apis/provisioning/jobs"
|
|
"github.com/grafana/grafana/pkg/registry/apis/provisioning/repository"
|
|
"k8s.io/apiserver/pkg/authorization/authorizer"
|
|
"k8s.io/apiserver/pkg/registry/rest"
|
|
"k8s.io/kube-openapi/pkg/spec3"
|
|
)
|
|
|
|
type Extra interface {
|
|
Authorize(ctx context.Context, a authorizer.Attributes) (decision authorizer.Decision, reason string, err error)
|
|
Mutate(ctx context.Context, r *provisioning.Repository) error
|
|
UpdateStorage(storage map[string]rest.Storage) error
|
|
PostProcessOpenAPI(oas *spec3.OpenAPI) error
|
|
GetJobWorkers() []jobs.Worker
|
|
AsRepository(ctx context.Context, r *provisioning.Repository) (repository.Repository, error)
|
|
}
|
|
|
|
type ExtraBuilder func(b *APIBuilder) Extra
|