Documentation
¶
Overview ¶
Code generated by nixmod2go. DO NOT EDIT.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// DebugRequests: enable debug logging for requests.
DebugRequests bool `json:"debugRequests"`
// ListenAddress address the API server should listen on.
ListenAddress string `json:"listenAddress"`
}
API is the struct type for `config.api`.
type Auth ¶
type Auth struct {
// Password: SMTP server password.
Password string `json:"password"`
// Username: SMTP server username.
Username string `json:"username"`
}
Auth is the struct type for `config.notification.email.smtp.auth`.
type BackendConfig ¶
type BackendConfig struct {
// Enable: whether to enable e2clicker backend.
Enable bool `json:"enable"`
Package string `json:"package"`
// API: configuration for the API server.
API API `json:"api"`
// Debug: enable debug logging and other debug features.
Debug bool `json:"debug"`
// LogFormat: format of the log output.
LogFormat LogFormat `json:"logFormat"`
// Notification: configuration for the notification service.
Notification Notification `json:"notification"`
// PostgreSQL: configuration for the PostgreSQL database.
PostgreSQL PostgreSQL `json:"postgresql"`
}
BackendConfig is the struct type for `config`.
type Email ¶
type Email interface {
// contains filtered or unexported methods
}
Email describes the `either` type for `config.notification.email`.
func NewEmailPath ¶
NewEmailPath constructs a value of type `path` that satisfies Email.
type EmailJSON ¶
type EmailJSON struct{ Value Email }
EmailJSON wraps Email and implements the json.Unmarshaler interface.
func (EmailJSON) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface for Email.
func (*EmailJSON) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface for Email.
type EmailSubmodule ¶
type EmailSubmodule struct {
// From: email address to send notifications from.
From string `json:"from"`
// SMTP: SMTP server configuration.
SMTP SMTP `json:"smtp"`
}
EmailSubmodule is one of the types that satisfy Email.
type Notification ¶
type Notification struct {
// ClientTimeout: HTTP timeout when making requests to notification servers.
ClientTimeout string `json:"clientTimeout"`
// Email: path to the file containing the email configuration in JSON.
// See `secrets/email-config.example.json` for an example.
Email *EmailJSON `json:"email"`
// WebPush: web push notification configuration. This contains the
// VAPID keys that are used to encrypt the notifications. Use `just
// generate-vapid` to generate the keys.
WebPush *WebPushJSON `json:"webPush"`
}
Notification is the struct type for `config.notification`.
type PostgreSQL ¶
type PostgreSQL struct {
// DatabaseURI: URI of the database to use.
DatabaseURI string `json:"databaseURI"`
}
PostgreSQL is the struct type for `config.postgresql`.
type SMTP ¶
type SMTP struct {
Auth Auth `json:"auth"`
// Host: SMTP server host.
Host string `json:"host"`
// Port: SMTP server port.
Port int `json:"port"`
// Secure: whether to use a secure connection.
Secure bool `json:"secure"`
}
SMTP is the struct type for `config.notification.email.smtp`.
type WebPush ¶
type WebPush interface {
// contains filtered or unexported methods
}
WebPush describes the `either` type for `config.notification.webPush`.
func NewWebPushPath ¶
NewWebPushPath constructs a value of type `path` that satisfies WebPush.
type WebPushJSON ¶
type WebPushJSON struct{ Value WebPush }
WebPushJSON wraps WebPush and implements the json.Unmarshaler interface.
func (WebPushJSON) MarshalJSON ¶
func (w WebPushJSON) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface for WebPush.
func (*WebPushJSON) UnmarshalJSON ¶
func (w *WebPushJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for WebPush.
type WebPushSubmodule ¶
type WebPushSubmodule struct {
// PrivateKey: VAPID private key.
PrivateKey string `json:"privateKey"`
// PublicKey: VAPID public key.
PublicKey string `json:"publicKey"`
}
WebPushSubmodule is one of the types that satisfy WebPush.