Documentation
¶
Overview ¶
Package apphttp serves applications on the portal (#2411, #2412): the listing, an application's parts, releases and what each changed, and the actions the manage_application tool takes, through the same service and under the same rules. Everyone signed in reads; an application's owner and administrators edit it; administrators release, roll back, export and import. Every write is audited as a manage_application call from the portal.
Index ¶
Constants ¶
View Source
const Prefix = "/api/v1/portal/applications"
Prefix opens every route.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bundles ¶
type Bundles interface {
Bundle(ctx context.Context, actor application.Actor, ref string, release int) (*appbundle.Bundle, error)
ImportBundle(ctx context.Context, actor application.Actor, bundle *appbundle.Bundle, mapping map[string]string) (*appbundle.Imported, error)
}
Bundles assembles a release's bundle and imports one.
type Config ¶
type Config struct {
Service *appsvc.Service
// Bundles exports and imports; nil refuses both. The portal downloads a
// bundle and uploads one, where the tool writes and reads a managed
// resource.
Bundles Bundles
// Actor is who made a request, nil for none.
Actor func(r *http.Request) *application.Actor
Audit middleware.AuditLogger
}
Config is what the routes use.
Click to show internal directories.
Click to hide internal directories.