config

package
v1.10.21 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OfficialMarketplaceURL is Miabi's hosted template catalog and the default for
	// MIABI_MARKETPLACE_URL. Exported because it is also the fallback an unlicensed
	// install is held to when it configures a custom marketplace.
	OfficialMarketplaceURL = "https://marketplace.miabi.io"
)

Variables

View Source
var (
	Version   = "dev"
	CommitID  = "unknown"
	BuildDate = "unknown"
)

Build information, overridable at link time via -ldflags.

View Source
var DefaultGomaImage = bundled.GatewayImage()

DefaultGomaImage is the gateway image this build provisions and is tested against.

View Source
var ErrRegistryHostInvalid = errors.New("invalid registry host")

ErrRegistryHostInvalid is returned when a registry hostname is not usable. The message names no variable: the same rule applies to a host derived from the external base domain, which is not MIABI_REGISTRY_HOST's fault.

Functions

func HasBuildDate added in v1.9.1

func HasBuildDate() bool

HasBuildDate reports whether a build date was linked in.

func NormalizeRegistryHost added in v1.6.8

func NormalizeRegistryHost(raw string) (string, error)

NormalizeRegistryHost validates a registry hostname and returns its canonical form; empty means "unset" and the caller falls back to registry.<external-base-domain>. It is a security boundary: a host carrying a scheme, path or wildcard matches nothing and is inert.

Types

type Config

