insider

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultBaseUrl string = "https://marknadssok.fi.se/publiceringsklient"
View Source
const LanguageEN string = "en-GB"

Variables

This section is empty.

Functions

func GetDefaultHeaders

func GetDefaultHeaders() map[string]string

func WithBaseUrl

func WithBaseUrl(url string) func(client *Client)

func WithDebug

func WithDebug(debug bool) func(client *Client)

func WithLogger

func WithLogger(logger *zap.SugaredLogger) func(client *Client)

Types

type Client added in v1.1.1

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(opts ...func(*Client)) *Client

func (*Client) GetTodayTransactions added in v1.1.1

func (i *Client) GetTodayTransactions() ([]*Transaction, error)

func (*Client) GetTransactions added in v1.1.1

func (i *Client) GetTransactions(day time.Time) ([]*Transaction, error)

func (*Client) ReadCSV added in v1.1.1

func (i *Client) ReadCSV(reader io.Reader) ([]*Transaction, error)

type DateTime

type DateTime time.Time

func (DateTime) GetTime

func (f DateTime) GetTime() time.Time

func (DateTime) MarshalCSV

func (f DateTime) MarshalCSV() ([]byte, error)

func (*DateTime) MarshalJSON added in v1.1.2

func (f *DateTime) MarshalJSON() ([]byte, error)

func (*DateTime) UnmarshalCSV

func (f *DateTime) UnmarshalCSV(data []byte) error

func (*DateTime) UnmarshalJSON added in v1.1.2

func (f *DateTime) UnmarshalJSON(data []byte) error

type Transaction

type Transaction struct {
	PublicationDate                             DateTime  `csv:"Publication date"`
	Issuer                                      string    `csv:"Issuer"`
	LEICode                                     string    `csv:"LEI-code"`
	Notifier                                    string    `csv:"Notifier"`
	PersonDischargingManagerialResponsibilities string    `csv:"Person discharging managerial responsibilities"`
	Responsibilities                            string    `csv:"Responsibilities"`
	Position                                    string    `csv:"Position"`
	CloselyAssociated                           YesNoBool `csv:"Closely associated"`
	Amendment                                   YesNoBool `csv:"Amendment"`
	DetailsOfAmendment                          string    `csv:"Details of amendment"`
	InitialNotification                         YesNoBool `csv:"Initial notification"`
	LinkedToShareOptionProgramme                YesNoBool `csv:"Linked to share option programme"`
	NatureOfTransaction                         string    `csv:"Nature of transaction"`
	InstrumentType                              string    `csv:"Intrument type"`
	ISIN                                        string    `csv:"ISIN"`
	TransactionDate                             DateTime  `csv:"Transaction date"`
	Volume                                      float64   `csv:"Volume"`
	Unit                                        string    `csv:"Unit"`
	Price                                       float64   `csv:"Price"`
	Currency                                    string    `csv:"Currency"`
	TradingVenue                                string    `csv:"Trading venue"`
	Status                                      string    `csv:"Status"`
}

func (*Transaction) MarshalLogObject

func (f *Transaction) MarshalLogObject(enc zapcore.ObjectEncoder) error

type YesNoBool

type YesNoBool bool

func (*YesNoBool) UnmarshalCSV

func (ynb *YesNoBool) UnmarshalCSV(data []byte) error

UnmarshalCSV is an implementation of the Unmarshaler interface, converts a string record to a native value for this type.

Jump to

Keyboard shortcuts

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