Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SecretNote ¶
type SecretNoteService ¶
type SecretNoteService struct {
// contains filtered or unexported fields
}
SecretNoteService maintains the user notes.
func NewSecretNoteService ¶
func NewSecretNoteService(dbService db.DatabaseService) *SecretNoteService
NewSecretNoteService creates a SecretNoteService that is ready to use.
func (*SecretNoteService) Add ¶
func (ns *SecretNoteService) Add(user string, n SecretNote) error
Add adds a new SecretNote for the given user by using the SecretNoteService.
func (*SecretNoteService) GetAll ¶
func (ns *SecretNoteService) GetAll(user string) ([]SecretNote, error)
Get returns all the SecretNotes of a given user by using the SecretNoteService.
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
UserService holds
func NewUserService ¶
func NewUserService(dbService db.DatabaseService) *UserService
NewUserService creates a ready to use user service.
func (*UserService) Add ¶
func (us *UserService) Add(name, password string) error
Add validates a user password and creates a new user.
func (*UserService) ValidatePassword ¶
func (us *UserService) ValidatePassword(name, providedPwd string) error
ValidatePassword checks the provided password of an existing user.
func (*UserService) ValidateUser ¶
func (us *UserService) ValidateUser(name string) error
ValidateUser checks the provided username belongs to an existing user.
Click to show internal directories.
Click to hide internal directories.