model

package
v0.0.0-...-456edf8 Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComparePasswords

func ComparePasswords(hashedPwd string, plainPwd []byte) bool

func HashPassword

func HashPassword(password string) string

Types

type Api

type Api struct {
	UserID       int64        `db:"user_id"`
	ApiKey       int          `db:"api_key"`
	DateAdded    sql.NullTime `db:"date_added"`
	DateModified sql.NullTime `db:"date_modified"`
}

type ChainHeadResponse

type ChainHeadResponse struct {
	HeadSlot                   string `json:"headSlot"`
	HeadEpoch                  string `json:"headEpoch"`
	HeadBlockRoot              string `json:"headBlockRoot"`
	FinalizedSlot              string `json:"finalizedSlot"`
	FinalizedEpoch             string `json:"finalizedEpoch"`
	FinalizedBlockRoot         string `json:"finalizedBlockRoot"`
	JustifiedSlot              string `json:"justifiedSlot"`
	JustifiedEpoch             string `json:"justifiedEpoch"`
	JustifiedBlockRoot         string `json:"justifiedBlockRoot"`
	PreviousJustifiedSlot      string `json:"previousJustifiedSlot"`
	PreviousJustifiedEpoch     string `json:"previousJustifiedEpoch"`
	PreviousJustifiedBlockRoot string `json:"previousJustifiedBlockRoot"`
}

func (*ChainHeadResponse) GetFinalizedSlot

func (ch *ChainHeadResponse) GetFinalizedSlot() (int64, error)

func (*ChainHeadResponse) GetHeadSlot

func (ch *ChainHeadResponse) GetHeadSlot() (int64, error)

type Transaction

type Transaction struct {
	UserID       int64        `db:"user_id"`
	Action       string       `db:"action"`
	DateAdded    sql.NullTime `db:"date_added"`
	DateModified sql.NullTime `db:"date_modified"`
}

type User

type User struct {
	UserID       int64        `db:"user_id"`
	Username     string       `db:"username"`
	Password     string       `db:"password"` //salted
	DateAdded    sql.NullTime `db:"date_added"`
	DateModified sql.NullTime `db:"date_modified"`
}

func (*User) SetPassword

func (u *User) SetPassword(password string)

Jump to

Keyboard shortcuts

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