Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BillFile ¶
type BillFile interface { AddBill(bill model.GroupBill) error GetBill(billID string) (bill model.GroupBill, err error) GetBills(startDate, finishDate string) ([]model.GroupBill, error) ListBills(id string, count int, dirNew bool) (bills []model.GroupBill, hasMore bool, err error) DeleteRecord(billID string) (err error) GetDeletedBill(billID string) (bill model.DeletedGroupBill, err error) GetDeletedBills() ([]model.DeletedGroupBill, error) RemoveDeletedBillHistory(billID string) error RestoreDeletedBill(billID string) error }
type GroupEnterInfo ¶
type MerchantPersonInfo ¶
type Organization ¶
type Organization struct { Persons map[uint64]model.Person Groups map[uint64]model.Group SubWallets map[uint64]model.Wallet Labels map[uint64]model.Label GroupLabels map[uint64]map[uint64]model.Label Merchants map[uint64]model.CostDir GroupMerchants map[uint64]map[uint64]model.CostDir }
func NewOrganization ¶
func NewOrganization() *Organization
type Storage ¶
type Storage interface { NewPerson(name string) (personID, defaultWalletID uint64, err error) NewPersonEx(name string, suggestPersonID uint64) (personID, defaultWalletID uint64, err error) GetPersonName(personID uint64) (name string, err error) GetPersonGroupsIDs(personID uint64) (groupIDs []uint64, err error) GetPersonWalletIDs(personID uint64) (subWalletIDs []uint64, err error) SetPersonMerchant(personID uint64, costDir model.CostDir) error SetPersonGroupMerchant(personID, groupID uint64, costDir model.CostDir) error GetMerchantPersons() (merchants []MerchantPersonInfo) IsMerchantPerson(personID uint64) (dir model.CostDir, ok bool) GetGroupMerchantPersons(groupID uint64) (merchants []MerchantPersonInfo) IsGroupMerchantPerson(personID, groupID uint64) (dir model.CostDir, ok bool) NewGroup(name string, personID uint64) (id uint64, err error) JoinGroup(groupID, personID uint64) error LeaveGroup(groupID, personID uint64) error SetGroupAdmin(groupID, personID uint64, adminFlag bool) error IsGroupAdmin(groupID, personID uint64) (adminFlag bool, err error) GetGroupPersonIDs(groupID uint64) (personIDs, adminIDs []uint64, err error) GetGroupNames(groupIDs []uint64) (names []string, err error) NewWallet(name string, personID uint64) (id uint64, err error) GetWallet(walletID uint64) (wallet model.Wallet, err error) NewLabel(name string) (id uint64, err error) GetLabels() (labels []model.Label, err error) GetLabelName(id uint64) (name string, err error) NewGroupLabel(groupID uint64, name string) (id uint64, err error) GetGroupLabels(groupID uint64) (labels []model.Label, err error) GetGroupLabelName(labelID, groupID uint64) (name string, err error) Record(groupID uint64, groupBill model.GroupBill) error GetBill(groupID uint64, billID string) (bill model.GroupBill, err error) DeleteRecord(groupID uint64, recordID string) error GetBills(groupID uint64) ([]model.GroupBill, error) GetBillsEx(groupID uint64, startYear, startMonth, startDay, finishYear, finishMonth, finishDay int) ([]model.GroupBill, error) GetBillsByID(groupID uint64, id string, count int, dirNew bool) (bills []model.GroupBill, hasMore bool, err error) GetDeletedBills(groupID uint64) (bills []model.DeletedGroupBill, err error) GetDeletedBill(groupID uint64, billID string) (bill model.DeletedGroupBill, err error) CleanDeletedBill(groupID uint64, billID string) (err error) RestoreDeletedBill(groupID uint64, billID string) (err error) AddGroupEnterCodes(enterCodes []string, personID, groupID uint64, duration time.Duration) (err error) ActiveGroupEnterCode(enterCode string) (personID, groupID uint64, ok bool, err error) }
Click to show internal directories.
Click to hide internal directories.