Documentation ¶
Index ¶
- func Log(ctx context.Context, logData *pb_logging.LogData) (*pb_logging.LoggingResult, error)
- type DbAdapter
- type RedisAdapter
- func (a RedisAdapter) ChangePassword(ctx context.Context, userPassword me.UserPassword) error
- func (a RedisAdapter) DeleteUserPasswordByUserId(ctx context.Context, userId uuid.UUID) error
- func (a RedisAdapter) GetUserPasswordByUserId(ctx context.Context, userId uuid.UUID) (me.UserPassword, error)
- func (a *RedisAdapter) SetLogger(...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Log ¶
func Log(ctx context.Context, logData *pb_logging.LogData) (*pb_logging.LoggingResult, error)
Log is the default log function
Types ¶
type DbAdapter ¶
type DbAdapter struct { *tgorm.GormClient Log func(ctx context.Context, logData *pb_logging.LogData) (*pb_logging.LoggingResult, error) }
func NewDbAdapter ¶
func NewDbAdapter(dbClient *tgorm.GormClient) DbAdapter
func (DbAdapter) GetUserPasswordByUserId ¶
func (a DbAdapter) GetUserPasswordByUserId(ctx context.Context, userId uuid.UUID) (me.UserPassword, error)
GetUserPasswordByUserId returns active password of the given user.
func (DbAdapter) GetUsersByFilter ¶
func (a DbAdapter) GetUsersByFilter(ctx context.Context, userFilter me.UserFilter) (me.Users, error)
GetUsersByFilter returns the users that match the given filter.
func (*DbAdapter) SetLogger ¶
func (a *DbAdapter) SetLogger(LoggerFunc func(ctx context.Context, logData *pb_logging.LogData) (*pb_logging.LoggingResult, error))
SetLogger sets logging call-back function
type RedisAdapter ¶
type RedisAdapter struct { *tredis.RedisClient Log func(ctx context.Context, logData *pb_logging.LogData) (*pb_logging.LoggingResult, error) }
func NewRedisAdapter ¶
func NewRedisAdapter(redisClient *tredis.RedisClient) RedisAdapter
func (RedisAdapter) ChangePassword ¶
func (a RedisAdapter) ChangePassword(ctx context.Context, userPassword me.UserPassword) error
ChangePassword changes the given user password in the redis.
func (RedisAdapter) DeleteUserPasswordByUserId ¶
DeleteUserPasswordByUserId hard-deletes the given user id in the redis.
func (RedisAdapter) GetUserPasswordByUserId ¶
func (a RedisAdapter) GetUserPasswordByUserId(ctx context.Context, userId uuid.UUID) (me.UserPassword, error)
GetUserPasswordByUserId returns active password of the given user.
func (*RedisAdapter) SetLogger ¶
func (a *RedisAdapter) SetLogger(LoggerFunc func(ctx context.Context, logData *pb_logging.LogData) (*pb_logging.LoggingResult, error))
SetLogger sets logging call-back function
Click to show internal directories.
Click to hide internal directories.