models

package
v0.0.0-...-d85391b Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConvertDto

type ConvertDto struct {
	InputCurrencyLable  string  `json:"input_currency_lable" example:"USD"`
	OutputCurrencyLable string  `json:"output_currency_lable" example:"EUR"`
	Value               float64 `json:"value" example:"3000"`

} // @name ConvertDto

Dto for converting requests ConvertDto godoc

type CurrencySnapshot

type CurrencySnapshot struct {
	Id              primitive.ObjectID     `bson:"_id,omitempty"`
	Lable           string                 `bson:"lable" json:"base_code"`
	LastUpdate      string                 `bson:"last_update" json:"time_last_update_utc"`
	LastUpdateUnix  int64                  `bson:"last_update_unix" json:"time_last_update_unix"`
	NextUpdate      string                 `bson:"next_update" json:"time_next_update_utc"`
	NextUpdateUnix  int64                  `bson:"next_update_unix" json:"time_next_update_unix"`
	ConversionRates map[string]interface{} `bson:"conversion_rates" json:"conversion_rates"`
}

func (*CurrencySnapshot) Converting

func (currencySnapshot *CurrencySnapshot) Converting(inputCurrencyLable, outputCurrencyLable string, value float64) (float64, error)

type GetCurrencyListResponseDto

type GetCurrencyListResponseDto struct {
	Lables []string `json:"labels" example:"[USD, EUR, UAH]"`

} // @name GetCurrencyListResponseDto

GetCurrencyListResponseDto godoc

type ServiceInfo

type ServiceInfo struct {
	Name        string
	UpTime      time.Time
	Environment string
	Version     string
}

type Stock

type Stock struct {
	Symbol             string  `json:"symbol"`
	Name               string  `json:"name"`
	Price              float64 `json:"price"`
	Change             float64 `json:"change"`
	PercentChange      float64 `json:"percent_change"`
	Volume             string  `json:"volume"`
	AvgVolumeFor3Month string  `json:"avg_volume_for_3_month"`
	MarketCap          string  `json:"marketCap"`
	PERatio            string  `json:"pe_ratio"`
	CreatedAt          string  `json:"created_at"`
	CreatedUnix        int64   `json:"created_unix"`
}

func (*Stock) ProtoToDomain

func (stock *Stock) ProtoToDomain(proto *pb.Stocks)

Jump to

Keyboard shortcuts

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