Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoClientID = errors.New("client id not set")
)
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetCustomerInfoList ¶
func (c *Client) GetCustomerInfoList() ([]CustomerInfo, error)
TODO error handling TODO return value
func (*Client) PostCollections ¶
func (c *Client) PostCollections(colns Collections) ([]byte, error)
type Collection ¶
type Collection struct { Name string `json:"collection"` Entries []Transaction `json:"entries"` Bases []string `json:"bases"` }
type Collections ¶
type Collections struct { CollectionsToUpsert []Collection `json:"collectionsToUpsert"` CollectionsToDelete []Collection `json:"collectionsToDelete"` }
func GetTransactionCollections ¶
func GetTransactionCollections(txns []Transaction) Collections
type CustomerInfo ¶
type LoginResponse ¶
type Transaction ¶
type Transaction struct { ID string `json:"_id"` Date string `json:"date"` CustomerID string `json:"customer"` ToAccount string `json:"to_account"` FromAccount string `json:"from_account"` MeterStart float64 `json:"meter_start"` MeterEnd float64 `json:"meter_end"` Amount float64 `json:"amount"` }
func NewTransaction ¶
func NewTransaction() Transaction
Click to show internal directories.
Click to hide internal directories.