Documentation ¶
Index ¶
- type B
- type Backend
- func (b *Backend) AddUser(pubKey string, perm bool) (err error)
- func (b *Backend) ClearCandidEvents() (err error)
- func (b *Backend) ClearEvents() (err error)
- func (b *Backend) CountCandidEvent(filter *Filter) (int, error)
- func (b *Backend) CountEvents(f *filter.T) (count int, err error)
- func (b *Backend) DeleteCandidEvent(event Event) (err error)
- func (b *Backend) DeleteEvent(ev *event.T) (err error)
- func (b *Backend) GetCandidEvent(filter *Filter) (res []*Event, err E)
- 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) (err error)
- func (b *Backend) SaveEvent(e *event.T) (err error)
- type E
- type Event
- type Filter
- type KeyValuePair
- type N
- type S
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
func (*Backend) ClearCandidEvents ¶
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) DeleteCandidEvent ¶
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) GetCandidEvent ¶
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 TagsToKV ¶
func TagsToKV(t *tags.T) (keys []KeyValuePair)
Click to show internal directories.
Click to hide internal directories.