report

package
v0.12.8-alpha.9 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetPendingApprovalsListConfig

type GetPendingApprovalsListConfig struct {
	DryRun bool
}

type PendingAppeal

type PendingAppeal struct {
	ID string
}

type PendingApproval

type PendingApproval struct {
	Approver string
	Count    int
	Appeals  []PendingAppeal // ideally []*domain.Appeal, but only ID is needed for now
}

type PendingApprovalModel

type PendingApprovalModel struct {
	AppealID        string    `json:"id" yaml:"id"`
	Approver        string    `json:"approver" yaml:"approver"`
	AppealCreatedAt time.Time `json:"created_at" yaml:"created_at"`
}

type PendingApprovalsReportFilter

type PendingApprovalsReportFilter struct {
	AppealStatuses   []string `mapstructure:"appeal_statuses" validate:"omitempty,min=1"`
	ApprovalStatuses []string `mapstructure:"approval_statuses" validate:"omitempty,min=1"`
	ApprovalStale    *bool    `mapstructure:"approval_stale"`
}

type Repository

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

func NewRepository

func NewRepository(db *gorm.DB) *Repository

func (*Repository) GetPendingApprovalsList

func (r *Repository) GetPendingApprovalsList(ctx context.Context, filters *PendingApprovalsReportFilter) ([]*PendingApprovalModel, error)

type Service

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

func NewService

func NewService(deps ServiceDeps) *Service

func (*Service) GetPendingApprovalsList

func (s *Service) GetPendingApprovalsList(ctx context.Context, cfg *GetPendingApprovalsListConfig) ([]*PendingApproval, error)

type ServiceDeps

type ServiceDeps struct {
	Repository repository
	Logger     log.Logger
	Notifier   notifier
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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