server

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllocation

func GetAllocation(db *gorm.DB) gin.H

func GetGain

func GetGain(db *gorm.DB) gin.H

func GetIncome added in v0.1.3

func GetIncome(db *gorm.DB) gin.H

func GetInvestment

func GetInvestment(db *gorm.DB) gin.H

func GetLedger

func GetLedger(db *gorm.DB) gin.H

func GetOverview

func GetOverview(db *gorm.DB) gin.H

func Listen

func Listen(db *gorm.DB)

Types

type Aggregate

type Aggregate struct {
	Date         time.Time `json:"date"`
	Account      string    `json:"account"`
	Amount       float64   `json:"amount"`
	MarketAmount float64   `json:"market_amount"`
}

type AllocationTarget added in v0.1.3

type AllocationTarget struct {
	Name       string               `json:"name"`
	Target     float64              `json:"target"`
	Current    float64              `json:"current"`
	Aggregates map[string]Aggregate `json:"aggregates"`
}

type AllocationTargetConfig added in v0.1.3

type AllocationTargetConfig struct {
	Name     string
	Target   float64
	Accounts []string
}

type Breakdown

type Breakdown struct {
	Group            string  `json:"group"`
	InvestmentAmount float64 `json:"investment_amount"`
	WithdrawalAmount float64 `json:"withdrawal_amount"`
	MarketAmount     float64 `json:"market_amount"`
	XIRR             float64 `json:"xirr"`
}

type Gain

type Gain struct {
	Account          string     `json:"account"`
	OverviewTimeline []Overview `json:"overview_timeline"`
	XIRR             float64    `json:"xirr"`
}

type Income added in v0.1.3

type Income struct {
	Date     time.Time         `json:"date"`
	Postings []posting.Posting `json:"postings"`
}

type Overview

type Overview struct {
	Date             time.Time `json:"date"`
	InvestmentAmount float64   `json:"investment_amount"`
	WithdrawalAmount float64   `json:"withdrawal_amount"`
	GainAmount       float64   `json:"gain_amount"`
}

type Tax added in v0.1.3

type Tax struct {
	StartDate time.Time         `json:"start_date"`
	EndDate   time.Time         `json:"end_date"`
	Postings  []posting.Posting `json:"postings"`
}

Jump to

Keyboard shortcuts

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