stats

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: GPL-3.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 CalcTotalsWorker

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

func NewCalcTotalsWorker

func NewCalcTotalsWorker(s *Service) *CalcTotalsWorker

func (*CalcTotalsWorker) Start

func (w *CalcTotalsWorker) Start(ctx context.Context) error

type Dao

type Dao struct {
	Total         int64
	TotalVerified int64
}

type DaoProvider

type DaoProvider interface {
	GetCountByFilters(filters []dao.Filter) (int64, error)
}

type ProposalProvider

type ProposalProvider interface {
	GetCountByFilters(filters []proposal.Filter) (int64, error)
}

type Proposals

type Proposals struct {
	Total int64
}

type Server

type Server struct {
	pb.UnimplementedStatsServer
	// contains filtered or unexported fields
}

func NewServer

func NewServer(s *Service) *Server

func (*Server) GetTotals

type Service

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

func NewService

func NewService(dp DaoProvider, pp ProposalProvider) *Service

func (*Service) GetTotals

func (s *Service) GetTotals() Totals

type Totals

type Totals struct {
	Dao       Dao
	Proposals Proposals
}

Jump to

Keyboard shortcuts

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