store

package
v0.0.0-...-f0f63f4 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	ID        string     `db:"id"`
	FirstName string     `db:"first_name"`
	LastName  string     `db:"last_name"`
	Email     string     `db:"email"`
	Password  string     `db:"password"`
	StatusID  uint8      `db:"status_id"`
	CreatedAt *time.Time `db:"created_at"`
	UpdatedAt *time.Time `db:"updated_at"`
	DeletedAt *time.Time `db:"deleted_at"`

	TableName      string
	PrimaryKeyName string
}

User is a user of the system.

func NewUser

func NewUser() User

NewUser returns an empty user.

func (*User) PrimaryKey

func (x *User) PrimaryKey() string

PrimaryKey returns the primary key field.

func (*User) Table

func (x *User) Table() string

Table returns the table name.

type UserGroup

type UserGroup []User

UserGroup represents a group of users.

func NewGroup

func NewGroup() UserGroup

NewGroup returns an empty group.

func (UserGroup) PrimaryKey

func (x UserGroup) PrimaryKey() string

PrimaryKey returns the primary key field.

func (UserGroup) Table

func (x UserGroup) Table() string

Table returns the table name.

type UserStore

type UserStore struct {
	*query.Q
	// contains filtered or unexported fields
}

UserStore is a user of the system.

func NewUserStore

func NewUserStore(m *mock.Mocker, db api.IDatabase, q *query.Q) UserStore

NewUserStore returns a new query object.

func (*UserStore) Create

func (x *UserStore) Create(uuid, firstName, lastName, email, password string) (string, error)

Create adds a new user.

Jump to

Keyboard shortcuts

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