services

package
v0.0.0-...-ab59889 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AccountCollection *mongo.Collection = Database.GetCollection(Database.DB, "accounts")
View Source
var NoteCollection *mongo.Collection = Database.GetCollection(Database.DB, "notes")

Functions

This section is empty.

Types

type AuthService

type AuthService struct{}

func (AuthService) CreateToken

func (v AuthService) CreateToken(data interface{}) string

func (AuthService) HashPassword

func (v AuthService) HashPassword(password string) string

func (AuthService) Login

func (v AuthService) Login(userData Requests.Login) *Models.Account

func (AuthService) Register

func (v AuthService) Register(userData Requests.Register)

func (AuthService) ValidateRegister

func (v AuthService) ValidateRegister(userData Requests.Register) bool

type NotesService

type NotesService struct{}

func (NotesService) CreateNote

func (v NotesService) CreateNote(noteData Requests.CreateNote) *Models.Note

func (NotesService) DeleteNote

func (v NotesService) DeleteNote(NoteID string) bool

func (NotesService) GetNotes

func (v NotesService) GetNotes(UserID string) []Models.Note

func (NotesService) GetSingleNote

func (v NotesService) GetSingleNote(NoteID string) *Models.Note

func (NotesService) UpdateNote

func (v NotesService) UpdateNote(reqData Requests.CreateNote, NoteID string) *Models.Note

Jump to

Keyboard shortcuts

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