users

package
v0.0.0-...-a2a535d Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: GPL-3.0 Imports: 2 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     gocql.UUID
	Number string
	Pin    string
}

func (*User) SetNumber

func (u *User) SetNumber(number string)

func (*User) SetPin

func (u *User) SetPin(pin string)

type Users

type Users map[string]User

func NewUsers

func NewUsers() *Users

func (*Users) AddUser

func (u *Users) AddUser(user *User) error

func (*Users) All

func (u *Users) All() (*Users, error)

func (*Users) CheckIfUserExists

func (u *Users) CheckIfUserExists(number string) bool

func (*Users) CreateNewUser

func (u *Users) CreateNewUser(number, pin string) (*User, error)

func (*Users) DeleteUser

func (u *Users) DeleteUser(number string) error

func (*Users) GetAllUsers

func (u *Users) GetAllUsers() Users

func (*Users) GetUserCount

func (u *Users) GetUserCount() int

func (*Users) ReadUser

func (u *Users) ReadUser(number string) *User

func (*Users) UpdateUser

func (u *Users) UpdateUser(number, pin string) error

Jump to

Keyboard shortcuts

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