companyevent

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	CompanyID    int64                `json:"company_id" csv:"company_id"`
	InstrumentID int64                `json:"instrument_id" csv:"instrument_id"`
	EventType    string               `json:"event_type" csv:"event_type"`
	EventDate    string               `json:"event_date" csv:"event_date"`
	RceptDt      string               `json:"rcept_dt" csv:"rcept_dt"`
	RceptNo      string               `json:"rcept_no" csv:"rcept_no"`
	Provider     provider.ProviderID  `json:"provider" csv:"provider"`
	Group        provider.GroupID     `json:"provider_group" csv:"provider_group"`
	Operation    provider.OperationID `json:"operation" csv:"operation"`
	Title        string               `json:"title" csv:"title"`
	AmountMinor  *int64               `json:"amount_minor,omitempty" csv:"amount_minor"`
	ValueText    string               `json:"value_text" csv:"value_text"`
	Raw          map[string]any       `json:"raw,omitempty" csv:"-"`
}

type EventInput

type EventInput struct {
	EventType   string
	EventDate   string
	RceptDt     string
	RceptNo     string
	Provider    provider.ProviderID
	Group       provider.GroupID
	Operation   provider.OperationID
	Title       string
	AmountMinor *int64
	ValueText   string
	Raw         any
}

type Query

type Query struct {
	Provider  provider.ProviderID
	EventType string
	From      string
	To        string
	Limit     int
}

type Repository

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

func NewRepository

func NewRepository(database *storage.Database) (Repository, error)

func (Repository) ListEvents

func (r Repository) ListEvents(ctx context.Context, company companyidentity.InspectResult, query Query) ([]Event, error)

func (Repository) UpsertEvents

func (r Repository) UpsertEvents(ctx context.Context, company companyidentity.InspectResult, events []EventInput) (UpsertResult, error)

type UpsertResult

type UpsertResult struct {
	EventsWritten int `json:"events_written" csv:"events_written"`
}

Jump to

Keyboard shortcuts

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