user

package
v0.0.0-...-2023e6a Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoRecordFound = errors.New("no record found")
)

Functions

func AddTrasactionHash

func AddTrasactionHash(userId string, hash string) error

func AddUser

func AddUser() (string, error)

func GetMnemonic

func GetMnemonic(userId string) (mnemonic string, err error)

func SetLockStatus

func SetLockStatus(userId string, lockStatus bool) error

Types

type User

type User struct {
	UserId       string                    `json:"userId" gorm:"primary_key"`
	Mnemonic     string                    `json:"-" gorm:"unique;not null"`
	Transactions []transaction.Transaction `json:"transactions" gorm:"foreignKey:UserId"`
	IsUserLocked bool                      `json:"isUserLocked"`
}

func GetUser

func GetUser(userId string) (user User, err error)

Jump to

Keyboard shortcuts

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