model

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: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AudioAuthorEmpty = errors.New("audio author name is empty")
View Source
var AudioTitleEmpty = errors.New("audio title is empty")
View Source
var UserEmailEmpty = errors.New("user email is empty")
View Source
var UserEmailLength = errors.New("user email must be between 20 - 40 symbols length")
View Source
var UserNameEmpty = errors.New("user name is empty")
View Source
var UserNameLength = errors.New("user name length must be between 5 - 16 symbols length")
View Source
var UserPasswordEmpty = errors.New("user password is empty")
View Source
var UserPasswordLength = errors.New("user password must be between 8 - 40 symbols length")

Functions

func ValidateAudio

func ValidateAudio(author, title string) error

func ValidateUser

func ValidateUser(email, name, password string) error

Types

type Audio

type Audio struct {
	ID     string `json:"id" bson:"_id,omitempty"`
	Author string `json:"author" bson:"author"`
	Title  string `json:"title" bson:"title"`
}

type User

type User struct {
	ID       string `json:"id" bson:"_id,omitempty"`
	Email    string `json:"email" bson:"email"`
	Name     string `json:"name" bson:"name"`
	Password string `json:"password" bson:"password"`
}

Jump to

Keyboard shortcuts

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