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

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ReportHost string
	ReportPort string
}

type GetReportLinkRequest

type GetReportLinkRequest struct {
	Month int64 `json:"month" binding:"required,min=1,max=12"`
	Year  int64 `json:"year"  binding:"required,min=2022"`
}

func (GetReportLinkRequest) ToDTO

type GetReportLinkResponse

type GetReportLinkResponse struct {
	Link string `json:"link"`
}

type Handler

type Handler struct {
	*handler.BaseHandler
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(cfg Config, service Service, logger *zap.Logger) *Handler

func (*Handler) DownloadReport

func (h *Handler) DownloadReport(c *gin.Context)
func (h *Handler) GetReportLink(c *gin.Context)

func (*Handler) InitAPI

func (h *Handler) InitAPI(router *gin.RouterGroup)

type Service

type Service interface {
	GetReportKey(ctx context.Context, dto report.GetMapDTO) (string, error)
	GetReportContent(ctx context.Context, filename string) ([]byte, error)
}

Jump to

Keyboard shortcuts

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