details

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2025 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package details is a generated GoMock package.

Package details is a generated GoMock package.

Index

Constants

View Source
const (
	ResponseSectionTypeValueHeader          = "header"
	ResponseSectionTypeValueTable           = "table"
	ResponseSectionTypeValueHorizontalTable = "horizontalTable"
	ResponseSectionTypeValueDocuments       = "documents"
	SectionTitleOverview                    = "Übersicht"
	SectionTitlePerformance                 = "Performance"
	SectionTitleTransaction                 = "Transaktion"
	SectionTitleTransactionAlt              = "Geschäft"
	SectionTitleSavingPlan                  = "Sparplan"
	OverviewDataTitleOrderType              = "Orderart"
	OverviewDataTitleAsset                  = "Asset"
	OverviewDataTitleUnderlyingAsset        = "Basiswert"
	OverviewDataTitleSecurity               = "Wertpapier"
	TransactionDataTitleShares              = "Anteile"
	TransactionDataTitleSharesAlt           = "Aktien"
	TransactionDataTitleRate                = "Aktienkurs"
	TransactionDataTitleRateAlt             = "Anteilspreis"
	TransactionDataTitleRateAlt2            = "Dividende je Aktie"
	TransactionDataTitleRateAlt3            = "Dividende pro Aktie"
	TransactionDataTitleCommission          = "Gebühr"
	TransactionDataTitleTotal               = "Gesamt"
	TransactionDataTitleTotalAlt            = "Summe"
	TransactionDataTitleTax                 = "Steuern"
	PerformanceDataTitleYield               = "Rendite"
	PerformanceDataTitleProfit              = "Gewinn"
	PerformanceDataTitleLoss                = "Verlust"
	OrderTypeTextsSale                      = "Verkauf"
	OrderTypeTextsPurchase                  = "Kauf"
	TrendNegative                           = "negative"
)
View Source
const (
	RequestDataType = "timelineDetailV2"
)

Variables

View Source
var (
	ErrSectionTypeNotFound   = errors.New("section type not found")
	ErrSectionContainsNoType = errors.New("section contains no type")
)
View Source
var ErrSectionDataTitleNotFound = errors.New("section data title not found")
View Source
var ErrTypeResolverUnsupportedType = errors.New("could not resolve transaction type")

Functions

func DepositDetector

func DepositDetector(eventType transactions.EventType, _ NormalizedResponse) bool

func DividendPayoutDetector

func DividendPayoutDetector(eventType transactions.EventType, _ NormalizedResponse) bool

func InterestPayoutDetector

func InterestPayoutDetector(eventType transactions.EventType, _ NormalizedResponse) bool

func PurchaseDetector

func PurchaseDetector(eventType transactions.EventType, response NormalizedResponse) bool

func RoundUpDetector

func RoundUpDetector(eventType transactions.EventType, _ NormalizedResponse) bool

func SaleDetector

func SaleDetector(eventType transactions.EventType, response NormalizedResponse) bool

func SavebackDetector

func SavebackDetector(eventType transactions.EventType, _ NormalizedResponse) bool

func WithdrawalDetector

func WithdrawalDetector(eventType transactions.EventType, _ NormalizedResponse) bool

Types

type ActivityLogResponseNormalizer

type ActivityLogResponseNormalizer struct {
	TransactionResponseNormalizer
}

func NewActivityResponseNormalizer

func NewActivityResponseNormalizer(logger *log.Logger) ActivityLogResponseNormalizer

func (ActivityLogResponseNormalizer) Normalize

type Client

type Client struct {
	api.WSClient
}

func NewClient

func NewClient(reader reader.Interface, logger *log.Logger) Client

type ClientInterface

type ClientInterface interface {
	api.WSDetailsGetterClientInterface
}

type MockClientInterface

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

MockClientInterface is a mock of ClientInterface interface.

func NewMockClientInterface

func NewMockClientInterface(ctrl *gomock.Controller) *MockClientInterface

NewMockClientInterface creates a new mock instance.

func (*MockClientInterface) Details

func (m *MockClientInterface) Details(itemID string, v any) error

Details mocks base method.

func (*MockClientInterface) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

type MockClientInterfaceMockRecorder

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

MockClientInterfaceMockRecorder is the mock recorder for MockClientInterface.

func (*MockClientInterfaceMockRecorder) Details

func (mr *MockClientInterfaceMockRecorder) Details(itemID, v any) *gomock.Call

Details indicates an expected call of Details.

type MockTypeResolverInterface

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

MockTypeResolverInterface is a mock of TypeResolverInterface interface.

func NewMockTypeResolverInterface

func NewMockTypeResolverInterface(ctrl *gomock.Controller) *MockTypeResolverInterface

NewMockTypeResolverInterface creates a new mock instance.

func (*MockTypeResolverInterface) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTypeResolverInterface) Resolve

func (m *MockTypeResolverInterface) Resolve(eventType transactions.EventType, response NormalizedResponse) (Type, error)

Resolve mocks base method.

type MockTypeResolverInterfaceMockRecorder

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

