apphttp

package
v1.153.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

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

func Register

func Register(mux *http.ServeMux, wrap func(http.Handler) http.Handler, cfg Config)

Register mounts the routes behind wrap, the portal's authentication.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL