idiomatic project structure
This commit is contained in:
20
internal/api/db_interface.go
Normal file
20
internal/api/db_interface.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"go-nkode/internal/models"
|
||||
)
|
||||
|
||||
type DbAccessor interface {
|
||||
GetCustomer(models.CustomerId) (*models.Customer, error)
|
||||
GetUser(models.UserEmail, models.CustomerId) (*models.User, error)
|
||||
WriteNewCustomer(models.Customer) error
|
||||
WriteNewUser(models.User) error
|
||||
UpdateUserNKode(models.User) error
|
||||
UpdateUserInterface(models.UserId, models.UserInterface) error
|
||||
UpdateUserRefreshToken(models.UserId, string) error
|
||||
Renew(models.CustomerId) error
|
||||
RefreshUserPasscode(models.User, []int, models.CustomerAttributes) error
|
||||
RandomSvgInterface(models.KeypadDimension) ([]string, error)
|
||||
RandomSvgIdxInterface(models.KeypadDimension) (models.SvgIdInterface, error)
|
||||
GetSvgStringInterface(models.SvgIdInterface) ([]string, error)
|
||||
}
|
||||
Reference in New Issue
Block a user