Documentation ¶
Index ¶
- func CandidToEvent(e *Event) *event.T
- type Backend
- func (b *Backend) AddUser(pubKey string, perm bool) (err error)
- func (b *Backend) ClearEvents() (result string, err error)
- func (b *Backend) CountCandidEvent(filter *Filter) (int, error)
- func (b *Backend) CountEvents(f *filter.T) (count int, err error)
- func (b *Backend) DeleteEvent(ev *event.T) (err error)
- func (b *Backend) GetCandidEvent(filter *Filter) ([]Event, error)
- func (b *Backend) GetPermission() (result string, err error)
- func (b *Backend) QueryEvents(f *filter.T) (ch event.C, err error)
- func (b *Backend) RemoveUser(pubKey string) (err error)
- func (b *Backend) SaveCandidEvent(event Event) (result string, err error)
- func (b *Backend) SaveEvent(e *event.T) (err error)
- type Event
- type Filter
- type KeyValuePair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CandidToEvent ¶
Types ¶
type Backend ¶
func (*Backend) ClearEvents ¶
func (*Backend) CountEvents ¶
CountEvents counts how many events match the filter in the IC. todo: use the proper count events API call in the canister
func (*Backend) DeleteEvent ¶
DeleteEvent deletes an event matching the given event. todo: not yet implemented, but there is already a backend function for this
func (*Backend) GetPermission ¶
func (*Backend) RemoveUser ¶
func (*Backend) SaveCandidEvent ¶
type Event ¶
type Event struct { ID string `ic:"id"` Pubkey string `ic:"pubkey"` CreatedAt int64 `ic:"created_at"` Kind uint16 `ic:"kind"` Tags [][]string `ic:"tags"` Content string `ic:"content"` Sig string `ic:"sig"` }
func EventToCandid ¶
type Filter ¶
type Filter struct { IDs []string `ic:"ids"` Kinds []uint16 `ic:"kinds"` Authors []string `ic:"authors"` Tags []KeyValuePair `ic:"tags"` Since int64 `ic:"since"` Until int64 `ic:"until"` Limit int64 `ic:"limit"` Search string `ic:"search"` }
func FilterToCandid ¶
type KeyValuePair ¶
func TagMapToKV ¶
func TagMapToKV(t filter.TagMap) (keys []KeyValuePair)
Click to show internal directories.
Click to hide internal directories.