Documentation
¶
Index ¶
- func IsNoRows(err error) bool
- func IsUniqueViolation(err error) bool
- type DB
- type FindOptions
- type FindUserFilter
- type InsertSessionDTO
- type InsertUserDTO
- type SessionDAO
- func (dao *SessionDAO) FindByUser(ctx context.Context, user model.ID, opts SessionTimelineOptions) ([]model.Session, error)
- func (dao *SessionDAO) Get(ctx context.Context, id model.ID) (model.Session, error)
- func (dao *SessionDAO) Insert(ctx context.Context, dto InsertSessionDTO) (model.ID, error)
- func (dao *SessionDAO) LastByTaskAndUser(ctx context.Context, task, user model.ID) (model.Session, error)
- func (dao *SessionDAO) Update(ctx context.Context, id model.ID, dto UpdateSessionDTO) error
- type SessionTimelineOptions
- type UpdateSessionDTO
- type UpdateUserDTO
- type UserDAO
- func (dao *UserDAO) Delete(ctx context.Context, id model.ID) error
- func (dao *UserDAO) Find(ctx context.Context, filter FindUserFilter, opts FindOptions) ([]model.User, error)
- func (dao *UserDAO) Get(ctx context.Context, id model.ID) (model.User, error)
- func (dao *UserDAO) Insert(ctx context.Context, dto InsertUserDTO) (model.ID, error)
- func (dao *UserDAO) Update(ctx context.Context, id model.ID, dto UpdateUserDTO) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsUniqueViolation ¶
Types ¶
type FindOptions ¶
type FindUserFilter ¶
type InsertSessionDTO ¶
func NewInsertSessionDTO ¶
func NewInsertSessionDTO(user model.ID, task model.ID) InsertSessionDTO
type InsertUserDTO ¶
type InsertUserDTO struct { Name string Surname string Patronymic *string PassportSerie int PassportNumber int Address string }
func NewInsertUserDTO ¶
func (*InsertUserDTO) SetPatronymic ¶
func (dto *InsertUserDTO) SetPatronymic(patronymic string)
type SessionDAO ¶
func NewSessionDAO ¶
func NewSessionDAO(logger *slog.Logger, db *DB) *SessionDAO
func (*SessionDAO) FindByUser ¶
func (dao *SessionDAO) FindByUser(ctx context.Context, user model.ID, opts SessionTimelineOptions) ([]model.Session, error)
func (*SessionDAO) Insert ¶
func (dao *SessionDAO) Insert(ctx context.Context, dto InsertSessionDTO) (model.ID, error)
func (*SessionDAO) LastByTaskAndUser ¶
func (*SessionDAO) Update ¶
func (dao *SessionDAO) Update(ctx context.Context, id model.ID, dto UpdateSessionDTO) error
type SessionTimelineOptions ¶
type UpdateSessionDTO ¶
type UpdateUserDTO ¶
Click to show internal directories.
Click to hide internal directories.