Documentation
¶
Index ¶
- type Client
- type ClientOption
- type ClientOptions
- type DefaultTool
- func (d *DefaultTool) Info(ctx context.Context) (contract.EnvInfo, error)
- func (d *DefaultTool) Resolve(ctx context.Context, t, p any) (any, error)
- func (d *DefaultTool) RewriteExternalHost(ctx context.Context, u *url.URL) error
- func (d *DefaultTool) RewriteHost(ctx context.Context, u *url.URL) error
- type Tool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
contract.EnvironmentOperator
}
func NewClient ¶
func NewClient(opts ClientOptions) Client
type ClientOption ¶ added in v0.1.106
type ClientOption = contract.Opt[ClientOptions]
func WithInfo ¶ added in v0.1.106
func WithInfo(x contract.EnvInfo) ClientOption
type ClientOptions ¶ added in v0.1.106
func ApplyClientOptions ¶ added in v0.1.106
func ApplyClientOptions(opts *ClientOptions, modifiers ...ClientOption) ClientOptions
type DefaultTool ¶
func NewTool ¶
func NewTool(c Client, opts contract.ToolOptions[Client]) *DefaultTool
func (*DefaultTool) Resolve ¶ added in v0.1.648
Resolve selects between test and prod values depending on environment.
func (*DefaultTool) RewriteExternalHost ¶ added in v0.2.8
RewriteExternalHost rewrites the external host in the URL based on environment.
func (*DefaultTool) RewriteHost ¶
RewriteHost rewrites the host in the URL based on environment.
Click to show internal directories.
Click to hide internal directories.