type Config struct {
	Database DatabaseConfig
	Redis    RedisConfig

	Env     string
	Port    int
	DevMode bool

	// LogLevel is MIABI_LOG_LEVEL: debug | info | warn | error | off. Empty follows
	// the environment — debug in dev, info otherwise — which is what it did before
	// this was configurable.
	LogLevel string

	JWTSecret     string
	EncryptionKey string

	AdminEmail           string
	AdminPassword        string
	PasswordResetEnabled bool

	OpenAPIDocs          bool
	BillingAPIEnabled    bool
	BillingHardAfterDays int
	MetricsEnabled       bool
	UpdateCheck          bool
	// PlanEnforcement gates per-workspace resource quotas. On by default; set it
	// false and all plan limits and capabilities become unlimited/allowed.
	PlanEnforcement bool
	// SecurityEnforcement guards platform-managed resources from disruptive raw Docker actions.
	// When true (default), a platform admin cannot stop or remove a Miabi-managed container from
	// the node containers list. Setting it false is a break-glass escape hatch.
	SecurityEnforcement bool

	// GPU management. GPUEnabled is the master off-switch (no probing, no UI). NvidiaRuntime is
	// the runtime name signalling the NVIDIA Container Toolkit. GPUProbeImage runs `nvidia-smi`;
	// point it at a mirror when air-gapped. GPUInventoryMinutes is the device rescan interval.
	GPUEnabled          bool
	NvidiaRuntime       string
	GPUProbeImage       string
	GPUInventoryMinutes int

	// LicenseFile, when set, is a path to a signed license token auto-installed on
	// boot (air-gapped / IaC friendly: drop the file and restart). A newer
	// DB-installed license still takes precedence.
	LicenseFile           string
	MetricsScrapeSeconds  int
	MetricsRetentionHours int

	CORSOrigins string
	// TrustedProxies are the CIDRs or addresses allowed to set X-Forwarded-For and X-Real-IP
	// (MIABI_TRUSTED_PROXIES, comma-separated). Empty trusts those headers from any peer.
	TrustedProxies []string
	AppWebURL      string
	ApiBaseURL     string
	// PasskeysEnabled is the kill switch for passkey sign-in (MIABI_PASSKEYS_ENABLED, default true). Off
	// refuses passkey sign-in and enrolment but keeps stored passkeys, so turning it back on restores them.
	PasskeysEnabled bool
	// PasskeyRPID overrides the WebAuthn relying party id, which defaults to the host of the public URL.
	// PasskeyOrigins lists extra origins allowed to use this server's passkeys. Passkeys are off
	// without a public URL (MIABI_WEB_URL or MIABI_API_URL), since a passkey is bound to an origin.
	PasskeyRPID    string
	PasskeyOrigins []string
	// LoginTokenTTLHours is the default lifetime of a CLI "login command" token
	// (the OpenShift-style short-lived personal API token). LoginTokenMaxTTLHours
	// is the hard ceiling a caller may request. Kept short by design.
	LoginTokenTTLHours    int
	LoginTokenMaxTTLHours int
	// AppName is the product name shown in platform notification emails.
	AppName string
	// SystemSMTP is the SMTP server Miabi uses to send its own platform
	// notification emails (password resets, workspace invitations, welcomes).
	// When unset (no host/from), those emails are silently skipped.
	SystemSMTP SystemSMTPConfig
	// WebDir overrides where the web UI is served from. The UI is normally embedded in the binary
	// (internal/web); MIABI_WEB_DIR serves it from disk instead, for frontend development or a
	// custom build without recompiling. Empty means use the embedded UI.
	WebDir string

	// AllowDowngrade lets the server boot even when the binary's version is
	// older than the version recorded in the database. Off by default.
	AllowDowngrade bool

	// WebhookAllowPrivateTargets permits outbound webhooks to RFC1918/ULA
	// private addresses (homelab/LAN targets). Loopback and link-local
	// (incl. cloud metadata) are always blocked regardless. Off by default.
	WebhookAllowPrivateTargets bool

	WorkerConcurrency int
	WorkerMaxRetries  int
	// WorkerHealthEnabled serves /healthz and /readyz from a dedicated worker on
	// MIABI_PORT. Turn it off to run a worker beside the server on one host, where
	// both would otherwise bind the same port.
	WorkerHealthEnabled bool

	// DockerHost is the Docker engine endpoint (informational; the SDK reads
	// DOCKER_HOST from the environment via FromEnv).
	DockerHost string

	// MarketplaceURL is where Miabi syncs official and community templates from. The default is
	// the hosted registry, marketplace.miabi.io, which tracks the catalog repo's main branch. A
	// value ending in .json is fetched directly (a static export.json from git or a CDN); anything
	// else is treated as a server base URL and gets /v1/export appended. Set it explicitly empty to
	// disable syncing (offline / air-gapped kill switch).
	MarketplaceURL string

	// GomaProviderDir is Goma Gateway's watched file-provider directory. When
	// set, Miabi writes route files there; otherwise an in-memory proxy is
	// used (dev). TLS/ACME is configured on Goma itself.
	GomaProviderDir string

	// DeletionGraceDays is how many days an admin-scheduled account deletion waits
	// before the account and all its data are permanently purged. Default 7.
	DeletionGraceDays int

	// DNSReconcileMinutes is the cadence of the managed-DNS reconcile sweep, which
	// re-asserts ledgered records and refreshes provider status. Default 30.
	DNSReconcileMinutes int

	// StorageUsageEnabled runs the sweep that measures real volume disk usage
	// (docker system df) and caches it. Default on; off shows declared sizes only.
	StorageUsageEnabled bool
	// StorageUsageMinutes is that sweep's cadence. Default 30.
	StorageUsageMinutes int

	DatabaseSizeCron string

	// AnalyticsEnabled runs the Workspace Analytics consumer: it reads Goma's
	// per-request event stream and rolls it up into minute buckets. Default on.
	AnalyticsEnabled bool
	// AnalyticsStream is the Redis stream Goma writes request events to (its
	// GOMA_ANALYTICS_STREAM). Must match the gateway's setting.
	AnalyticsStream string
	// AnalyticsFlushSeconds is how often the consumer persists closed buckets.
	AnalyticsFlushSeconds int
	// AnalyticsRetentionDays bounds how long rollups are kept before pruning.
	AnalyticsRetentionDays int
	// AnalyticsLiveWindowSeconds is how long a visitor keeps counting as "live" after their last
	// request — the gap between requests, not the length of the visit, which is why 5m is the norm.
	// Keep it in step with the gateway's monitoring.visitorTTL or the two counts will disagree.
	AnalyticsLiveWindowSeconds int

	// ACMEDirectoryURL is the ACME CA directory Miabi issues managed (DNS-01)
	// certificates from. Empty = Let's Encrypt production. Point it at the LE
	// staging directory for testing so issuance never burns prod rate limits.
	ACMEDirectoryURL string
	// CertRenewDays is how many days before expiry a managed certificate is
	// auto-renewed. Default 30.
	CertRenewDays int

	// SecurityPolicies is the Security Center kill switch: false ignores stored policies (Community
	// behaviour) without deleting them. MIABI_SECURITY_POLICIES.
	SecurityPolicies bool
	// AdminUnlock is Community's switch for the admin console unlock (TOTP, default timings). The
	// Enterprise admin_access policy supersedes it. MIABI_ADMIN_UNLOCK.
	AdminUnlock bool
	// KeyAutoRotate enables the per-workspace encryption-key auto-rotation cron;
	// KeyRotateMonths is how old an active key may get before it is rotated
	// (re-encrypting the workspace's secrets). Off by default.
	KeyAutoRotate   bool
	KeyRotateMonths int

	// HostProcPath is the procfs directory used to read real host CPU/memory for the local node.
	// Defaults to /host/proc (the usual read-only bind); if absent the local /proc is used, which
	// already reflects host stats. Host metrics are unavailable when neither is readable.
	HostProcPath string
	// NodeStatsAgent uses the host CPU/memory node agents push (MIABI_NODE_STATS_AGENT, default on).
	// Off, every remote node is measured by a helper container as before.
	NodeStatsAgent bool
	// MetadataGuard keeps containers on every node off the cloud metadata service with an
	// nftables table (MIABI_METADATA_GUARD, default off).
	// Off, the guard and its table are removed from each node.
	MetadataGuard bool

	// ProxyNetwork is the shared Docker network that Goma Gateway and all
	// managed app containers join so the proxy can reach app backends. Goma must
	// also be attached to this network. Empty until startup resolves it with
	// node.ResolveAppNetwork when MIABI_PROXY_NETWORK is unset.
	ProxyNetwork string

	// InternalNetwork is the PRIVATE Docker network the platform's own components share — the control
	// plane, Postgres, Redis and the gateway. Helper containers the control plane runs out of process
	// (the platform backup above all) must join it to reach the database by name.
	//
	// EMPTY on a Compose install, which has no such network: every consumer then behaves exactly as it
	// did before the split, with ProxyNetwork as the only fabric. Set by the managed installer.
	InternalNetwork string

	// APIKeyScopeEnforcement is how strictly API-key scopes are checked: off, warn or enforce. Empty
	// means enforce, except on an install upgraded with API keys already in use (see
	// middlewares.ResolveScopeMode).
	APIKeyScopeEnforcement string

	// ControlURL is the public base URL remote nodes reach the control plane at
	// (e.g. https://miabi.example.com). Used to point a node's own Goma Gateway
	// at the HTTP-provider endpoint. Falls back to ApiBaseURL when unset.
	ControlURL string
	// RegistrationEnabled opens self-service sign-up (MIABI_REGISTRATION_ENABLED,
	// default false). Fixed at boot rather than stored, like PasswordResetEnabled:
	// it is the switch that lets a stranger create an account, so opening it takes
	// control of the deployment, not of an admin session.
	RegistrationEnabled bool
	// The policy that applies once sign-up is open stays admin-managed. Each is
	// EMPTY when the operator has not set the variable; a set value pins the
	// setting and is re-applied on every boot, so an IaC install stays
	// authoritative.
	//
	//   MIABI_REQUIRE_EMAIL_VERIFICATION   "true" | "false"
	//   MIABI_ALLOWED_SIGNUP_DOMAINS       comma-separated, e.g. "acme.com,acme.co.uk"
	RequireEmailVerification string
	AllowedSignupDomains     string
	// Who may create workspaces and whether invitees can sign up, pinned the same way:
	//
	//   MIABI_WORKSPACE_CREATION           "anyone" | "except_invited" | "admins_only"
	//   MIABI_INVITATION_SIGNUP_ENABLED    "true" | "false"
	WorkspaceCreation       string
	InvitationSignupEnabled string

	// ControlManagerMode pins the control manager's mode, MIABI_CONTROL_MANAGER_MODE ("observe" | "off"). Empty
	// leaves it to Platform Settings.
	ControlManagerMode string

	// Telemetry sends the anonymous startup/daily event, MIABI_TELEMETRY (default true). Environment only;
	// a truthy DO_NOT_TRACK also turns it off.
	Telemetry bool

	// ExternalBaseDomain is the default cluster's wildcard domain for one-click external access (e.g.
	// "apps.example.com", DNS *.apps.example.com). When set it pins that cluster's external domain on
	// every boot; leave empty to manage it from the cluster page. Other clusters set their own there.
	ExternalBaseDomain string
	// ExternalBaseProvider names the Goma certManager provider for the default cluster's generated
	// URLs ("" = the gateway default). When set it pins that field, like ExternalBaseDomain.
	ExternalBaseProvider string
	// NodeGatewayImage is the Goma Gateway image deployed on edge-gateway nodes.
	NodeGatewayImage string
	// RunnerImage is the miabi-runner image shown in the runner enrollment command.
	RunnerImage string
	// AcmeEmail is the contact address a node gateway's ACME (Let's Encrypt)
	// certificate manager registers with.
	AcmeEmail string
	// GomaConfigEncryptionKey, when set, is injected into every edge gateway as
	// GOMA_CONFIG_ENCRYPTION_KEY so Goma encrypts sensitive parts of its config
	// (middleware rules and TLS material) at rest. Empty = no config encryption.
	GomaConfigEncryptionKey string

	// Registry is the built-in Docker registry config. When any field is set it is
	// authoritative on boot (overriding the admin Settings UI), mirroring the
	// ExternalBaseDomain convention; otherwise manage it from Settings.
	Registry RegistryConfig

	// PlatformBackup configures disaster-recovery backups from the environment,
	// so a freshly installed or freshly restored host is already pointed at its
	// bucket before anyone opens the UI.
	PlatformBackup PlatformBackupConfig

	LogStore LogStoreConfig

	// ContainerGrantsEnabled allows attaching capabilities and host devices to an
	// application (MIABI_CONTAINER_GRANTS_ENABLED, default false)
	ContainerGrantsEnabled bool

	// HostPortMin/HostPortMax bound the host ports an admin may approve for port
	// bindings, and the pool auto-allocation draws from. Defaults allow the full
	// non-privileged range; privileged workspaces may request any port.
	HostPortMin int
	HostPortMax int

	// Database port-forward. ForwardBindAddr is the interface ephemeral listeners bind to (default
	// 127.0.0.1); ForwardAdvertiseHost is the host shown to users; ForwardRelayImage is the socat
	// relay image; ForwardTTLMinutes is how long a session stays open before it is reaped.
	ForwardBindAddr      string
	ForwardAdvertiseHost string
	ForwardRelayImage    string
	ForwardTTLMinutes    int

	// RestoreMaxMB caps the size of an uploaded database dump for restore.
	RestoreMaxMB int

	// Container security profile (OpenShift-style run-as-non-root). When a plan selects
	// "restricted" — or ForceNonRootUser is set globally — app and job containers run as
	// RestrictedUID:0 with no-new-privileges and NET_RAW dropped. SecurityInitImage chowns volumes.
	RestrictedUID     int
	ForceNonRootUser  bool
	SecurityInitImage string

	// Managed network subnet allocation. Miabi carves a unique subnet from NetworkPoolCIDR for
	// every network it creates and passes explicit IPAM, instead of Docker's small default pools.
	// NetworkSubnetPrefix sizes each subnet; the default /12 split into /24s yields 4096 networks.
	NetworkPoolCIDR     string
	NetworkSubnetPrefix int
	// NetworkIPv6 gives every Miabi-created network a dual-stack address space. Off by default, and
	// set EXPLICITLY either way: a network that inherits the daemon's default silently follows a
	// setting nobody chose here. Docker assigns the ULA /64 itself, so there is no v6 pool to size.
	// Needs Docker Engine 26+; on an older engine Miabi refuses to enable it rather than failing
	// every network create.
	NetworkIPv6 bool
	// NetworkIPv6ULAPrefix pins each network's /64 under this ULA prefix, derived from its IPv4
	// subnet, instead of letting the daemon choose. Empty uses the daemon's own assignment, which
	// needs Engine 26+. Setting it gives stable, predictable addresses and works on Engine 25.
	NetworkIPv6ULAPrefix string

	RunnerWaitTimeout time.Duration
	// JobAPITokenEnabled injects the scoped MIABI_JOB_TOKEN callback credential into runner jobs
	// (report status/logs, deploy this app by digest). A hardened install can withhold it while
	// still injecting registry credentials. Default true.
	JobAPITokenEnabled bool
	// BuildTimeoutMinutes is the hard per-build deadline the runner dispatcher
	// enforces on a build job (0 = none).
	BuildTimeoutMinutes int
	// contains filtered or unexported fields
}

