mutation

package
v0.0.0-...-e4f42ff Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2022 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachDates

func AttachDates(payloadRecord PayloadRecord, instrumentData *Models.InstrumentDateByCompany)

Get or create a fund for a given entry record.

func AttachFund

func AttachFund(payloadRecord PayloadRecord, db *gorm.DB, instrumentData *Models.InstrumentDateByCompany)

Create the fund from the metadata on the file.

func AttachInstrument

func AttachInstrument(payloadRecord PayloadRecord, db *gorm.DB, instrumentData *Models.InstrumentDateByCompany)

func ConvertStringToFloat

func ConvertStringToFloat(originalString string) float64

func Mutation

func Mutation(db *gorm.DB) *graphql.Object

func ProcessSheet

func ProcessSheet(PayloadRecords []PayloadRecord, db *gorm.DB)

func Results

func Results() *graphql.Object

Types

type Payload

type Payload struct {
	Caches                  []PayloadRecord `json:"מזומנים"`
	GovernmentBond          []PayloadRecord `json:"תעודות התחייבות ממשלתיות"`
	CommercialDebt          []PayloadRecord `json:"תעודות חוב מסחריות"`
	CorporateBond           []PayloadRecord `json:"אג\"ח קונצרני"`
	Stock                   []PayloadRecord `json:"מניות"`
	ETF                     []PayloadRecord `json:"תעודות סל"`
	MutualFund              []PayloadRecord `json:"קרנות נאמנות"`
	Warrant                 []PayloadRecord `json:"כתבי אופציה"`
	Structured              []PayloadRecord `json:"מוצרים מובנים"`
	NotTradedGovernmentBond []PayloadRecord `json:"לא סחיר - תעודות התחייבות ממשלתי"`
	NotTradedCommercialDebt []PayloadRecord `json:"לא סחיר - תעודות חוב מסחריות"`
	NotTradedCorporateBond  []PayloadRecord `json:"לא סחיר - אג\"ח קונצרני"`
	NotTradedStock          []PayloadRecord `json:"לא סחיר - מניות"`
	NotTradedPrivateEquity  []PayloadRecord `json:"לא סחיר - קרנות השקעה"`
	NotTradedWarrant        []PayloadRecord `json:"לא סחיר - כתבי אופציה"`
	NotTradedOption         []PayloadRecord `json:"לא סחיר - אופציות"`
	NotTradedFuture         []PayloadRecord `json:"לא סחיר - חוזים עתידיים"`
	NotTradedStructured     []PayloadRecord `json:"לא סחיר - מוצרים מובנים"`
	NotTradedLoans          []PayloadRecord `json:"הלוואות"`
	Deposits                []PayloadRecord `json:"פקדונות מעל 3 חודשים"`
	RealEstate              []PayloadRecord `json:"זכויות מקרקעין"`
	PortfolioCompanies      []PayloadRecord `json:"השקעה בחברות מוחזקות"`
	OtherInvestments        []PayloadRecord `json:"השקעות אחרות"`
	InvestmentCommitments   []PayloadRecord `json:"יתרת התחייבות להשקעה"`
	FairValue               []PayloadRecord `json:"עלות מתואמת אג\"ח קונצרני סחיר"`
	NotTradedFairValue      []PayloadRecord `json:"עלות מתואמת אג\"ח קונצרני ל.סחיר"`
	CreditFairValue         []PayloadRecord `json:"עלות מתואמת מסגרות אשראי ללווים"`
}

func JsonStringParse

func JsonStringParse(JsonString string) (Payload, error)

Handle the json string processing to an object.

type PayloadRecord

type PayloadRecord struct {
	Consortium                  string `json:"Consortium"`
	Coupon                      string `json:"coupon"`
	Currency                    string `json:"Currency"`
	DateOfInvestmentCommitments string `json:"Date of investment commitments"`
	DateOfValuation             string `json:"Date of valuation"`
	Dividend                    string `json:"dividend"`
	Duration                    string `json:"Duration"`
	EffectiveInterest           string `json:"Effective interest"`
	FairValue                   string `json:"Fair value"`
	HoldingPeriodReturnYield    string `json:"Holding period return/yield"`
	Index                       string `json:"index"`
	Industry                    string `json:"Industry"`
	InformationProvider         string `json:"Information provider"`
	InstrumentName              string `json:"Instrument name"`
	InstrumentNumber            string `json:"Instrument number"`
	Investment                  string `json:"Investment"`
	Israel                      bool   `json:"israel"`
	IssuerNumber                string `json:"Issuer number"`
	MarketName                  string `json:"Market name"`
	NominalValue                string `json:"Nominal value"`
	Price                       string `json:"Price"`
	PurchaseDate                string `json:"Purchase date"`
	Rate                        string `json:"Rate"`
	RateOfFundHolding           string `json:"Rate of fund holding"`
	RateOfInstrumentType        string `json:"Rate of instrument type"`
	RateOfRegister              string `json:"Rate of register"`
	Rating                      string `json:"Rating"`
	RatingAgencies              string `json:"Rating agencies"`
	RealEstateAddress           string `json:"Real estate address"`
	RealEstateType              string `json:"Real estate type"`
	TotalCommitment             string `json:"total commitment"`
	UnderlyingAsset             string `json:"Underlying asset"`
	YieldToMaturity             string `json:"Yield to maturity"`

	Date              string `json:"Date"`
	InstitutionalBody string `json:"Institutional body"`
	FundName          string `json:"Fund Name"`
	FundNumber        string `json:"Fund Number"`
}

type Result

type Result struct {
	Data  string `json:"data"`
	Error string `json:"error"`
}

func MigrateProcessedObject

func MigrateProcessedObject(parsedPayload Payload, db *gorm.DB) Result

Jump to

Keyboard shortcuts

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