api
go
import "github.com/nathabonfim59/pbvex/backend/internal/api"Index
- func IsReservedPlatformPath(path, storageBasePath string) bool
- func Register(app core.App, service *deploy.Service, bcast *realtime.Broadcaster, schedulerService *scheduler.Service, storageService *storage.Service, storageBasePath string, cors CORSConfig, devDeployToken string)
- type CORSConfig
func IsReservedPlatformPath
go
func IsReservedPlatformPath(path, storageBasePath string) boolfunc Register
go
func Register(app core.App, service *deploy.Service, bcast *realtime.Broadcaster, schedulerService *scheduler.Service, storageService *storage.Service, storageBasePath string, cors CORSConfig, devDeployToken string)Register mounts the PBVex admin API and public endpoints.
type CORSConfig
CORSConfig is the per-service CORS policy.
go
type CORSConfig struct {
AllowedOrigins []string
AllowedMethods []string
AllowedHeaders []string
AllowCredentials bool
MaxAgeSeconds int
// AppURL is the canonical external origin (e.g. "https://app.example.com")
// used to construct absolute Request.url values for httpAction handlers.
// When empty, "http://localhost:8090" is used as fallback.
AppURL string
}func DefaultCORSConfig
go
func DefaultCORSConfig() CORSConfigDefaultCORSConfig returns a sensible default CORS policy.
Generated by gomarkdoc