Documentation
¶
Index ¶
Constants ¶
View Source
const OneMonth = "720h"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientConfig ¶
type Handlers ¶
type Handlers struct {
ServerConfig
Client *kotsclient.VendorV3Client
App *types.App
Channel *types.Channel
}
func NewHandlers ¶
func NewHandlers(config ServerConfig) (*Handlers, error)
func (*Handlers) ClientConfig ¶
type ProxyPathFunc ¶
type ServerConfig ¶
type ServerConfig struct {
GinAddress string `env:"GIN_ADDRESS"`
GitVersion string `env:"GIT_VERSION"`
// StaticDir defines where frontend assets should be served from
// This is designed for production builds where the Gin server serves both the
// frontend routes from /* and the api routes from /api/*
StaticDir string `env:"STATIC_DIR"`
// ProxyFrontend specifies a local URL to use for frontend assets
// this should only be used when developing locally
ProxyFrontend string `env:"PROXY_FRONTEND"`
ProxyFrontendURL *url.URL
// frontend / UI settings
Title string `json:"title" env:"FORM_TITLE"`
IntroMarkdown string `json:"introMarkdown" env:"FORM_INTRO_MARKDOWN"`
InstallMarkdown string `json:"installMarkdown" env:"FORM_INSTALL_MARKDOWN"`
// License creation options
ReplicatedAPIOrigin string `env:"REPLICATED_API_ORIGIN"`
ReplicatedAPIKey string `env:"REPLICATED_API_TOKEN"`
ReplicatedApp string `env:"REPLICATED_APP"`
LicenseDuration string `env:"LICENSE_EXPIRE_DURATION"`
LicenseExpirationDuration time.Duration
ReplicatedChannel string `env:"LICENSE_CHANNEL"`
EnableGitops bool `env:"LICENSE_ENABLE_GITOPS"`
EnableAirgap bool `env:"LICENSE_ENABLE_AIRGAP"`
EnableSnapshots bool `env:"LICENSE_ENABLE_SNAPSHOTS"`
LicenseType bool `env:"LICENSE_TYPE"`
NotificationWebhookURL string `env:"NOTIFICATION_WEBHOOK_URL"`
}
ServerConfig is the environment configuration for the backend process it includes the client config which is served to the frontend on page load
func DefaultConfig ¶
func DefaultConfig() ServerConfig
func LoadConfig ¶
func LoadConfig() (*ServerConfig, error)
type SubmitRequest ¶
type WebhookNotificationPayload ¶
type WebhookNotificationPayload struct {
SubmitRequest `json:"inline"`
CustomerID string `json:"customerId"`
Created time.Time `json:"created"`
}
Click to show internal directories.
Click to hide internal directories.