service

package
v0.0.0-...-2b331e9 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2021 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateArticle

func CreateArticle(title string, content string) (primitive.ObjectID, error)

func DeleteArticle

func DeleteArticle(id string) error

func GetAllArticles

func GetAllArticles(page int64, pageSize int64) []models.Article

func GetArticleById

func GetArticleById(id string) (models.Article, error)

func Login

func Login(username, password string) (string, error)

func UpdateArticle

func UpdateArticle(id, title, content string) error

func UpdatePassword

func UpdatePassword(username, oldPassword, newPassword string) error

Types

type JWTService

type JWTService interface {
	GenerateToken(email string) string
	ValidateToken(token string) (*jwt.Token, error)
}

func JWTAuthService

func JWTAuthService() JWTService

auth-jwt

Jump to

Keyboard shortcuts

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