Documentation ¶
Index ¶
- Variables
- type App
- type Filter
- type Store
- type Tx
- func (*Tx) Descriptor() ([]byte, []int)
- func (this *Tx) Equal(that interface{}) bool
- func (m *Tx) GetSum() string
- func (this *Tx) GoString() string
- func (m *Tx) Marshal() (dAtA []byte, err error)
- func (m *Tx) MarshalTo(dAtA []byte) (int, error)
- func (m *Tx) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Tx) ProtoMessage()
- func (m *Tx) Reset()
- func (m *Tx) Size() (n int)
- func (this *Tx) String() string
- func (m *Tx) Unmarshal(dAtA []byte) error
- func (m *Tx) XXX_DiscardUnknown()
- func (m *Tx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Tx) XXX_Merge(src proto.Message)
- func (m *Tx) XXX_Size() int
- func (m *Tx) XXX_Unmarshal(b []byte) error
- type TxApp
- type TxFilter
- type TxStore
- type W
- func (*W) Descriptor() ([]byte, []int)
- func (this *W) Equal(that interface{}) bool
- func (m *W) GetAmount() string
- func (m *W) GetTimestamp() int64
- func (this *W) GoString() string
- func (m *W) Marshal() (dAtA []byte, err error)
- func (m *W) MarshalTo(dAtA []byte) (int, error)
- func (m *W) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*W) ProtoMessage()
- func (m *W) Reset()
- func (m *W) Size() (n int)
- func (this *W) String() string
- func (m *W) Unmarshal(dAtA []byte) error
- func (m *W) XXX_DiscardUnknown()
- func (m *W) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *W) XXX_Merge(src proto.Message)
- func (m *W) XXX_Size() int
- func (m *W) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type App ¶
type App interface { Store // Fetch recompute all Tx data from latest computed wallet ComputeAndFetch(context.Context, Filter) ([]W, error) }
App application layer for W object.
type Store ¶
type Store interface { Insert(context.Context, W) error Fetch(context.Context, Filter) (W, error) Remove(context.Context, Filter) error }
Store storage layer for W object.
type Tx ¶
type Tx struct { ID github_com_elojah_wallet_pkg_ulid.ID `protobuf:"bytes,1,opt,name=ID,proto3,customtype=github.com/elojah/wallet/pkg/ulid.ID" json:"ID"` WalletID github_com_elojah_wallet_pkg_ulid.ID `protobuf:"bytes,2,opt,name=WalletID,proto3,customtype=github.com/elojah/wallet/pkg/ulid.ID" json:"WalletID"` Sum string `protobuf:"bytes,3,opt,name=Sum,proto3" json:"Sum,omitempty"` }
func NewPopulatedTx ¶
func (*Tx) Descriptor ¶
func (*Tx) ProtoMessage ¶
func (*Tx) ProtoMessage()
func (*Tx) XXX_DiscardUnknown ¶
func (m *Tx) XXX_DiscardUnknown()
func (*Tx) XXX_Unmarshal ¶
type TxStore ¶
type TxStore interface { InsertTx(context.Context, Tx) error FetchManyTx(context.Context, TxFilter) ([]Tx, error) }
TxStore storage layer for Tx object.
type W ¶
type W struct { ID github_com_elojah_wallet_pkg_ulid.ID `protobuf:"bytes,1,opt,name=ID,proto3,customtype=github.com/elojah/wallet/pkg/ulid.ID" json:"ID"` Timestamp int64 `protobuf:"varint,2,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"` Amount string `protobuf:"bytes,3,opt,name=Amount,proto3" json:"Amount,omitempty"` }
func GenerateHourRange ¶
GenerateHourRange generates a slice of wallets at hours end (e.g: 10:00, 22:00) from a date range !!! Amounts are always empty and need to be populated.
func NewPopulatedW ¶
func (*W) Descriptor ¶
func (*W) GetTimestamp ¶
func (*W) ProtoMessage ¶
func (*W) ProtoMessage()
func (*W) XXX_DiscardUnknown ¶
func (m *W) XXX_DiscardUnknown()
func (*W) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.