Documentation
¶
Overview ¶
Package details is a generated GoMock package.
Package details is a generated GoMock package.
Index ¶
- Constants
- Variables
- func DepositDetector(eventType transactions.EventType, _ NormalizedResponse) bool
- func DividendPayoutDetector(eventType transactions.EventType, _ NormalizedResponse) bool
- func InterestPayoutDetector(eventType transactions.EventType, _ NormalizedResponse) bool
- func PurchaseDetector(eventType transactions.EventType, response NormalizedResponse) bool
- func RoundUpDetector(eventType transactions.EventType, _ NormalizedResponse) bool
- func SaleDetector(eventType transactions.EventType, response NormalizedResponse) bool
- func SavebackDetector(eventType transactions.EventType, _ NormalizedResponse) bool
- func WithdrawalDetector(eventType transactions.EventType, _ NormalizedResponse) bool
- type ActivityLogResponseNormalizer
- type Client
- type ClientInterface
- type MockClientInterface
- type MockClientInterfaceMockRecorder
- type MockTypeResolverInterface
- type MockTypeResolverInterfaceMockRecorder
- type NormalizedResponse
- type NormalizedResponseDocumentsSection
- type NormalizedResponseDocumentsSectionData
- type NormalizedResponseHeaderSection
- type NormalizedResponseHeaderSectionData
- type NormalizedResponseOverviewSection
- type NormalizedResponsePerformanceSection
- type NormalizedResponseSectionAction
- type NormalizedResponseTableSection
- type NormalizedResponseTableSectionData
- type NormalizedResponseTableSectionDataDetail
- type NormalizedResponseTransactionSection
- type Response
- type ResponseNormalizerInterface
- type TesterFunc
- type TransactionResponseNormalizer
- func (n TransactionResponseNormalizer) Normalize(response Response) (NormalizedResponse, error)
- func (n TransactionResponseNormalizer) SectionTypeDocuments(response Response) (NormalizedResponseDocumentsSection, error)
- func (n TransactionResponseNormalizer) SectionTypeHeader(response Response) (NormalizedResponseHeaderSection, error)
- func (n TransactionResponseNormalizer) SectionsTypeTable(response Response) ([]NormalizedResponseTableSection, error)
- type Type
- type TypeResolver
- type TypeResolverInterface
Constants ¶
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" 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" )
const (
RequestDataType = "timelineDetailV2"
)
Variables ¶
var ( ErrSectionTypeNotFound = errors.New("section type not found") ErrSectionContainsNoType = errors.New("section contains no type") )
var ActivityLogSet = wire.NewSet( NewActivityResponseNormalizer, wire.Bind(new(ResponseNormalizerInterface), new(ActivityLogResponseNormalizer)), )
var DefaultSet = wire.NewSet( NewClient, NewTypeResolver, wire.Bind(new(ClientInterface), new(Client)), wire.Bind(new(TypeResolverInterface), new(TypeResolver)), )
var ErrSectionDataTitleNotFound = errors.New("section data title not found")
var ErrTypeResolverUnsupportedType = errors.New("could not resolve transaction type")
var TransactionSet = wire.NewSet( NewTransactionResponseNormalizer, wire.Bind(new(ResponseNormalizerInterface), new(TransactionResponseNormalizer)), )
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 ¶
func (n ActivityLogResponseNormalizer) Normalize(response Response) (NormalizedResponse, error)
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 ¶
func (m *MockClientInterface) EXPECT() *MockClientInterfaceMockRecorder
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.
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 ¶
func (m *MockTypeResolverInterface) EXPECT() *MockTypeResolverInterfaceMockRecorder
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.
type NormalizedResponse ¶
type NormalizedResponse struct { ID string Header NormalizedResponseHeaderSection Overview NormalizedResponseOverviewSection Performance NormalizedResponsePerformanceSection Transaction NormalizedResponseTransactionSection Documents NormalizedResponseDocumentsSection }
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 NormalizedResponseOverviewSection ¶
type NormalizedResponseOverviewSection struct {
NormalizedResponseTableSection
}
type NormalizedResponsePerformanceSection ¶
type NormalizedResponsePerformanceSection struct {
NormalizedResponseTableSection
}
type NormalizedResponseTableSection ¶
type NormalizedResponseTableSection struct { Data []NormalizedResponseTableSectionData `json:"data"` Title string `json:"title"` Type string `json:"type"` }
func (NormalizedResponseTableSection) GetDataByTitles ¶
func (s NormalizedResponseTableSection) GetDataByTitles(titles ...string) (NormalizedResponseTableSectionData, error)
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 ResponseNormalizerInterface ¶
type ResponseNormalizerInterface interface {
Normalize(response Response) (NormalizedResponse, error)
}
type TesterFunc ¶
type TesterFunc func(transactions.EventType, NormalizedResponse) bool
type TransactionResponseNormalizer ¶
type TransactionResponseNormalizer struct {
// contains filtered or unexported fields
}
func NewTransactionResponseNormalizer ¶
func NewTransactionResponseNormalizer(logger *log.Logger) TransactionResponseNormalizer
func (TransactionResponseNormalizer) Normalize ¶
func (n TransactionResponseNormalizer) Normalize(response Response) (NormalizedResponse, error)
func (TransactionResponseNormalizer) SectionTypeDocuments ¶
func (n TransactionResponseNormalizer) SectionTypeDocuments( response Response, ) (NormalizedResponseDocumentsSection, error)
func (TransactionResponseNormalizer) SectionTypeHeader ¶
func (n TransactionResponseNormalizer) SectionTypeHeader(response Response) (NormalizedResponseHeaderSection, error)
func (TransactionResponseNormalizer) SectionsTypeTable ¶
func (n TransactionResponseNormalizer) SectionsTypeTable(response Response) ([]NormalizedResponseTableSection, error)
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)
}