statements

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: Unlicense Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListFilter

type ListFilter struct {
	Sort           int
	Page           int
	Size           int
	AccountID      uuid.UUID
	CreatedAtBegin time.Time
	CreatedAtEnd   time.Time
}

type Repository

type Repository interface {
	ListByFilter(ctx context.Context, filter StatementFilter) (int, []statementModel, error)
}

func NewRepository

func NewRepository(t tracer.Tracer, db database.Database) Repository

type Service

type Service interface {
	List(ctx context.Context, filter ListFilter) (int, []Statement, error)
}

func NewService

func NewService(t tracer.Tracer, r Repository) Service

type Statement

type Statement struct {
	FromAccount accounts.Account
	ToAccount   accounts.Account
	Type        string
	Amount      float64
	Description string
	CreatedAt   time.Time
}

type StatementFilter

type StatementFilter struct {
	Page           int
	Size           int
	Sort           int
	AccountID      uuid.UUID
	CreatedAtBegin time.Time
	CreatedAtEnd   time.Time
}

Jump to

Keyboard shortcuts

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