package
Version:
v0.0.0-...-91d0ab7
Opens a new window with list of versions in this module.
Published: Sep 15, 2024
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
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 struct {
Meta MetaData `json:"meta"`
Period string `json:"period,omitempty"`
Data []NAVData `json:"data"`
}
JsonResponse struct for the API response
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 struct {
Meta MetaData `json:"meta"`
Data []NAVData `json:"data"`
}
UpstreamResponse struct to match the upstream API response structure
Source Files
¶
Click to show internal directories.
Click to hide internal directories.