store

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: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//ErrRecordNotFound ...
	ErrRecordNotFound = errors.New("record not found")
)

Functions

This section is empty.

Types

type MarkerRepository

type MarkerRepository interface {
	Create(*model.Marker) (*model.Marker, error)
	Get(int) (*model.Marker, error)
	Edit(*model.Marker) error
	Delete(int) (bool, error)
	DeleteAll(int) (bool, error)
	GetAllByUserID(int) ([]model.Marker, error)
}

MarkerRepository ...

type RatingRepository

type RatingRepository interface {
	Create(*model.Rating) error
	GetAll() (interface{}, error)
	GetUserRating(int) (*model.Rating, error)
	Update(*model.Rating) error
	Delete(int) (bool, error)
	DeleteByUserID(UserID int) (bool, error)
}

RatingRepository ...

type Store

type Store interface {
	User() UserRepository
	Marker() MarkerRepository
	Task() TasksRepository
	Rating() RatingRepository
}

Store ...

type TasksRepository

type TasksRepository interface {
	Create(*model.Task) error
	GetMarkersByUserID(d *model.Task) (interface{}, error)
	GetAll(int) (interface{}, error)
	GetAllByDate(int, time.Time) (interface{}, error)
	GetAllByDateForAllUsers(time.Time) ([]model.Task, error)
	GetAllByTimeOfDay(time.Time) ([]model.Task, error)
	GetAllByMarker(int, string) (interface{}, error)
	Update(*model.Task) error
	Check(*model.Task) error
	Delete(int) (bool, error)
	DeleteAll(int) (bool, error)
}

TasksRepository ...

type UserRepository

type UserRepository interface {
	Create(*model.User) error
	Notifier(*model.User) error
	Find(int) (*model.User, error)
	IsEmailSet(email string) (*model.User, error)
	IsTelegramAuth(int64) (bool, error)
	FindByEmail(string) (*model.User, error)
	DeleteUser(int) (bool, error)
	Edit(*model.User) error
	AddTelegramChatID(string, int64) error
	TelegramBotLogout(int64) error
	GetByID(id int) (*model.User, error)
}

UserRepository ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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