dal

package
v0.0.0-...-6a94060 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

The dal package contains the implementaiton of the datastore operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserModel

type UserModel struct {
	// contains filtered or unexported fields
}

func NewUserModel

func NewUserModel(env *models.Env) *UserModel

func (*UserModel) All

func (u *UserModel) All() ([]*models.User, error)

All returns a slice of all users

func (*UserModel) Create

func (u *UserModel) Create(user *models.User) (*models.User, error)

Create a new user

func (*UserModel) Delete

func (u *UserModel) Delete() error

func (*UserModel) FetchById

func (u *UserModel) FetchById(userId int) (*models.User, error)

FetchById returns a single user by id

func (*UserModel) Update

func (u *UserModel) Update() (*models.User, error)

Jump to

Keyboard shortcuts

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