category

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 11, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// Default is the ID of category, that must be used for all new imported transactions.
	Default = int32(1)
	// Ignored is the ID of category, that would be ignored in report.
	Ignored = int32(127)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	ID   int32  `json:"id"`
	Name string `json:"name"`
}

Category describes transaction category.

type Repository

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

Repository for categories.

func NewRepository

func NewRepository(pool *pgxpool.Pool) *Repository

NewRepository creates new instance of Repository.

func (*Repository) GetAll

func (s *Repository) GetAll(ctx context.Context) ([]Category, error)

GetAll returns existing categories.

Jump to

Keyboard shortcuts

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