user

package
v0.0.0-...-d3537bf Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(id string, mnemonic string) error

func Create

func Create() (uid string, err error)

func Transfer

func Transfer(uid string, from string, to string, amount int64) error

Types

type User

type User struct {
	Id       string `json:"-" gorm:"primaryKey;not null"`
	Mnemonic string `json:"-" gorm:"unique;not null"`
}

func Get

func Get(id string) (*User, error)

func (*User) AfterFind

func (u *User) AfterFind(tx *gorm.DB) (err error)

func (*User) BeforeSave

func (u *User) BeforeSave(tx *gorm.DB) (err error)

Jump to

Keyboard shortcuts

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