Documentation
¶
Overview ¶
Package cmd contains helpers common to all CLI implementations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bust ¶
type Bust struct {
PGConfig
LogConfig
CloudflareConfig
AuthorID int64 `arg:"" help:"author ID to cache bust"`
}
Bust allows manually busting entries from the CLI.
type CloudflareConfig ¶
type CloudflareConfig struct {
CloudflareToken string `and:"cf" help:"API token (not a legacy global API key) with permission to bust caches."`
CloudflareZoneID string `and:"cf" help:"The Cloudflare zone ID"`
CloudflareDomain string `and:"cf" help:"The domain name for constructing URLs to bust."`
}
CloudflareConfig is optional and configures Cloudflare for cache busting.
func (*CloudflareConfig) Cache ¶
func (c *CloudflareConfig) Cache(reg *prometheus.Registry) (*internal.CloudflareCache, error)
Cache returns the cloudflare cache, if it was configured, or nil otherwise.
type LogConfig ¶
type LogConfig struct {
Verbose bool `env:"VERBOSE" help:"increase log verbosity"`
}
LogConfig configures logging.
type PGConfig ¶
type PGConfig struct {
PostgresHost string `default:"localhost" env:"POSTGRES_HOST" help:"Postgres host."`
PostgresUser string `default:"postgres" env:"POSTGRES_USER" help:"Postgres user."`
PostgresPassword string `xor:"db-auth" env:"POSTGRES_PASSWORD" help:"Postgres password."`
PostgresPasswordFile []byte `type:"filecontent" xor:"db-auth" env:"POSTGRES_PASSWORD_FILE" help:"File with the Postgres password."`
PostgresPort int `default:"5432" env:"POSTGRES_PORT" help:"Postgres port."`
PostgresDatabase string `default:"rreading-glasses" env:"POSTGRES_DATABASE" help:"Postgres database to use."`
}
PGConfig configured a PostGres connection.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package main runs a metadata server using G——R—— as an upstream.
|
Package main runs a metadata server using G——R—— as an upstream. |
|
Package main runs a metadata server using Hardcover as an upstream.
|
Package main runs a metadata server using Hardcover as an upstream. |
Click to show internal directories.
Click to hide internal directories.