Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct {
ActivationRequired bool `conf:"default:false"`
}
Auth configures authentication options.
type Config ¶
type Config struct { Cors Cors Web Web DB DB Email Email Paypal Paypal Stripe Stripe Oauth Oauth Auth Auth }
Config contains all the config parameters useful to setup the whole server components.
type Cors ¶
type Cors struct {
Origin string `conf:"default="`
}
Cors includes parameters for CORS setup.
type DB ¶
type DB struct { User string `conf:"default:postgres"` Password string `conf:"default:postgres,mask"` Host string `conf:"default:localhost"` Name string `conf:"default:postgres"` MaxIdleConns int `conf:"default:0"` MaxOpenConns int `conf:"default:0"` DisableTLS bool `conf:"default:true"` }
DB contains the details of the PostgreSQL to use.
type Email ¶
type Email struct { Host string Port string Address string Password string RecoveryURL string `conf:"default:http://mylocal.com:3000/password/confirm?token="` ActivationURL string `conf:"default:http://mylocal.com:3000/activate/confirm?token="` TokenTimeout time.Duration `conf:"default:10s"` }
Email includes both SMTP information and more business related details which regards the sending of emails.
type Oauth ¶
type Oauth struct { DiscoveryTimeout time.Duration `conf:"default:30s"` LoginRedirectURL string `conf:"default:http://mylocal.com:3000/dashboard"` Google struct { Client string Secret string URL string `conf:"default:https://accounts.google.com"` RedirectURL string `conf:"default:http://mylocal.com:8000/auth/oauth-callback/google"` } }
Oauth includes all details needed to setup Oauth authentication.
type Paypal ¶
type Paypal struct { ClientID string Secret string URL string `conf:"default:https://api.sandbox.paypal.com"` }
Paypal contains parameters to setup the Paypal dependency.
type Stripe ¶
type Stripe struct { APISecret string WebhookSecret string SuccessURL string `conf:"default:http://mylocal.com:3000/dashboard"` CancelURL string `conf:"default:http://mylocal.com:3000/cart"` }
Stripe contains parameters to setup the Stripe dependency.
type Web ¶
type Web struct { Address string `conf:"default:0.0.0.0:8000"` ReadTimeout time.Duration `conf:"default:5s"` WriteTimeout time.Duration `conf:"default:10s"` IdleTimeout time.Duration `conf:"default:120s"` ShutdownTimeout time.Duration `conf:"default:120s"` }
Web contains all the parameters related to the http listener.
Click to show internal directories.
Click to hide internal directories.