Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StorageLoader ¶
type StorageLoader struct { // StorageRaw is a storage module that defines how/where Caddy // stores assets (such as TLS certificates). The default storage // module is `caddy.storage.file_system` (the local file system), // and the default path // [depends on the OS and environment](/docs/conventions#data-directory). StorageRaw json.RawMessage `json:"storage,omitempty" caddy:"namespace=caddy.storage inline_key=module"` // The storage key at which the configuration is to be found Key string `json:"key,omitempty"` // The adapter to use to convert the storage's contents to Caddy JSON. Adapter string `json:"adapter,omitempty"` // contains filtered or unexported fields }
StorageLoader is a dynamic configuration loader that reads the configuration from a Caddy storage. If the storage is not configured, the default storage is used, which may be the file-system if none is configured If the `key` is not configured, the default key is `config/caddy.json`.
func (*StorageLoader) CaddyModule ¶
func (*StorageLoader) CaddyModule() caddy.ModuleInfo
CaddyModule implements caddy.Module.
func (*StorageLoader) LoadConfig ¶
func (sl *StorageLoader) LoadConfig(ctx caddy.Context) ([]byte, error)
LoadConfig reads the configuration from the storage
func (*StorageLoader) Provision ¶
func (sl *StorageLoader) Provision(ctx caddy.Context) error
Provision implements caddy.Provisioner.
func (*StorageLoader) Validate ¶ added in v1.0.0
func (sl *StorageLoader) Validate() error
Validate checks for the prerequisites of the module, e.g. the adapter if configured.
Click to show internal directories.
Click to hide internal directories.