MockTypeResolverInterfaceMockRecorder is the mock recorder for MockTypeResolverInterface.

func (*MockTypeResolverInterfaceMockRecorder) Resolve

func (mr *MockTypeResolverInterfaceMockRecorder) Resolve(eventType, response any) *gomock.Call

Resolve indicates an expected call of Resolve.

type NormalizedResponseDocumentsSection

type NormalizedResponseDocumentsSection struct {
	Data  []NormalizedResponseDocumentsSectionData `json:"data"`
	Title string                                   `json:"title"`
	Type  string                                   `json:"type"`
}

type NormalizedResponseDocumentsSectionData

type NormalizedResponseDocumentsSectionData struct {
	Action      NormalizedResponseSectionAction `json:"action"`
	Detail      string                          `json:"detail"`
	ID          string                          `json:"id"`
	PostboxType string                          `json:"postboxType"`
	Title       string                          `json:"title"`
}

type NormalizedResponseHeaderSection

type NormalizedResponseHeaderSection struct {
	Action NormalizedResponseSectionAction     `json:"action"`
	Data   NormalizedResponseHeaderSectionData `json:"data"`
	Title  string                              `json:"title"`
	Type   string                              `json:"type"`
}

type NormalizedResponseHeaderSectionData

type NormalizedResponseHeaderSectionData struct {
	Icon         string `json:"icon"`
	Status       string `json:"status"`
	SubtitleText string `json:"subtitleText"`
	Timestamp    string `json:"timestamp"`
}

type NormalizedResponseOverviewSection

type NormalizedResponseOverviewSection struct {
	NormalizedResponseTableSection
}

type NormalizedResponsePerformanceSection

type NormalizedResponsePerformanceSection struct {
	NormalizedResponseTableSection
}

type NormalizedResponseSectionAction

type NormalizedResponseSectionAction struct {
	Payload any    `json:"payload"`
	Type    string `json:"type"`
}

type NormalizedResponseTableSection

type NormalizedResponseTableSection struct {
	Data  []NormalizedResponseTableSectionData `json:"data"`
	Title string                               `json:"title"`
	Type  string                               `json:"type"`
}

func (NormalizedResponseTableSection) GetDataByTitles

type NormalizedResponseTableSectionData

type NormalizedResponseTableSectionData struct {
	Detail NormalizedResponseTableSectionDataDetail `json:"detail"`
	Style  string                                   `json:"style"`
	Title  string                                   `json:"title"`
}

type NormalizedResponseTableSectionDataDetail

type NormalizedResponseTableSectionDataDetail struct {
	Action          NormalizedResponseSectionAction `json:"action"`
	FunctionalStyle string                          `json:"functionalStyle"`
	Amount          string                          `json:"amount"`
	Icon            string                          `json:"icon"`
	Status          string                          `json:"status"`
	Subtitle        string                          `json:"subtitle"`
	Timestamp       string                          `json:"timestamp"`
	Title           string                          `json:"title"`
	Text            string                          `json:"text"`
	Trend           string                          `json:"trend"`
	Type            string                          `json:"type"`
}

type NormalizedResponseTransactionSection

type NormalizedResponseTransactionSection struct {
	NormalizedResponseTableSection
}

type Response

type Response struct {
	ID       string           `json:"id"`
	Sections []map[string]any `json:"sections"`
}

type ResponseNormalizerInterface

type ResponseNormalizerInterface interface {
	Normalize(response Response) (NormalizedResponse, error)
}

type TransactionResponseNormalizer

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

func NewTransactionResponseNormalizer

func NewTransactionResponseNormalizer(logger *log.Logger) TransactionResponseNormalizer

func (TransactionResponseNormalizer) Normalize

func (TransactionResponseNormalizer) SectionTypeDocuments

func (n TransactionResponseNormalizer) SectionTypeDocuments(
	response Response,
) (NormalizedResponseDocumentsSection, error)

func (TransactionResponseNormalizer) SectionTypeHeader

func (TransactionResponseNormalizer) SectionsTypeTable

type Type

type Type string
const (
	TypeUnsupported               Type = "Unsupported"
	TypeSaleTransaction           Type = "Sale"
	TypePurchaseTransaction       Type = "Purchase"
	TypeDividendPayoutTransaction Type = "Dividend payout"
	TypeRoundUpTransaction        Type = "Round up"
	TypeSavebackTransaction       Type = "Saveback"
	TypeCardPaymentTransaction    Type = "Card payment"
	TypeDepositTransaction        Type = "Deposit"
	TypeWithdrawalTransaction     Type = "Withdrawal"
	TypeInterestPayoutTransaction Type = "Interest payout"
)

type TypeResolver

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

func NewTypeResolver

func NewTypeResolver(logger *log.Logger) TypeResolver

func (TypeResolver) Resolve

func (r TypeResolver) Resolve(eventType transactions.EventType, response NormalizedResponse) (Type, error)

type TypeResolverInterface

type TypeResolverInterface interface {
	Resolve(eventType transactions.EventType, response NormalizedResponse) (Type, error)
}

Jump to

Keyboard shortcuts

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