Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

v1 state

Back to all declarations

payee

type

payee is a single share holder inside a group.

Value

v1.payee

group

type

group is one payment-splitting arrangement. It carries no id field: the id belongs to the store, which hands it back on lookup and iteration.

Value

v1.group

Register

func(payees string, shares string) int

Register creates a new group from comma-separated payees and shares. payees: "g1abc...,g1def..." (addresses) shares: "3,1" (positive integers, same count as payees) Returns the new group id. Panics on malformed input.

Open
OID
013fa3…0631:10
Register details

Inspect func

RecordIncome

func(id int, amount int)

RecordIncome adds amount to the pool of group id. amount must be positive.

Open
OID
013fa3…0631:12
RecordIncome details

Inspect func

Render

func(path string) string

Render shows all groups, their payees, shares, and computed owed amounts.

Open
OID
013fa3…0631:13
Render details

Inspect func

splitTrim

func(s string) []string

splitTrim splits on commas and trims whitespace around each element.

Open
OID
013fa3…0631:14
splitTrim details

Inspect func
payee : type =v1.payee
group : type =v1.group
groups : *v0.Store Inspect
errEmpty : *errors.errorString Inspect
Register : func(payees string, shares string) int Inspect
RecordIncome : func(id int, amount int) Inspect
Render : func(path string) string Inspect
splitTrim : func(s string) []string Inspect