objects

package
v0.0.0-...-9b4e82f Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2019 License: MIT Imports: 2 Imported by: 10

Documentation

Index

Constants

View Source
const BookIdentifiableType = "record_book"
View Source
const EffectIdentifiableType = "effect"
View Source
const ItemIdentifiableType = "item"
View Source
const LedgerIdentifiableType = "ledger"
View Source
const NotificationIdentifiableType = "notification"
View Source
const PortIdentifiableType = "portfolio"
View Source
const RecordIdentifiableType = "record_entry"
View Source
const StockIdentifiableType = "stock"

Variables

This section is empty.

Functions

This section is empty.

Types

type ActiveBuyRecord

type ActiveBuyRecord struct {
	RecordUuid string `json:"record_uud"`
	AmountLeft int64  `json:"still_own"`
}

type Book

type Book struct {
	Uuid          string            `json:"uuid"`
	LedgerUuid    string            `json:"ledger_uuid"`
	PortfolioUuid string            `json:"portfolio_uuid"`
	ActiveRecords []ActiveBuyRecord `json:"active_records" change:"-"`
}

func (Book) GetId

func (b Book) GetId() string

func (Book) GetType

func (Book) GetType() string

type Effect

type Effect struct {
	PortfolioUuid string         `json:"portfolio_uuid"`
	Uuid          string         `json:"uuid"`
	Title         string         `json:"title" change:"-"`
	Duration      utils.Duration `json:"duration"`
	StartTime     time.Time      `json:"time"`
	Type          string         `json:"type"`
	InnerEffect   interface{}    `json:"-" change:"inner"`
	Tag           string         `json:"tag"`
}

func (Effect) GetId

func (e Effect) GetId() string

func (Effect) GetType

func (Effect) GetType() string

type Item

type Item struct {
	Uuid            string      `json:"uuid"`
	Name            string      `json:"name"`
	ConfigId        string      `json:"config"`
	Type            string      `json:"type"`
	PortfolioUuid   string      `json:"portfolio_uuid"`
	CreateTime      time.Time   `json:"create_time"`
	InnerItemString string      `json:"-"`
	InnerItem       interface{} `json:"-" change:"inner"`
}

func (Item) GetId

func (i Item) GetId() string

func (Item) GetType

func (Item) GetType() string

type Ledger

type Ledger struct {
	Uuid         string `json:"uuid"`
	PortfolioId  string `json:"portfolio_id"`
	StockId      string `json:"stock_id"`
	Amount       int64  `json:"amount" change:"-"`
	RecordBookId string `json:"record_book"`
}

func (Ledger) GetId

func (ledger Ledger) GetId() string

func (Ledger) GetType

func (Ledger) GetType() string

type Notification

type Notification struct {
	Uuid          string      `json:"uuid"`
	PortfolioUuid string      `json:"portfolio_uuid"`
	Timestamp     time.Time   `json:"time"`
	Type          string      `json:"type"`
	Notification  interface{} `json:"notification"`
	Seen          bool        `json:"seen"`
}

func (Notification) GetId

func (note Notification) GetId() string

func (Notification) GetType

func (Notification) GetType() string

type Portfolio

type Portfolio struct {
	UserUUID string `json:"user_uuid"`
	Uuid     string `json:"uuid"`
	Wallet   int64  `json:"wallet" change:"-"`
	NetWorth int64  `json:"net_worth" change:"-"`
	Level    int64  `json:"level" change:"-"`
}

func (Portfolio) GetId

func (port Portfolio) GetId() string

func (Portfolio) GetType

func (Portfolio) GetType() string

type Record

type Record struct {
	Uuid           string    `json:"uuid"`
	SharePrice     int64     `json:"share_price"`
	ShareCount     int64     `json:"share_count"`
	Time           time.Time `json:"time"`
	RecordBookUuid string    `json:"book_uuid"`
	Fees           int64     `json:"fee"`
	Taxes          int64     `json:"taxes"`
	Bonus          int64     `json:"bonus"`
	Result         int64     `json:"result"`
}

func (Record) GetId

func (br Record) GetId() string

func (Record) GetType

func (Record) GetType() string

type Stock

type Stock struct {
	Uuid           string        `json:"uuid"`
	Name           string        `json:"name"`
	TickerId       string        `json:"ticker_id"`
	CurrentPrice   int64         `json:"current_price" change:"-"`
	OpenShares     int64         `json:"open_shares" change:"-"`
	ChangeDuration time.Duration `json:"-"`
}

func (Stock) GetId

func (stock Stock) GetId() string

func (Stock) GetType

func (stock Stock) GetType() string

type User

type User struct {
	UserName      string                 `json:"-"`
	Password      string                 `json:"-"`
	DisplayName   string                 `json:"display_name" change:"-"`
	Uuid          string                 `json:"-"`
	PortfolioId   string                 `json:"portfolio_uuid"`
	Active        bool                   `json:"active" change:"-"`
	Config        map[string]interface{} `json:"-"`
	ConfigStr     string                 `json:"-"`
	ActiveClients int64                  `json:"-"`
}

func (User) GetId

func (user User) GetId() string

func (User) GetType

func (user User) GetType() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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