Skip to content

api

go
import "github.com/nathabonfim59/pbvex/backend/internal/api"

Index

func IsReservedPlatformPath

go
func IsReservedPlatformPath(path, storageBasePath string) bool

func 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() CORSConfig

DefaultCORSConfig returns a sensible default CORS policy.

Generated by gomarkdoc

Generated API reference. Source of truth is the codebase.