polyfea

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NamespacePathParamName     = "namespace"
	MicrofrontendPathParamName = "microfrontend"
	PathPathParamName          = "path"
)

Variables

This section is empty.

Functions

func BasePathStrippingMiddleware

func BasePathStrippingMiddleware(next http.Handler, microFrontendClassRepository repository.PolyfeaRepository[*v1alpha1.MicroFrontendClass]) http.Handler

Types

type CacheRouteResponse added in v0.1.4

type CacheRouteResponse struct {
	v1alpha1.CacheRoute
	Prefix *string `json:"prefix"`
}

type PolyfeaApiService

type PolyfeaApiService struct {
	// contains filtered or unexported fields
}

func NewPolyfeaAPIService

func NewPolyfeaAPIService(
	webComponentRepository repository.PolyfeaRepository[*v1alpha1.WebComponent],
	microFrontendRepository repository.PolyfeaRepository[*v1alpha1.MicroFrontend],
	logger *zerolog.Logger,
) *PolyfeaApiService

func (*PolyfeaApiService) GetContextArea

func (s *PolyfeaApiService) GetContextArea(ctx context.Context, name string, path string, take int32, headers http.Header) (generated.ImplResponse, error)

func (*PolyfeaApiService) GetStaticConfig

func (s *PolyfeaApiService) GetStaticConfig(ctx context.Context, headers http.Header) (generated.ImplResponse, error)

type PolyfeaContextKey

type PolyfeaContextKey string
const PolyfeaContextKeyBasePath PolyfeaContextKey = "basePath"
const PolyfeaContextKeyMicroFrontendClass PolyfeaContextKey = "microFrontendClass"

type PolyfeaProxy

type PolyfeaProxy struct {
	// contains filtered or unexported fields
}

func NewPolyfeaProxy

func NewPolyfeaProxy(
	microfrontendClassRepository repository.PolyfeaRepository[*v1alpha1.MicroFrontendClass],
	microfrontendRepository repository.PolyfeaRepository[*v1alpha1.MicroFrontend],
	httpClient *http.Client,
	logger *zerolog.Logger,
) *PolyfeaProxy

func (*PolyfeaProxy) HandleProxy

func (p *PolyfeaProxy) HandleProxy(w http.ResponseWriter, r *http.Request)

type ProgressiveWebApplication added in v0.1.4

type ProgressiveWebApplication struct {
	// contains filtered or unexported fields
}

func NewProgressiveWebApplication added in v0.1.4

func NewProgressiveWebApplication(logger *zerolog.Logger, microFrontendRepository repository.PolyfeaRepository[*v1alpha1.MicroFrontend]) *ProgressiveWebApplication

func (*ProgressiveWebApplication) ServeAppWebManifest added in v0.1.4

func (pwa *ProgressiveWebApplication) ServeAppWebManifest(w http.ResponseWriter, r *http.Request)

func (*ProgressiveWebApplication) ServeCaching added in v0.1.4

func (pwa *ProgressiveWebApplication) ServeCaching(w http.ResponseWriter, r *http.Request)

func (*ProgressiveWebApplication) ServeRegister added in v0.1.4

func (pwa *ProgressiveWebApplication) ServeRegister(w http.ResponseWriter, r *http.Request)

func (*ProgressiveWebApplication) ServeServiceWorker added in v0.1.4

func (pwa *ProgressiveWebApplication) ServeServiceWorker(w http.ResponseWriter, r *http.Request)

type ProxyConfigResponse added in v0.1.4

type ProxyConfigResponse struct {
	PreCache []v1alpha1.PreCacheEntry `json:"precache"`
	Routes   []CacheRouteResponse     `json:"routes"`
}

type SingePageApplication

type SingePageApplication struct {
	// contains filtered or unexported fields
}

func NewSinglePageApplication

func NewSinglePageApplication(
	logger *zerolog.Logger,
) *SingePageApplication

func (*SingePageApplication) HandleBootJs

func (s *SingePageApplication) HandleBootJs(w http.ResponseWriter, r *http.Request)

func (*SingePageApplication) HandleSinglePageApplication

func (s *SingePageApplication) HandleSinglePageApplication(w http.ResponseWriter, r *http.Request)

type TemplateData

type TemplateData struct {
	BaseUri           string
	Title             string
	Nonce             string
	ExtraMeta         template.HTML
	EnablePWA         bool
	ReconcileInterval int32
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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