e2clickermodule

package
v0.0.0-...-7b9de4d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2025 License: GPL-3.0 Imports: 2 Imported by: 0

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

func NewEmailPath(e string) Email

NewEmailPath constructs a value of type `path` that satisfies Email.

func NewEmailSubmodule

func NewEmailSubmodule(e struct {
	// From: email address to send notifications from.
	From string `json:"from"`
	// SMTP: SMTP server configuration.
	SMTP SMTP `json:"smtp"`
}) Email

NewEmailSubmodule constructs a value of type `submodule` that satisfies Email.

type EmailJSON

type EmailJSON struct{ Value Email }

EmailJSON wraps Email and implements the json.Unmarshaler interface.

func (EmailJSON) MarshalJSON

func (e EmailJSON) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for Email.

func (*EmailJSON) UnmarshalJSON

func (e *EmailJSON) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Email.

type EmailPath

type EmailPath string

EmailPath is one of the types that satisfy 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 LogFormat

type LogFormat string

LogFormat is the enum type for `config.logFormat`.

const (
	LogFormatColor LogFormat = "color"
	LogFormatJSON  LogFormat = "json"
	LogFormatText  LogFormat = "text"
)

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

func NewWebPushPath(w string) WebPush

NewWebPushPath constructs a value of type `path` that satisfies WebPush.

func NewWebPushSubmodule

func NewWebPushSubmodule(w struct {
	// PrivateKey: VAPID private key.
	PrivateKey string `json:"privateKey"`
	// PublicKey: VAPID public key.
	PublicKey string `json:"publicKey"`
}) WebPush

NewWebPushSubmodule constructs a value of type `submodule` 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 WebPushPath

type WebPushPath string

WebPushPath is one of the types that satisfy 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL