Documentation ¶
Index ¶
- Variables
- func AddDelayedJob(queue, body string, duration time.Duration) error
- func AddRoleToUser(user *dbTypes.User, role *dbTypes.Role) error
- func Connect(options DBOptions) error
- func ConnectRedis(options RedisOptions)
- func FindEmailTemplate(name string) (*dbTypes.EmailTemplate, error)
- func FindOI(user *dbTypes.User) (string, error)
- func FindRatingByShort(short string) (*dbTypes.Rating, error)
- func FindRole(name string) (*dbTypes.Role, error)
- func FindUserByCID(cid string) (*dbTypes.User, error)
- func FindUsersWithRole(role string) ([]dbTypes.User, error)
- func GenerateDSN(options DBOptions) (string, error)
- func HandleCACert(driver string, cacert string) error
- func RemoveRoleFromUser(user *dbTypes.User, role *dbTypes.Role) error
- type DBOptions
- type Logger
- func (l *Logger) Debug(ctx context.Context, s string, args ...interface{})
- func (l *Logger) Error(ctx context.Context, s string, args ...interface{})
- func (l *Logger) Info(ctx context.Context, s string, args ...interface{})
- func (l *Logger) LogMode(gormlog.LogLevel) gormlog.Interface
- func (l *Logger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error)
- func (l *Logger) Warn(ctx context.Context, s string, args ...interface{})
- type RedisOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *gorm.DB
View Source
var Redis *redis.Client
Functions ¶
func ConnectRedis ¶
func ConnectRedis(options RedisOptions)
func FindEmailTemplate ¶
func FindEmailTemplate(name string) (*dbTypes.EmailTemplate, error)
func GenerateDSN ¶
func HandleCACert ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.