Documentation ¶
Index ¶
- Constants
- type Data
- func (d *Data) DeleteBook(c *fiber.Ctx) (err error)
- func (d *Data) GetBook(c *fiber.Ctx) (err error)
- func (d *Data) GetBooks(c *fiber.Ctx) (err error)
- func (d *Data) InitDB()
- func (d *Data) InitTokenCache()
- func (d Data) IsRequired() fiber.Handler
- func (d *Data) Login(c *fiber.Ctx) (err error)
- func (d Data) LoginQuery(email, password string) (user User, err error)
- func (d *Data) Logout(c *fiber.Ctx) (err error)
- func (d *Data) MigrateDB()
- func (d *Data) NewBook(c *fiber.Ctx) (err error)
- func (d *Data) SetupAuthRoutes(router fiber.Router)
- func (d *Data) SetupBookRoutes(router fiber.Router)
- type LoginRequest
- type SessionInfo
- type TokenCache
- type User
Constants ¶
View Source
const (
JWTSecret = "EBA6AA5E6CA19689C479902C8E0B68B784CD22DFFEC7356AF7B17FEF3F17C778"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data struct { DB *bun.DB Api fiber.Router FP *fbun.FiPer Ctx context.Context TokenCache *redis.Client Err error }
func (*Data) DeleteBook ¶
func (*Data) InitTokenCache ¶
func (d *Data) InitTokenCache()
InitTokenCache - Init data store instance to save users tokens info
func (Data) IsRequired ¶
func (d Data) IsRequired() fiber.Handler
func (*Data) SetupAuthRoutes ¶
func (d *Data) SetupAuthRoutes(router fiber.Router)
func (*Data) SetupBookRoutes ¶
func (d *Data) SetupBookRoutes(router fiber.Router)
type LoginRequest ¶
type SessionInfo ¶
SessionInfo - Sessin info Data
Source Files ¶
Click to show internal directories.
Click to hide internal directories.