Documentation ¶
Index ¶
- func NewPostgresDB(cfg Config) (*sqlx.DB, error)
- type AuthPostgres
- type Authorization
- type Category
- type CategoryPostgres
- func (r *CategoryPostgres) Create(userId int, category webApi.Category) (int, error)
- func (r *CategoryPostgres) Delete(userId, id int) error
- func (r *CategoryPostgres) GetAll(userId int) ([]webApi.Category, error)
- func (r *CategoryPostgres) GetById(userId, id int) (webApi.Category, error)
- func (r *CategoryPostgres) Update(userId, id int, input webApi.UpdateCategoryInput) error
- type Config
- type Event
- type EventPostgres
- func (r *EventPostgres) Create(userId int, event webApi.Event) (int, error)
- func (r *EventPostgres) Delete(userId int, id int) error
- func (r *EventPostgres) GetAll(userId int) ([]webApi.Event, error)
- func (r *EventPostgres) GetById(userId int, id int) (webApi.Event, error)
- func (r *EventPostgres) Update(userId, id int, input webApi.UpdateEventInput) error
- type Notion
- type NotionPostgres
- func (r *NotionPostgres) Create(userId int, notion webApi.Notion) (int, error)
- func (r *NotionPostgres) Delete(userId int, id int) error
- func (r *NotionPostgres) GetAll(userId int) ([]webApi.Notion, error)
- func (r *NotionPostgres) GetById(userId int, id int) (webApi.Notion, error)
- func (r *NotionPostgres) Update(userId, id int, input webApi.UpdateNotionInput) error
- type Repository
- type Task
- type TaskPostgres
- func (r *TaskPostgres) Create(userId int, task webApi.Task) (int, error)
- func (r *TaskPostgres) Delete(userId int, id int) error
- func (r *TaskPostgres) GetAll(userId int) ([]webApi.Task, error)
- func (r *TaskPostgres) GetById(userId int, id int) (webApi.Task, error)
- func (r *TaskPostgres) Update(userId, id int, input webApi.UpdateTaskInput) error
- type User
- type UserPostgres
- type Week
- type WeekPostgres
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthPostgres ¶
type AuthPostgres struct {
// contains filtered or unexported fields
}
func NewAuthPostgress ¶
func NewAuthPostgress(db *sqlx.DB) *AuthPostgres
func (*AuthPostgres) CreateUser ¶
func (r *AuthPostgres) CreateUser(user webApi.User) (int, error)
type Authorization ¶
type CategoryPostgres ¶
type CategoryPostgres struct {
// contains filtered or unexported fields
}
func NewCategoryPostgres ¶
func NewCategoryPostgres(db *sqlx.DB) *CategoryPostgres
func (*CategoryPostgres) Delete ¶
func (r *CategoryPostgres) Delete(userId, id int) error
func (*CategoryPostgres) GetAll ¶
func (r *CategoryPostgres) GetAll(userId int) ([]webApi.Category, error)
func (*CategoryPostgres) GetById ¶
func (r *CategoryPostgres) GetById(userId, id int) (webApi.Category, error)
func (*CategoryPostgres) Update ¶
func (r *CategoryPostgres) Update(userId, id int, input webApi.UpdateCategoryInput) error
type EventPostgres ¶
type EventPostgres struct {
// contains filtered or unexported fields
}
func NewEventPostgres ¶
func NewEventPostgres(db *sqlx.DB) *EventPostgres
func (*EventPostgres) Update ¶
func (r *EventPostgres) Update(userId, id int, input webApi.UpdateEventInput) error
type NotionPostgres ¶
type NotionPostgres struct {
// contains filtered or unexported fields
}
func NewNotionPostgres ¶
func NewNotionPostgres(db *sqlx.DB) *NotionPostgres
func (*NotionPostgres) GetAll ¶
func (r *NotionPostgres) GetAll(userId int) ([]webApi.Notion, error)
func (*NotionPostgres) Update ¶
func (r *NotionPostgres) Update(userId, id int, input webApi.UpdateNotionInput) error
type Repository ¶
func NewRepository ¶
func NewRepository(db *sqlx.DB) *Repository
type TaskPostgres ¶
type TaskPostgres struct {
// contains filtered or unexported fields
}
func NewTaskPostgres ¶
func NewTaskPostgres(db *sqlx.DB) *TaskPostgres
func (*TaskPostgres) Update ¶
func (r *TaskPostgres) Update(userId, id int, input webApi.UpdateTaskInput) error
type UserPostgres ¶
type UserPostgres struct {
// contains filtered or unexported fields
}
func NewUserPostgres ¶
func NewUserPostgres(db *sqlx.DB) *UserPostgres
func (*UserPostgres) Get ¶
func (r *UserPostgres) Get(userId int) (webApi.UsernameInfo, error)
type WeekPostgres ¶
type WeekPostgres struct {
// contains filtered or unexported fields
}
func NewWeekPostgres ¶
func NewWeekPostgres(db *sqlx.DB) *WeekPostgres
func (*WeekPostgres) GetDays ¶
func (r *WeekPostgres) GetDays(userId int, input webApi.WeekRequest) ([]webApi.Day, error)
Click to show internal directories.
Click to hide internal directories.