mockData

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package mockData provides deterministic mock datasets for tests and examples.

Index

Constants

View Source
const (
	Fiat    = "Fiat"
	Crypto  = "Crypto"
	Metals  = "Psuedo"
	Testing = "Testing"
)

Variables

View Source
var BiologicalSexes map[string]BiologicalSex
View Source
var Countries map[string]Country
View Source
var Currencies map[string]Currency
View Source
var Genders map[string]Gender
View Source
var Ladder map[string]Rung
View Source
var LadderSize int
View Source
var Titles map[string]Title

Functions

func GetBiologyList

func GetBiologyList() []string

func GetGenderList

func GetGenderList() []string

func GetList

func GetList() []string

func GetRateLadderList

func GetRateLadderList() []string

func IsValidBiology

func IsValidBiology(biology string) bool

func IsValidGender

func IsValidGender(in string) bool

func IsValidPeriod

func IsValidPeriod(in string) bool

func IsValidTitle

func IsValidTitle(in string) bool

func LadderToString

func LadderToString(R map[string]Rung) string

Types

type BiologicalSex

type BiologicalSex struct {
	Name        string
	Description string
}

BiologicalSex represents information of an indivual biology.

func GetBiologyInfo

func GetBiologyInfo(biology string) BiologicalSex

type Country

type Country struct {
	IBANLength int    // The expected length of the IBAN for the country.
	Currency   string // The currency code for the country.
	ISOCode    string // The ISO country code
	ISOCode3   string // The ISO country code
}

Country represents information about the IBAN format for a specific country.

func GetCountryInfo

func GetCountryInfo(countryCode string) (Country, error)

type Currency

type Currency struct {
	Code               string // The ISO currency code
	SpotDays           int    // The number of spot days for the currency
	Name               string // The name of the currency
	Character          string // The character of the currency
	DPS                int    // The number of decimal places for the currency
	QuoteDPS           int    // The number of decimal places for the currency when quoting
	Type               string // The type of currency
	MajorUnit          string // The major unit of the currency
	MinorUnit          string // The minor unit of the currency
	MinorCharacter     string // The minor character of the currency
	ISONumericCode     string // The ISO numeric code of the currency
	KnownAs            string // The known as name of the currency
	YearOfIntroduction int    // The year the currency was introduced
}

Currency represents information about the IBAN format for a specific country.

func GetCurrency

func GetCurrency(code string) (Currency, error)

func (*Currency) Age

func (C *Currency) Age() int

type Gender

type Gender struct {
	Name        string
	Description string
}

type Indexer

type Indexer struct {
	Index int
}

type Rung

type Rung struct {
	Code        string
	Name        string
	Alternative string
	Index       int
}

func GetRateLadderByIndex

func GetRateLadderByIndex(index int) Rung

func GetTenorInfo

func GetTenorInfo(tenor string) (Rung, error)

type Title

type Title struct {
	Title string // The title
}

Title represents information of an indivual title.

Jump to

Keyboard shortcuts

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