user

package
v0.0.0-...-e05a182 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RoutesRegister

func RoutesRegister(e *echo.Echo, db *gorm.DB, rd *redis.Client)

Router in auth domain

Types

type Handler

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

func NewHandler

func NewHandler(store *Store, db *gorm.DB, rd *redis.Client) *Handler

func (*Handler) CurrentUser

func (h *Handler) CurrentUser(c echo.Context) error

func (*Handler) FollowProfile

func (h *Handler) FollowProfile(c echo.Context) error

func (*Handler) GetHistory

func (h *Handler) GetHistory(c echo.Context) error

func (*Handler) GetProfile

func (h *Handler) GetProfile(c echo.Context) error

func (*Handler) RefreshToken

func (h *Handler) RefreshToken(c echo.Context) error

func (*Handler) SignIn

func (h *Handler) SignIn(c echo.Context) error

func (*Handler) SignOut

func (h *Handler) SignOut(c echo.Context) error

func (*Handler) SignUp

func (h *Handler) SignUp(c echo.Context) error

func (*Handler) UnfollowProfile

func (h *Handler) UnfollowProfile(c echo.Context) error

func (*Handler) UpdatePassword

func (h *Handler) UpdatePassword(c echo.Context) error

type Store

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

func NewStore

func NewStore(db *gorm.DB) *Store

func (*Store) AddFollower

func (s *Store) AddFollower(u *model.User, followerID string) error

func (*Store) CreateHistory

func (s *Store) CreateHistory(history *model.History) error

func (*Store) CreateUser

func (s *Store) CreateUser(user *model.User) error

func (*Store) DeleteUser

func (s *Store) DeleteUser(user *model.User) error

func (*Store) GetHistory

func (s *Store) GetHistory(id string) ([]model.History, error)

func (*Store) GetProfile

func (s *Store) GetProfile(username string) (*model.User, error)

func (*Store) GetUserByEmail

func (s *Store) GetUserByEmail(email string) (*model.User, error)

func (*Store) GetUserByID

func (s *Store) GetUserByID(id string) (*model.User, error)

func (*Store) IsFollower

func (s *Store) IsFollower(userID, followerID string) (bool, error)

func (*Store) RemoveFollower

func (s *Store) RemoveFollower(u *model.User, followerID string) error

func (*Store) UpdateUser

func (s *Store) UpdateUser(user *model.User) error

Jump to

Keyboard shortcuts

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