models

package
v0.0.0-...-91d0ab7 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FundMetadata

type FundMetadata struct {
	ID             uint   `db:"id"`
	FundHouse      string `db:"fund_house"`
	SchemeType     string `db:"scheme_type"`
	SchemeCategory string `db:"scheme_category"`
	SchemeCode     int    `db:"scheme_code"`
	SchemeName     string `db:"scheme_name"`
}

type JsonResponse

type JsonResponse struct {
	Meta   MetaData  `json:"meta"`
	Period string    `json:"period,omitempty"`
	Data   []NAVData `json:"data"`
}

JsonResponse struct for the API response

type MetaData

type MetaData struct {
	FundHouse      string `json:"fund_house"`
	SchemeType     string `json:"scheme_type"`
	SchemeCategory string `json:"scheme_category"`
	SchemeCode     int    `json:"scheme_code"`
	SchemeName     string `json:"scheme_name"`
}
type NAVData struct {
	Date string `json:"date"`
	Nav  string `json:"nav"`
}

Define a NAVData struct for individual data points

type NavRecord struct {
	ID     uint      `db:"id"`
	FundID uint      `db:"fund_id"`
	Date   time.Time `db:"date"`
	Nav    float64   `db:"nav"`
}

type UpstreamResponse

type UpstreamResponse struct {
	Meta MetaData  `json:"meta"`
	Data []NAVData `json:"data"`
}

UpstreamResponse struct to match the upstream API response structure

Jump to

Keyboard shortcuts

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