Documentation
¶
Index ¶
- type Repo
- func (r *Repo) CreateUser(user *domain.User) error
- func (r *Repo) DeleteUserByAccount(account string) error
- func (r *Repo) FindUserDayOffByDate(userID string, year int, month int, date int) (*domain.DayOff, error)
- func (r *Repo) GetUserByAccount(account string) (*domain.User, error)
- func (r *Repo) GetUserByDiscordUserID(discordUserID string) (*domain.User, error)
- func (r *Repo) GetUsers() ([]*domain.User, error)
- func (r *Repo) SetDayOff(dayOff *domain.DayOff) error
- type Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repo ¶
func (*Repo) CreateUser ¶
CreateUser implements Repository.
func (*Repo) DeleteUserByAccount ¶
DeleteUserByAccount implements Repository.
func (*Repo) FindUserDayOffByDate ¶
func (r *Repo) FindUserDayOffByDate(userID string, year int, month int, date int) (*domain.DayOff, error)
FindUserDayOffByDate implements Repository.
func (*Repo) GetUserByAccount ¶
GetUserByAccount implements Repository.
func (*Repo) GetUserByDiscordUserID ¶
GetUserByDiscordUserID implements Repository.
type Repository ¶
type Repository interface { CreateUser(user *domain.User) error GetUsers() ([]*domain.User, error) GetUserByAccount(account string) (*domain.User, error) GetUserByDiscordUserID(discordUserID string) (*domain.User, error) DeleteUserByAccount(account string) error SetDayOff(dayOff *domain.DayOff) error FindUserDayOffByDate(userID string, year, month, date int) (*domain.DayOff, error) }
func New ¶
func New(db *gorm.DB) Repository
Click to show internal directories.
Click to hide internal directories.