Documentation
¶
Overview ¶
Package edge holds the HTTP handler of the edge manifest, authenticated by the edge credential.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ManifestHandler ¶
func ManifestHandler(deps ManifestDeps) app.HandlerFunc
ManifestHandler serves the private Edge Manifest contract. It does not use normal user authentication and does not emit the application's JSON envelope. A failed credential and an unknown user token deliberately share a 404 reply.
@Summary Get Edge subscription manifest @Tags edge @Produce json @Param token query string true "Subscription token" @Param Authorization header string true "PPanel Edge HMAC credential" @Param X-Request-ID header string true "One-time UUID bound into the HMAC" @Success 200 {object} dto.EdgeManifestResponse @Failure 404 {string} string @Router /api/edge/v1/manifest [get]
Types ¶
type ManifestBuilder ¶ added in v1.21.0
type ManifestBuilder interface {
EdgeManifest(ctx context.Context, token string) (*dto.EdgeManifestResponse, error)
}
ManifestBuilder is the part of the network facade ManifestHandler calls.
type ManifestDeps ¶
type ManifestDeps struct {
Network ManifestBuilder
Redis *redis.Client
Config func() config.EdgeSubscribeConfig
}