Documentation ¶
Index ¶
- func CalculateSplit(min map[string]int, msg map[string]int, meg map[string]int, bil tingbill.Bill) (tingbill.BillSplit, error)
- func ParseBill(r io.Reader) (tingbill.Bill, error)
- func ParseMegabytes(megReader io.Reader) (map[string]int, error)
- func ParseMessages(msgReader io.Reader) (map[string]int, error)
- func ParseMinutes(minReader io.Reader) (map[string]int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateSplit ¶
func CalculateSplit(min map[string]int, msg map[string]int, meg map[string]int, bil tingbill.Bill) (tingbill.BillSplit, error)
CalculateSplit accepts 3 map[string]int, one tingbill.Bill, and returns a tingbill.BillSplit and an error. The maps are for usage results from ParseMinutes, ParseMessages
func ParseBill ¶
ParseBill accepts an io.Reader from a bill.toml file, and returns a tingbill.Bill with relevant data, or an error. The data is later used to calculate cost splits against device usage.
func ParseMegabytes ¶
ParseMegabytes accepts an io.Reader from a megabytes csv file, and returns a map containing usage data, or an error. The map's keys are `deviceID`s and the value is how much data that device used in the billable month.
func ParseMessages ¶
ParseMessages accepts an io.Reader from a messages csv file, and returns a map containing usage data, or an error. The map's keys are `deviceID`s and the value is how many messages that device used in the billable month.
func ParseMinutes ¶
ParseMinutes accepts an io.Reader from a minutes csv file, and returns a map containing usage data, or an error. The map's keys are `deviceID`s and the value is how many minutes that device used in the billable month.
Types ¶
This section is empty.