Documentation
¶
Index ¶
- Variables
- func CORSMiddleware(c *gin.Context)
- type Database
- func (d Database) Close(ctx context.Context)
- func (d Database) Find(ctx context.Context, res []models.Model, query bson.M, projection bson.M) error
- func (d Database) FindOne(ctx context.Context, res models.Model, query bson.M, projection bson.M) error
- func (d Database) InsertOne(ctx context.Context, document models.Model) (*mongo.InsertOneResult, error)
- func (d Database) UpdateByID(ctx context.Context, id primitive.ObjectID, updatedModel models.Model) error
- type Env
- type ProviderCredentials
- type Redis
- type RedisCredentials
- type RequestHandler
- type TwilioCredentials
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CORSMiddleware ¶
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
type Env ¶
type Env struct {
AppUrl string `mapstructure:"app_url"`
ServerPort string `mapstructure:"server_port"`
DatabaseURI string `mapstructure:"db_uri"`
DatabaseName string `mapstructure:"db_name"`
RedisCredentials *RedisCredentials `mapstructure:"redis"`
JWTSecret string `mapstructure:"jwt_secret"`
Environment string `mapstructure:"environment"`
Providers map[string]*ProviderCredentials `mapstructure:"providers"`
TwilioCredentials *TwilioCredentials `mapstructure:"twilio"`
SentryDsn string `mapstructure:"sentry_dsn"`
}
func (Env) IsProduction ¶
type ProviderCredentials ¶
type ProviderCredentials struct {
BaseUrl string `mapstructure:"base_url"`
BaseAuthUrl string `mapstructure:"base_auth_url"`
BaseApiUrl string `mapstructure:"base_api_url"`
ClientId string `mapstructure:"client_id"`
ClientSecret string `mapstructure:"client_secret"`
SubscriptionKey string `mapstructure:"subscription_key"`
Scope string `mapstructure:"scope"`
}
type RedisCredentials ¶
type RequestHandler ¶
func NewRequestHandler ¶
func NewRequestHandler(env Env) RequestHandler
type TwilioCredentials ¶
Click to show internal directories.
Click to hide internal directories.