consum

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BillConsumptionsManager

type BillConsumptionsManager interface {
	Run() (string, error)
}

func NewBillConsumptionsManager

func NewBillConsumptionsManager() BillConsumptionsManager

type BillConsumptionsManagerImpl

type BillConsumptionsManagerImpl struct {
	PostManager     util.HttpPostManager
	CustomerStorage storage.CustomerStorage
}

func (BillConsumptionsManagerImpl) Run

type Body

type Body struct {
	YearMonth string      `json:"yearMonth"`
	Children  []ChildBody `json:"children"`
}

type ChildBody

type ChildBody struct {
	Code         int               `json:"code"`
	Consumptions []ConsumptionBody `json:"consumptions"`
}

type ConsumptionBody

type ConsumptionBody struct {
	ProductID string  `json:"productId"`
	Units     float64 `json:"units"`
	Note      string  `json:"note"`
}

type CustomerConsumptionsArgs

type CustomerConsumptionsArgs struct {
	Code         int
	Consumptions map[string]float64
	Note         string
}

type CustomerConsumptionsManager

type CustomerConsumptionsManager interface {
	Run(args CustomerConsumptionsArgs) (string, error)
}

func NewInsertConsumptionsManager

func NewInsertConsumptionsManager() CustomerConsumptionsManager

func NewRectifyConsumptionsManager

func NewRectifyConsumptionsManager() CustomerConsumptionsManager

type InsertConsumptionsManager

type InsertConsumptionsManager struct {
	PostManager     util.HttpPostManager
	CustomerStorage storage.CustomerStorage
}

func (InsertConsumptionsManager) Run

type RectifyConsumptionsManager

type RectifyConsumptionsManager struct {
	PostManager     util.HttpPostManager
	CustomerStorage storage.CustomerStorage
}

func (RectifyConsumptionsManager) Run

Jump to

Keyboard shortcuts

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