login

package
v0.0.0-...-a29137a Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AppName               = "Nextchat"
	JwtSigningMethod      = jwt.SigningMethodHS256
	JwtAccessTokenExpired = time.Duration(30) * (time.Hour * 24)
)

Functions

func Handler

func Handler(c *fiber.Ctx, db *sql.DB) error

func Repository

func Repository(ctx context.Context, tx *sql.Tx, username string) (*entity.User, error)

func Service

func Service(ctx context.Context, db *sql.DB, request api.LoginRequest) *api.LoginResponse

Types

type MyJwtClaims

type MyJwtClaims struct {
	jwt.StandardClaims
	Username string `json:"username"`
	Email    string `json:"email"`
	Id       int    `json:"id"`
}

Jump to

Keyboard shortcuts

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