sqlstore

package
v0.0.0-...-a9181b3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestDB

func TestDB(t *testing.T, databaseURL string) (*sql.DB, func(...string))

TestDB ...

Types

type MarkerRepository

type MarkerRepository struct {
	// contains filtered or unexported fields
}

MarkerRepository ...

func (*MarkerRepository) Create

func (r *MarkerRepository) Create(m *model.Marker) (*model.Marker, error)

Create ...

func (*MarkerRepository) Delete

func (r *MarkerRepository) Delete(ID int) (bool, error)

Delete ...

func (*MarkerRepository) DeleteAll

func (r *MarkerRepository) DeleteAll(UserID int) (bool, error)

DeleteAll ...

func (*MarkerRepository) Edit

func (r *MarkerRepository) Edit(m *model.Marker) error

Edit ...

func (*MarkerRepository) Get

func (r *MarkerRepository) Get(ID int) (*model.Marker, error)

Get User Product by ID...

func (*MarkerRepository) GetAllByUserID

func (r *MarkerRepository) GetAllByUserID(id int) ([]model.Marker, error)

GetAllByUserID ...

type RatingRepository

type RatingRepository struct {
	// contains filtered or unexported fields
}

RatingRepository ...

func (*RatingRepository) Create

func (r *RatingRepository) Create(rating *model.Rating) error

Create ...

func (*RatingRepository) Delete

func (r *RatingRepository) Delete(ID int) (bool, error)

Delete ...

func (*RatingRepository) DeleteByUserID

func (r *RatingRepository) DeleteByUserID(UserID int) (bool, error)

DeleteByUserID ...

func (*RatingRepository) GetAll

func (r *RatingRepository) GetAll() (interface{}, error)

GetAll ...

func (*RatingRepository) GetUserRating

func (r *RatingRepository) GetUserRating(id int) (*model.Rating, error)

GetUserRating ...

func (*RatingRepository) Update

func (r *RatingRepository) Update(rating *model.Rating) error

Update ...

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store ...

func New

func New(db *sql.DB) *Store

New ...

func (*Store) Marker

func (s *Store) Marker() store.MarkerRepository

Marker ...

func (*Store) Rating

func (s *Store) Rating() store.RatingRepository

Rating ...

func (*Store) Task

func (s *Store) Task() store.TasksRepository

Task ...

func (*Store) User

func (s *Store) User() store.UserRepository

User ...

type TasksRepository

type TasksRepository struct {
	// contains filtered or unexported fields
}

TasksRepository ...

func (*TasksRepository) Check

func (r *TasksRepository) Check(t *model.Task) error

Check ...

func (*TasksRepository) Create

func (r *TasksRepository) Create(t *model.Task) error

Create ...

func (*TasksRepository) Delete

func (r *TasksRepository) Delete(ID int) (bool, error)

Delete ...

func (*TasksRepository) DeleteAll

func (r *TasksRepository) DeleteAll(UserID int) (bool, error)

DeleteAll ...

func (*TasksRepository) GetAll

func (r *TasksRepository) GetAll(id int) (interface{}, error)

GetAll ...

func (*TasksRepository) GetAllByDate

func (r *TasksRepository) GetAllByDate(id int, day time.Time) (interface{}, error)

GetAllByDate ...

func (*TasksRepository) GetAllByDateForAllUsers

func (r *TasksRepository) GetAllByDateForAllUsers(day time.Time) ([]model.Task, error)

GetAllByDateForAllUsers ...

func (*TasksRepository) GetAllByMarker

func (r *TasksRepository) GetAllByMarker(id int, marker string) (interface{}, error)

GetAllByMarker ...

func (*TasksRepository) GetAllByTimeOfDay

func (r *TasksRepository) GetAllByTimeOfDay(day time.Time) ([]model.Task, error)

GetAllByTimeOfDay ...

func (*TasksRepository) GetMarkersByUserID

func (r *TasksRepository) GetMarkersByUserID(t *model.Task) (interface{}, error)

GetMarkersByUserID ...

func (*TasksRepository) Update

func (r *TasksRepository) Update(t *model.Task) error

Update ...

type UserRepository

type UserRepository struct {
	// contains filtered or unexported fields
}

UserRepository ...

func (*UserRepository) AddTelegramChatID

func (r *UserRepository) AddTelegramChatID(email string, chatID int64) error

AddTelegramChatID ...

func (*UserRepository) Create

func (r *UserRepository) Create(u *model.User) error

Create ...

func (*UserRepository) DeleteUser

func (r *UserRepository) DeleteUser(ID int) (bool, error)

DeleteUser ...

func (*UserRepository) Edit

func (r *UserRepository) Edit(u *model.User) error

Edit ...

func (*UserRepository) Find

func (r *UserRepository) Find(id int) (*model.User, error)

Find ...

func (*UserRepository) FindByEmail

func (r *UserRepository) FindByEmail(email string) (*model.User, error)

FindByEmail ...

func (*UserRepository) GetByID

func (r *UserRepository) GetByID(id int) (*model.User, error)

GetByID ...

func (*UserRepository) IsEmailSet

func (r *UserRepository) IsEmailSet(email string) (*model.User, error)

IsEmailSet ...

func (*UserRepository) IsTelegramAuth

func (r *UserRepository) IsTelegramAuth(chatID int64) (bool, error)

IsTelegramAuth ...

func (*UserRepository) Notifier

func (r *UserRepository) Notifier(u *model.User) error

Notifier ...

func (*UserRepository) TelegramBotLogout

func (r *UserRepository) TelegramBotLogout(chatID int64) error

TelegramBotLogout ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL