Documentation ¶
Index ¶
- Variables
- func GetVersion(filename string) (int64, error)
- func SetConfigPath(path string)
- type BinderWithValidation
- type Config
- type CorsConfig
- type Database
- type DatabaseConfig
- type HttpConfig
- type HttpHandler
- type IRedis
- type JWT
- type JWTConfig
- type Mail
- type MailConfig
- type MailTemplate
- type Migration
- type Redis
- type RedisConfig
- type SwaggerConfig
- type Validator
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GetVersion ¶
func SetConfigPath ¶
func SetConfigPath(path string)
Types ¶
type BinderWithValidation ¶
type BinderWithValidation struct{}
func (BinderWithValidation) Bind ¶
func (BinderWithValidation) Bind(i interface{}, ctx echo.Context) error
type Config ¶
type Config struct { Name string `mapstructure:"Name"` SecretKey string `mapstructure:"SecretKey"` Http *HttpConfig `mapstructure:"Http"` Database *DatabaseConfig `mapstructure:"Database"` JWT *JWTConfig `mapstructure:"Jwt"` Mail *MailConfig `mapstructure:"Mail"` Swagger *SwaggerConfig `mapstructure:"Swagger"` Redis *RedisConfig `mapstructure:"Redis"` Cors *CorsConfig `mapstructure:"Cors"` }
type CorsConfig ¶
type Database ¶
func NewDatabase ¶
type DatabaseConfig ¶
type DatabaseConfig struct { Engine string `mapstructure:"Engine"` Name string `mapstructure:"Name"` Host string `mapstructure:"Host"` Port int `mapstructure:"Port"` Username string `mapstructure:"Username"` Password string `mapstructure:"Password"` Parameters string `mapstructure:"Parameters"` MigrationDir string `mapstructure:"MigrationDir"` }
func (*DatabaseConfig) DSN ¶
func (a *DatabaseConfig) DSN() string
type HttpConfig ¶
type HttpConfig struct { Host string `mapstructure:"Host" validate:"ipv4"` Port int `mapstructure:"Port" validate:"gte=1,lte=65535"` }
func (*HttpConfig) ListenAddr ¶
func (a *HttpConfig) ListenAddr() string
type HttpHandler ¶
type HttpHandler struct {
Engine *echo.Echo
}
func NewHttpHandler ¶
func NewHttpHandler() HttpHandler
type Mail ¶
type Mail struct {
// contains filtered or unexported fields
}
func (Mail) SendMailAsLog ¶
func (Mail) SendMailWithTemplate ¶
func (l Mail) SendMailWithTemplate(mailTemplate MailTemplate)
type MailConfig ¶
type MailTemplate ¶
type MailTemplate struct { Subject string Body string Sender string Receivers []string Context map[string]interface{} }
func (MailTemplate) GetBody ¶
func (m MailTemplate) GetBody() string
func (MailTemplate) GetSubject ¶
func (m MailTemplate) GetSubject() string
func (MailTemplate) ReadTemplate ¶
func (m MailTemplate) ReadTemplate(templateName string) (string, error)
type Migration ¶
type Migration struct {
// contains filtered or unexported fields
}
func NewMigration ¶
type RedisConfig ¶
type RedisConfig struct { Host string `mapstructure:"Host"` Port int `mapstructure:"Port"` KeyPrefix string `mapstructure:"KeyPrefix"` }
func (*RedisConfig) Addr ¶
func (a *RedisConfig) Addr() string
type SwaggerConfig ¶
Click to show internal directories.
Click to hide internal directories.