entity

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

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

Go to latest
Published: Nov 20, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const RegisterQueue = "user-register"

Variables

View Source
var ErrInvalidEntity = errors.New("Invalid entity")

ErrInvalidEntity invalid entity

View Source
var ErrNotFound = errors.New("Entity not found")

ErrNotFound invalid entity

Functions

This section is empty.

Types

type User

type User struct {
	ID        int64
	Email     string
	Password  string
	Username  string
	CreatedAt sql.NullTime
	UpdatedAt sql.NullTime
}

User data

func NewUser

func NewUser(email, password, username string) (*User, error)

NewUser create a new user

func (*User) Validate

func (u *User) Validate() error

Validate validate data

func (*User) ValidatePassword

func (u *User) ValidatePassword(p string) error

ValidatePassword validate user password

type UserBrokerProvider

type UserBrokerProvider interface {
	Publish(queue string, body interface{}) error
}

Jump to

Keyboard shortcuts

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