Config holds all runtime configuration, loaded from the environment.

func New

func New() *Config

New loads configuration from the environment (and an optional .env file).

func (*Config) AllowedBrowserOrigins

func (c *Config) AllowedBrowserOrigins() []string

AllowedBrowserOrigins returns the browser origins permitted for same-origin checks (e.g. WebSocket upgrades): the configured CORS allowlist plus the web UI URL. A "*" entry (dev) means no restriction.

func (*Config) BuildLogStore

func (c *Config) BuildLogStore() *logstore.Store

BuildLogStore constructs the shared execution-log store from configuration. It returns a disabled (nil) store when the backend is "off" or the directory can't be prepared — the store is never a hard boot dependency, so producers fall back to DB-tail-only behavior.

func (*Config) DBLogLevel added in v1.10.18

func (c *Config) DBLogLevel() gormlogger.LogLevel

DBLogLevel derives database query logging from MIABI_LOG_LEVEL: every query at debug, failed and slow queries at info and warn, failed queries only at error.

func (*Config) DeploymentURL

func (c *Config) DeploymentURL() string

DeploymentURL is this instance's public URL, used to bind a URL-scoped license (matched by host). Prefers the web URL, falling back to the API URL; empty when neither is configured, which disables the license URL check.

func (*Config) InitStorage

