store

package
v0.0.0-...-7eaaaab Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: MIT Imports: 3 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 {
	component.IQuery

	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"`
	// contains filtered or unexported fields
}

User is a user of the system.

func NewUser

func NewUser(db component.IDatabase, q component.IQuery) *User

NewUser returns a new query object.

func (*User) Create

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

Create adds a new user.

func (*User) NewGroup

func (x *User) NewGroup() *UserGroup

NewGroup returns an empty group.

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.

func (*User) Update

func (x *User) Update(ID, firstName, lastName, email, password string) (err error)

Update makes changes to a user.

type UserGroup

type UserGroup []User

UserGroup represents a group of users.

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.

Jump to

Keyboard shortcuts

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