Documentation
¶
Index ¶
- func NewStorage(cfg CQLStorage) (certmagic.Storage, error)
- type CQLStorage
- func (CQLStorage) CaddyModule() caddy.ModuleInfo
- func (cs *CQLStorage) CertMagicStorage() (certmagic.Storage, error)
- func (cs *CQLStorage) Delete(ctx context.Context, key string) error
- func (cs *CQLStorage) Exists(ctx context.Context, key string) bool
- func (cs *CQLStorage) List(ctx context.Context, prefix string, recursive bool) ([]string, error)
- func (cs *CQLStorage) Load(ctx context.Context, key string) ([]byte, error)
- func (cs *CQLStorage) Lock(ctx context.Context, key string) error
- func (cs *CQLStorage) Provision(ctx caddy.Context) error
- func (cs *CQLStorage) Stat(ctx context.Context, key string) (certmagic.KeyInfo, error)
- func (cs *CQLStorage) Store(ctx context.Context, key string, value []byte) error
- func (cs *CQLStorage) Unlock(ctx context.Context, key string) error
- func (cs *CQLStorage) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
- func (cs *CQLStorage) Validate() error
- type SecondsDuration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStorage ¶
func NewStorage(cfg CQLStorage) (certmagic.Storage, error)
Types ¶
type CQLStorage ¶
type CQLStorage struct {
QueryTimeout SecondsDuration `json:"query_timeout,omitempty"`
LockTimeout SecondsDuration `json:"lock_timeout,omitempty"`
ContactPoints []string `json:"contact_points,omitempty"`
Keyspace string `json:"keyspace,omitempty"`
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
// contains filtered or unexported fields
}
CQLStorage implements both JSON and Caddyfile configuration. When configured via Caddyfile, UnmarshalCaddyfile is invoked; when configured via JSON, the fields are filled by the JSON adapter, and Provision applies common defaults.
func (CQLStorage) CaddyModule ¶
func (CQLStorage) CaddyModule() caddy.ModuleInfo
func (*CQLStorage) CertMagicStorage ¶
func (cs *CQLStorage) CertMagicStorage() (certmagic.Storage, error)
func (*CQLStorage) Provision ¶
func (cs *CQLStorage) Provision(ctx caddy.Context) error
Provision applies default values and falls back to environment variables when necessary. This method is invoked regardless of the configuration source.
func (*CQLStorage) UnmarshalCaddyfile ¶
func (cs *CQLStorage) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
UnmarshalCaddyfile is called only when using the Caddyfile adapter.
func (*CQLStorage) Validate ¶
func (cs *CQLStorage) Validate() error
type SecondsDuration ¶
SecondsDuration is a custom duration type that supports configuration as a plain number (interpreted as seconds) or as a duration string (e.g., "3s").
func (SecondsDuration) MarshalJSON ¶
func (d SecondsDuration) MarshalJSON() ([]byte, error)
MarshalJSON marshals the duration as a string.
func (*SecondsDuration) UnmarshalJSON ¶
func (d *SecondsDuration) UnmarshalJSON(b []byte) error
UnmarshalJSON supports both number (in seconds) and string (e.g., "3s") formats.