report

package
v0.0.0-...-514f96b Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrIsNotAvailable = errors.New("this report is not available yet")
	ErrNotFound       = errors.New("report not found")
)

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Get(key string) ([]byte, error)
	Set(key string, value []byte) error
	IsExist(key string) bool
}

type GetMapDTO

type GetMapDTO struct {
	Month int64
	Year  int64
}

type Repository

type Repository interface {
	GetReportMap(ctx context.Context, dto GetMapDTO) (map[int64]int64, error)
}

type Service

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

func NewService

func NewService(repository Repository, cache Cache, logger *zap.Logger) *Service

func (*Service) GetReportContent

func (s *Service) GetReportContent(ctx context.Context, key string) ([]byte, error)

func (*Service) GetReportKey

func (s *Service) GetReportKey(ctx context.Context, dto GetMapDTO) (string, error)

Jump to

Keyboard shortcuts

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