Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Event ¶
type Event struct {
ID int64 `json:"id"`
Type EventType `json:"type"`
Record *RecordEventData `json:"record,omitempty"`
Identity *IdentityEventData `json:"identity,omitempty"`
}
type Handler ¶
type IdentityEventData ¶
type IdentityEventData struct {
DID syntax.DID `json:"did"`
Handle string `json:"handle"`
IsActive bool `json:"is_active"`
Status RepoStatus `json:"status"`
}
type RecordAction ¶
type RecordAction string
const ( RecordCreateAction RecordAction = "create" RecordUpdateAction RecordAction = "update" RecordDeleteAction RecordAction = "delete" )
type RecordEventData ¶
type RecordEventData struct {
Live bool `json:"live"`
Did syntax.DID `json:"did"`
Rev string `json:"rev"`
Collection syntax.NSID `json:"collection"`
Rkey syntax.RecordKey `json:"rkey"`
Action RecordAction `json:"action"`
Record json.RawMessage `json:"record,omitempty"`
CID *syntax.CID `json:"cid,omitempty"`
}
func (*RecordEventData) AtUri ¶
func (r *RecordEventData) AtUri() syntax.ATURI
type RepoStatus ¶
type RepoStatus string
const ( RepoStatusActive RepoStatus = "active" RepoStatusTakendown RepoStatus = "takendown" RepoStatusSuspended RepoStatus = "suspended" RepoStatusDeactivated RepoStatus = "deactivated" RepoStatusDeleted RepoStatus = "deleted" )
type SimpleIndexer ¶
type SimpleIndexer struct {
EventHandler func(ctx context.Context, evt Event) error
ErrorHandler func(ctx context.Context, err error)
ConnectHandler func(ctx context.Context)
}
func (*SimpleIndexer) OnConnect ¶
func (i *SimpleIndexer) OnConnect(ctx context.Context)
func (*SimpleIndexer) OnError ¶
func (i *SimpleIndexer) OnError(ctx context.Context, err error)
Source Files
¶
- simple_indexer.go
- tap.go
- types.go
Click to show internal directories.
Click to hide internal directories.