pgsql

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

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

Go to latest
Published: Feb 4, 2022 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{}

User represents the client for user table

func NewUser

func NewUser() *User

NewUser returns a new User instance

func (*User) Create

func (s *User) Create(cl orm.DB, req twisk.User) (*twisk.User, error)

Create creates new user

func (*User) Delete

func (s *User) Delete(cl orm.DB, user *twisk.User) error

Delete delets a user by ID

func (*User) List

func (s *User) List(cl orm.DB, query string, limit, offset int) ([]twisk.User, error)

List returns list of all users retreivable for the current user, depending on role

func (*User) Update

func (s *User) Update(cl orm.DB, user *twisk.User) (*twisk.User, error)

Update updates a single user

func (*User) View

func (s *User) View(cl orm.DB, id int64) (*twisk.User, error)

View returns single user by ID/PrimaryKey

Jump to

Keyboard shortcuts

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