Documentation ¶
Index ¶
- type About
- type Ledger
- func (l *Ledger) About(peer_name string) (string, error)
- func (l *Ledger) AddRessource(b64 string) (string, error)
- func (l *Ledger) GetFeed(peer_name string) ([]string, error)
- func (l *Ledger) GetLastSeq(peer_name string) (string, error)
- func (l *Ledger) GetMessage(peer_name string, sequence string) (string, error)
- func (l *Ledger) GetRessource(id string) (string, error)
- func (l *Ledger) Publish(data string) error
- func (l *Ledger) Resolve(name string) (string, error)
- func (l *Ledger) SetAbout(about About) error
- func (l *Ledger) Sync() error
- func (l *Ledger) Whoami() string
- type LedgerInterface
- type Message
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ledger ¶
type Ledger struct { Repo string // contains filtered or unexported fields }
func (*Ledger) GetFeed ¶
Get all messages from a peer, return a slice of them, ordered from the more recent to the oldest
func (*Ledger) GetLastSeq ¶
Get the last seq number, as a string (no need to convert)
func (*Ledger) GetMessage ¶
Get a message, returned as a reader
type LedgerInterface ¶
type LedgerInterface interface { Sync() error GetMessage(peer_name string, sequence string) (string, error) GetLastSeq(peer_name string) (string, error) GetFeed(peer_name string) ([]string, error) Whoami() string About(peer_name string) (string, error) SetAbout(about About) error Publish(data string) error AddRessource(b64 string) (string, error) GetRessource(id string) (string, error) Resolve(name string) (string, error) }
Click to show internal directories.
Click to hide internal directories.