user

package
v0.0.0-...-32dec47 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: GPL-3.0 Imports: 4 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(userId string, email string) error

func GetMnemonic

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

Types

type User

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

func GetUser

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

Jump to

Keyboard shortcuts

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