service

package
v0.0.0-...-855b128 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthResource

func AuthResource(c *gin.Context) bool

func CreateTable

func CreateTable(svc *dynamodb.DynamoDB, tableName string) error

func GenerateJWT

func GenerateJWT(email string) (string, error)

func InitDB

func InitDB(tableNames []string) error

func RedisSaveSessionToken

func RedisSaveSessionToken(email string, token string, c *gin.Context) error

Types

type Claims

type Claims struct {
	Email string `json:"email"`
	jwt.RegisteredClaims
}

type UserDao

type UserDao interface {
	CreateUser(user model.User) error
	CreateAdminUser(user model.User) error
	GetUser(id string) (*model.User, error)
	GetAllUsers() ([]model.User, error)
	GetUserByEmail(email string) (*model.User, error)
	UpdateUser(user model.User) error
	DeleteUser(id string) (*model.User, error)
}

Interface para operações de usuário

func NewUserDao

func NewUserDao(db *dynamodb.DynamoDB) UserDao

Jump to

Keyboard shortcuts

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