Documentation ¶
Index ¶
- Variables
- type AuthService
- func (v AuthService) CreateToken(data interface{}) string
- func (v AuthService) HashPassword(password string) string
- func (v AuthService) Login(userData Requests.Login) *Models.Account
- func (v AuthService) Register(userData Requests.Register)
- func (v AuthService) ValidateRegister(userData Requests.Register) bool
- type NotesService
- func (v NotesService) CreateNote(noteData Requests.CreateNote) *Models.Note
- func (v NotesService) DeleteNote(NoteID string) bool
- func (v NotesService) GetNotes(UserID string) []Models.Note
- func (v NotesService) GetSingleNote(NoteID string) *Models.Note
- func (v NotesService) UpdateNote(reqData Requests.CreateNote, NoteID string) *Models.Note
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) 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) GetSingleNote ¶
func (v NotesService) GetSingleNote(NoteID string) *Models.Note
func (NotesService) UpdateNote ¶
func (v NotesService) UpdateNote(reqData Requests.CreateNote, NoteID string) *Models.Note
Click to show internal directories.
Click to hide internal directories.