func (c *Config) InitStorage()

InitStorage connects to PostgreSQL and Redis. Fatal on failure.

func (*Config) InitWorker

func (c *Config) InitWorker() error

InitWorker prepares configuration for the worker process. It honours MIABI_LOG_LEVEL exactly as the server does: it is a separate process, so it configures its own logger, and a level applying to only one of the two would be a confusing half-measure.

func (*Config) Initialize

func (c *Config) Initialize(app *okapi.Okapi) error

Initialize validates config and applies it to the Okapi app (logger, CORS, OpenAPI docs, error handler). Storage is connected separately in InitStorage.

func (*Config) LogLevelFor added in v1.4.0

func (c *Config) LogLevelFor() (logger.LogLevel, error)

LogLevelFor resolves MIABI_LOG_LEVEL to a logger level. Empty means debug in dev, info in production; an unrecognized value is an ERROR rather than a silent fallback. "warn" is accepted alongside "warning"; "off" is refused because the library cannot honour it.

func (*Config) ValidateAdminSeed added in v1.10.18

func (c *Config) ValidateAdminSeed() error

ValidateAdminSeed checks the credentials the first platform admin is seeded from. It runs only when no admin exists yet, so an install past its first boot can drop them from its environment.

type DatabaseConfig

type DatabaseConfig struct {
	DB *gorm.DB
	// contains filtered or unexported fields
}

