autobrr/internal/domain/user.go
stacksmash76 1a4f3cf55d
feat: add ability to create an account via the webui (#223)
* feat: add ability to create an account via the webui without the need for autobrrctl

* refactor redundant code block.

* fix: early return and 0 value
2022-04-10 18:26:14 +02:00

16 lines
391 B
Go

package domain
import "context"
type UserRepo interface {
GetUserCount(ctx context.Context) (int, error)
FindByUsername(ctx context.Context, username string) (*User, error)
Store(ctx context.Context, user User) error
Update(ctx context.Context, user User) error
}
type User struct {
ID int `json:"id"`
Username string `json:"username"`
Password string `json:"password"`
}