Documentation ¶
Index ¶
- Variables
- type Repository
- func (r Repository) AddAudio(author, title string) (string, error)
- func (r Repository) AddUser(email, name, password string) (string, error)
- func (r Repository) DeleteAudioByID(id string) error
- func (r Repository) DeleteUserByID(id string) (model.User, error)
- func (r Repository) GetAllAudio() ([]model.Audio, error)
- func (r Repository) GetAudioByID(id string) (model.Audio, error)
- func (r Repository) GetAudioByKey(key string) ([]model.Audio, error)
- func (r Repository) GetUserByID(id string) (model.User, error)
- func (r Repository) UpdateAudioByID(id, author, title string) error
- func (r Repository) UpdateUserByID(id, name, email, password string) (model.User, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var AudioNotFoundError = errors.New("audio not found error")
View Source
var TableNotFoundError = errors.New("table not found error")
View Source
var UserNotFoundError = errors.New("user not found error")
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func New ¶
func New(db *mongo.Database) Repository
func (Repository) AddUser ¶
func (r Repository) AddUser(email, name, password string) (string, error)
func (Repository) DeleteAudioByID ¶
func (r Repository) DeleteAudioByID(id string) error
func (Repository) DeleteUserByID ¶
func (r Repository) DeleteUserByID(id string) (model.User, error)
func (Repository) GetAllAudio ¶
func (r Repository) GetAllAudio() ([]model.Audio, error)
func (Repository) GetAudioByID ¶
func (r Repository) GetAudioByID(id string) (model.Audio, error)
func (Repository) GetAudioByKey ¶
func (r Repository) GetAudioByKey(key string) ([]model.Audio, error)
func (Repository) GetUserByID ¶
func (r Repository) GetUserByID(id string) (model.User, error)
func (Repository) UpdateAudioByID ¶
func (r Repository) UpdateAudioByID(id, author, title string) error
func (Repository) UpdateUserByID ¶
func (r Repository) UpdateUserByID(id, name, email, password string) (model.User, error)
Click to show internal directories.
Click to hide internal directories.