DatabaseConfig holds PostgreSQL connection settings and the live GORM handle.

func (DatabaseConfig) PostgresConn

func (d DatabaseConfig) PostgresConn() (host string, port int, name, user, password, sslmode string)

PostgresConn resolves the control-plane database connection parameters, parsing MIABI_DB_URL when set and otherwise the discrete MIABI_DB_* fields. Used to point pg-bkup at Miabi's own database. sslmode defaults to "disable" when not otherwise specified.

type LogStoreConfig

type LogStoreConfig struct {
	Backend       string // "filesystem" | "off"
	Dir           string // shared directory for the filesystem backend
	RetentionDays int    // retention window for the sweeper (0 = keep forever)
	MaxBytes      int64  // per-log cap; middle-truncated past it (0 = default)
	TailBytes     int    // bounded DB tail size
	Compression   string // "gzip" | "none"
}

LogStoreConfig configures the shared execution-log store. The filesystem backend (default) writes gzip log objects under Dir, which must be a shared mount across the control plane and every worker that reads or writes it. Backend "off" keeps DB-tail-only behavior.

func (LogStoreConfig) Enabled

func (l LogStoreConfig) Enabled() bool

Enabled reports whether logs should be externalized to the store.

type PlatformBackupConfig added in v1.8.0

type PlatformBackupConfig struct {
	S3Endpoint       string
	S3Bucket         string
	S3Region         string
	S3AccessKey      string
	S3SecretKey      string
	S3UseSSL         bool
	S3ForcePathStyle bool

	// RootPath scopes this instance's tree within the bucket; the info file is
	// written at its root. DatabasePath/VolumePath default to <root>/databases and
	// <root>/volumes.
	RootPath     string
	DatabasePath string
	VolumePath   string

	// Passphrase is the backup passphrase. Supplying it here rather than through
	// the UI is what lets an unattended install take encrypted backups from its
	// first boot; it is still never returned by the API.
	Passphrase string
	Encrypt    bool
	// EncryptSet records whether MIABI_PLATFORM_BACKUP_ENCRYPT was present, so an explicit
	// "false" can override a stored "true" while an absent variable leaves the stored value alone.
	// IncludeIdentitySet and IncludeTenantDataSet do the same for their toggles.
	EncryptSet bool

	// IncludeIdentity seals the platform's identity into each recovery point. Defaults to on once
	// a passphrase is supplied — that combination is what makes a recovery point restorable onto
	// a fresh host, and should not need a second opt-in nobody knows to look for.
	IncludeIdentity    bool
	IncludeIdentitySet bool
	// IncludeTenantData adds every workspace's databases and volumes.
	IncludeTenantData    bool
	IncludeTenantDataSet bool

	ScheduleCron  string
	MaxBackups    int
	RetentionDays int
}

