Documentation
¶
Overview ¶
Package runtimeconfig extracts trusted system-level configuration forwarded by ProcessModule Core to module API requests.
Module HTTP ports must not be exposed directly to untrusted clients because runtime configuration headers are trusted only when requests come through Core.
Index ¶
- Constants
- func DateAt(ctx context.Context, instant time.Time) time.Time
- func Location(ctx context.Context) *time.Location
- func ParseTimezone(name string) (*time.Location, error)
- func Require() echo.MiddlewareFunc
- func Today(ctx context.Context) time.Time
- func WithTimezone(ctx context.Context, location *time.Location) context.Context
- type Config
Constants ¶
View Source
const ( HeaderTimezone = "X-ProcessModule-Timezone" HeaderCurrencyCode = "X-ProcessModule-Currency-Code" )
Variables ¶
This section is empty.
Functions ¶
func DateAt ¶ added in v0.9.0
DateAt returns a calendar date, represented at UTC midnight for date-only APIs.
func ParseTimezone ¶ added in v0.9.0
ParseTimezone accepts stable IANA names, independent of the host timezone.
func Require ¶
func Require() echo.MiddlewareFunc
Require validates trusted runtime configuration and stores it in the Echo request context.
Types ¶
Click to show internal directories.
Click to hide internal directories.