Documentation ¶
Index ¶
- Variables
- func AuthToken(ctx context.Context) string
- func AuthenticationMiddleware(next http.Handler) http.Handler
- func WithAuthToken(ctx context.Context, t string) context.Context
- type APIRouter
- func (a *APIRouter) GetApplication(w http.ResponseWriter, r *http.Request)
- func (a *APIRouter) GetApplicationDetails(w http.ResponseWriter, r *http.Request)
- func (a *APIRouter) GetApplicationHistory(w http.ResponseWriter, r *http.Request)
- func (a *APIRouter) GetPipelines(w http.ResponseWriter, r *http.Request)
- func (a *APIRouter) ListApplications(w http.ResponseWriter, r *http.Request)
- type RevisionMeta
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSecretRef = types.NamespacedName{
Name: "pipelines-app-gitops",
Namespace: "pipelines-app-delivery",
}
DefaultSecretRef is the name looked up if none is provided in the URL.
Functions ¶
func AuthenticationMiddleware ¶
AuthenticationMiddleware wraps an http.Handler and checks for the presence of an 'Authorization' header with a bearer token.
This token is placed into the context, and is accessible via the AuthToken function.
No attempt to validate the actual token is made.
Types ¶
type APIRouter ¶
type APIRouter struct { *httprouter.Router // contains filtered or unexported fields }
APIRouter is an HTTP API for accessing app configurations.
func NewRouter ¶
func NewRouter(c git.ClientFactory, s secrets.SecretGetter, kc ctrlclient.Client) *APIRouter
NewRouter creates and returns a new APIRouter.
func (*APIRouter) GetApplication ¶
func (a *APIRouter) GetApplication(w http.ResponseWriter, r *http.Request)
GetApplication fetches an application within a specific environment.
Expects the
func (*APIRouter) GetApplicationDetails ¶
func (a *APIRouter) GetApplicationDetails(w http.ResponseWriter, r *http.Request)
func (*APIRouter) GetApplicationHistory ¶
func (a *APIRouter) GetApplicationHistory(w http.ResponseWriter, r *http.Request)
func (*APIRouter) GetPipelines ¶
func (a *APIRouter) GetPipelines(w http.ResponseWriter, r *http.Request)
GetPipelines fetches and returns the pipeline body.
func (*APIRouter) ListApplications ¶
func (a *APIRouter) ListApplications(w http.ResponseWriter, r *http.Request)
type RevisionMeta ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.