Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthConfig ¶
type AuthConfig struct { // Client ID for Google OAuth. GoogleOAuth2ClientID string // Client secret for Google OAuth. GoogleOAuth2ClientSecret string }
Settings and other values that affect how the server should perform user authentication.
type Config ¶
type Config struct { // Settings and other values that affect how the server should perform user // authentication. Auth AuthConfig // Broadly describes the circumstances under which the server is running. Environment Environment // Port over which HTTP requests should be serviced. HttpPort int // URL of the home page. HomeUrl string // Settings and other values that affect how the server should send emails. Mail MailConfig // Settings and other values that affect how the server should interface with // Postgres. Postgres PostgresConfig // Settings and other values that affect how the server should interface with // Redis. Redis RedisConfig }
Settings and other values that affect how the server should function.
func (*Config) ForGormPostgresDriver ¶
Returns a DSN for connecting Gorm to Postgres.
func (*Config) ForRedis ¶
func (c *Config) ForRedis() *redis.Options
Returns a configuration struct for Redis.
func (*Config) ForSessionStore ¶
Returns a configuration struct for Fiber's session middleware that leans on the specified storage to keep track of cookies internally.
func (*Config) PublicBaseUrl ¶
Returns the base URL that external clients will use to reach this server over HTTP(s).
type Environment ¶
type Environment int
Broadly describes the circumstances under which the server is running.
const ( // Environment used during local development. DevEnvironment Environment = iota // Environment used when deployed into a production setting. ProdEnvironment )
type MailConfig ¶
type MailConfig struct { // Network address of the SMTP server. Host string // Password of the server's SMTP user. Password string // TCP port used for SMTP. Port int // Name of the server's SMTP user. User string // User-friendly name of the server's email sender. UserName string }
Settings and other values that affect how the server should send emails.
type PostgresConfig ¶
type PostgresConfig struct { // Name of the server's Postgres database. DatabaseName string // Network address of Postgres. Host string // Password of the server's Postgres user. Password string // TCP port of Postgres. Port int // Name of the server's Postgres user. User string }
Settings and other values that affect how the server should interface with Postgres.
type RedisConfig ¶
type RedisConfig struct { // Network address of Redis. Host string // Password of the server's Redis user. Password string // TCP port of Redis. Port int }
Settings and other values that affect how the server should interface with Redis.