Documentation
¶
Index ¶
- func NewLogger() *log.Logger
- type Database
- func (m *Database) CategoryExistsByUUID(ctx context.Context, uuid string) (bool, error)
- func (m *Database) CreateCategory(ctx context.Context, c *database.Category) error
- func (m *Database) CreateCurrency(ctx context.Context, c *database.Currency) error
- func (m *Database) CreateTransaction(ctx context.Context, t *database.Transaction) error
- func (m *Database) CreateUser(ctx context.Context, u *database.User) error
- func (m *Database) DeleteCategoryByID(ctx context.Context, id int64) error
- func (m *Database) DeleteUserByUsername(ctx context.Context, username string) error
- func (m *Database) GetCategoriesByOwnerID(ctx context.Context, ownerID int64, c *[]database.Category) error
- func (m *Database) GetCategoryByUUID(ctx context.Context, uuid string, c *database.Category) error
- func (m *Database) GetCurrencyByCode(ctx context.Context, code string, c *database.Currency) error
- func (m *Database) GetTransactionByUUID(ctx context.Context, uuid string, t *database.Transaction) error
- func (m *Database) GetUserByUsername(ctx context.Context, username string, u *database.User) error
- func (m *Database) Init(ctx context.Context) error
- func (m *Database) TestConnection() error
- func (m *Database) UpdateCategory(ctx context.Context, c *database.Category) error
- func (m *Database) UserExistsByUsername(ctx context.Context, username string) (bool, error)
- type JWTAuthenticator
- type PasswordAuthenticator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func NewDatabase ¶
func NewDatabase() *Database
func (*Database) CategoryExistsByUUID ¶
func (*Database) CreateCategory ¶
func (*Database) CreateCurrency ¶
func (*Database) CreateTransaction ¶
func (*Database) CreateUser ¶
func (*Database) DeleteCategoryByID ¶
func (*Database) DeleteUserByUsername ¶
func (*Database) GetCategoriesByOwnerID ¶
func (*Database) GetCategoryByUUID ¶
func (*Database) GetCurrencyByCode ¶
func (*Database) GetTransactionByUUID ¶
func (*Database) GetUserByUsername ¶
func (*Database) TestConnection ¶
func (*Database) UpdateCategory ¶
type JWTAuthenticator ¶
type JWTAuthenticator struct {
// contains filtered or unexported fields
}
func NewJWTAuthenticator ¶
func NewJWTAuthenticator() *JWTAuthenticator
func (*JWTAuthenticator) CreateToken ¶
func (*JWTAuthenticator) VerifyToken ¶
func (m *JWTAuthenticator) VerifyToken(token string) (jwt.MapClaims, error)
type PasswordAuthenticator ¶
type PasswordAuthenticator struct{}
func NewPasswordAuthenticator ¶
func NewPasswordAuthenticator() *PasswordAuthenticator
func (*PasswordAuthenticator) HashPassword ¶
func (m *PasswordAuthenticator) HashPassword(password string) (string, error)
func (*PasswordAuthenticator) VerifyPassword ¶
func (m *PasswordAuthenticator) VerifyPassword(password string, hash string) (bool, error)
Click to show internal directories.
Click to hide internal directories.