Documentation
¶
Overview ¶
Package platform is the public runtime façade a wrapper module imports to build and run the platform-api server. The split is clean — platform runs the server, pdk says what a plugin is and what it can reach.
This package deliberately re-exports nothing from pdk. A wrapper's main imports platform to construct and run the App; the packages that implement plugins import pdk directly, so every contract type has exactly one name and pdk's own documentation is what a plugin author reads. The façade works entirely in terms of that external surface and never exposes internal/plugin.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App is a configured, ready-to-run platform-api server.
type Option ¶
type Option func(*App)
Option configures an App. Options are applied in order; later options that set the same field win.
func WithConfig ¶
WithConfig supplies an already-built config, taking precedence over WithConfigPath.
func WithConfigPath ¶
WithConfigPath loads platform-api config from a TOML file (env > file > defaults). It points the shared config loader at the given path; the config is materialized in New. WithConfig takes precedence over this.
func WithConfigPaths ¶ added in v0.14.0
WithConfigPaths loads platform-api config from one or more TOML files, merged in order with last-wins precedence (a key set in a later file overrides the same key from an earlier file). It is the repeatable form of WithConfigPath; the config is materialized in New. WithConfig takes precedence over this.
func WithLogger ¶
WithLogger supplies the logger. When omitted, one is derived from the config's log level and format.
func WithPlugin ¶
WithPlugin registers wrapper-owned extension modules — the one way a wrapper adds routes, scopes, and hooks. Each plugin implements pdk.Plugin and receives pdk.Deps in Init. Multiple calls accumulate; nil plugins are ignored.