Documentation ¶
Index ¶
- func CheckPasswordHash(password, hash string) bool
- func HashingPass(password string) (string, error)
- type Auth
- type JWT
- type MainDB
- func (r *MainDB) CreateNews(article entity.Article) (int, error)
- func (r *MainDB) DeleteNews(article entity.Article)
- func (r *MainDB) DeleteSession(id int)
- func (r *MainDB) Login(password, email string) (bool, entity.User)
- func (r *MainDB) Register(user entity.User) error
- func (r *MainDB) SaveSession(session string, userID int, time time.Time) (int, error)
- func (r *MainDB) SessionExist(session string) (user entity.User, sessionID int, err error)
- type News
- type Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
func HashingPass ¶
Types ¶
type MainDB ¶
type MainDB struct {
// contains filtered or unexported fields
}
func (*MainDB) DeleteNews ¶
func (*MainDB) DeleteSession ¶
func (*MainDB) SaveSession ¶
type Repository ¶
func NewRep ¶
func NewRep(db *sql.DB) *Repository
Click to show internal directories.
Click to hide internal directories.