models

package
v0.0.0-...-45a0741 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	New = iota
	Pending
	Approved
	Suspended
	Banned
)

Different user statuses

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session struct {
	ID     bson.ObjectId `bson:"_id,omitempty" json:"id"`
	UserID bson.ObjectId `bson:"userId" json:"userId"`
	Token  string        `bson:"token" json:"token"`
}

type Settings

type Settings struct {
	ID                     bson.ObjectId `bson:"_id,omitempty" json:"id"`
	UserID                 bson.ObjectId `bson:"userId" json:"userId"`
	IsSetupTrackerEnabled  bool          `bson:"isSetupTrackerEnabled" json:"isSetupTrackerEnabled"`
	IsWelcomeDialogEnabled bool          `bson:"isWelcomeDialogEnabled" json:"isWelcomeDialogEnabled"`
}

func DefaultSettings

func DefaultSettings(userId bson.ObjectId) *Settings

type User

type User struct {
	ID           bson.ObjectId `bson:"_id,omitempty" json:"id"`
	MeritAddress string        `bson:"address"`
	MeritAlias   string        `bson:"alias"`
	PublicKey    string        `bson:"publicKey"`
	Status       int           `bson:"status"` // maps to the iota above
	Verified     bool          `bson:"verified"`
	Rating       float32       `bson:"rating"`
}

User is a basic model that maps a user in the market to the Merit blockchain

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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