PlatformBackupConfig configures platform DR backups from the environment, so a freshly installed or restored control plane is already pointed at its bucket on first boot. Any field set here WINS over the stored settings row and is reported to the API as env-locked.

func (PlatformBackupConfig) Configured added in v1.8.0

func (c PlatformBackupConfig) Configured() bool

Configured reports whether the environment supplies a usable S3 target.

type RedisConfig

type RedisConfig struct {
	Client   *redis.Client
	Addr     string
	Password string
	DB       int // Redis database index (MIABI_REDIS_DB); must match Goma's GOMA_REDIS_DB for analytics
}

RedisConfig holds Redis connection settings and the live client.

type RegistryConfig

type RegistryConfig struct {
	// Enabled runs the registry. EnabledSet distinguishes "MIABI_REGISTRY_ENABLED
	// says false" from "nobody said anything": when the variable is absent the
	// admin UI owns the switch, and only an explicitly-set variable pins it.
	Enabled    bool
	EnabledSet bool
	Host       string
	// StorageType is "filesystem" | "s3". S3 requires the registry_s3
	// entitlement, checked both where the driver is selected (the admin API) and
	// where it is used (container start).
	StorageType string
	Image       string // override the registry image (also via the image catalog)
	// AuthURL is the address the gateway's forwardAuth calls to reach Miabi's
	// /internal/registry/auth (e.g. http://miabi:9000). Falls back to ControlURL.
	AuthURL string
	// PlatformToken is an OPTIONAL override for the shared secret the build/deploy worker uses to
	// push and pull built images. Leave it empty: the platform derives it from the master
	// encryption key. Set it only to pin a value, e.g. to share with external tooling.
	PlatformToken string
	S3Endpoint    string
	S3Bucket      string
	S3Region      string
	S3AccessKey   string
	S3SecretKey   string
	S3ForcePath   bool
	// HTTPSRedirect adds a redirectScheme middleware to the registry route, so a
	// plaintext pull is sent to https. On by default, and correct whenever the
	// gateway terminates TLS itself.
	//
	// Turn it OFF when a TLS terminator sits in front (Cloudflare, nginx, a cloud
	// load balancer) and the gateway's proxy.trustedProxies is not configured.
	// Goma believes X-Forwarded-Proto only from a trusted proxy, so it sees the
	// plaintext hop, decides the request is not HTTPS, and redirects — to the
	// terminator, which forwards plaintext again. The registry then loops until
	// the client gives up, and every push and pull fails.
	//
	// Configuring proxy.trustedProxies on the gateway is the better fix; this is
	// the escape hatch for an install that cannot.
	HTTPSRedirect bool
}

RegistryConfig is the boot-authoritative config for the built-in registry. Enablement, the hostname and storage have no other source — the admin API accepts none of them — so this is what the registry runs with until restart. The rest override the admin setting on boot.

type SystemSMTPConfig

type SystemSMTPConfig struct {
	Host       string
	Port       int
	Username   string
	Password   string
	From       string
	Encryption string
}

SystemSMTPConfig is the SMTP server Miabi uses to send its own platform notification emails. Encryption is one of: none, starttls, ssl.

func (SystemSMTPConfig) IsConfigured

func (s SystemSMTPConfig) IsConfigured() bool

IsConfigured reports whether enough is set to send (a host and a From address).

Jump to

Keyboard shortcuts

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