repository

package
v0.0.0-...-5d1ecd3 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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) AddAudio

func (r Repository) AddAudio(author, title string) (string, error)

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)

Jump to

Keyboard shortcuts

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