Documentation
¶
Overview ¶
Package sqlite is a store of webhooks, and their calls, in a SQLite database, which is created when it doesn't exist, or in memory, of sqlite.Memory, such as for tests
Index ¶
- type Opt
- type Store
- func (self *Store) Close() error
- func (self *Store) CreateCall(ctx context.Context, call webhook.Call) (_ webhook.Call, err error)
- func (self *Store) CreateWebhook(ctx context.Context, meta webhook.WebhookMeta, hash []byte) (_ webhook.Webhook, err error)
- func (self *Store) DeleteCall(ctx context.Context, id uint64) (_ webhook.Call, err error)
- func (self *Store) DeleteCalls(ctx context.Context, before time.Time) (_ uint64, err error)
- func (self *Store) DeleteWebhook(ctx context.Context, id uint64) (_ webhook.Webhook, err error)
- func (self *Store) GetCall(ctx context.Context, id uint64) (_ webhook.Call, err error)
- func (self *Store) GetWebhook(ctx context.Context, id uint64) (_ webhook.Webhook, err error)
- func (self *Store) GetWebhookByHash(ctx context.Context, hash []byte) (_ webhook.Webhook, err error)
- func (self *Store) ListCalls(ctx context.Context, req webhook.CallListRequest) (_ webhook.CallList, err error)
- func (self *Store) ListWebhooks(ctx context.Context, req webhook.WebhookListRequest) (_ webhook.WebhookList, err error)
- func (self *Store) UpdateWebhook(ctx context.Context, id uint64, req webhook.WebhookRequest) (_ webhook.Webhook, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Opt ¶
Opt is an option of the store
func WithBroadcaster ¶
WithBroadcaster publishes the webhooks, and calls, which are created, updated and deleted, once they're committed, as changes of the schema store.Schema, and the tables store.WebhookTable, and store.CallTable, whose rows are their serial numbers, including the calls which are deleted with their webhook, and those which are deleted, as they're old
func WithTracer ¶
WithTracer traces the store's methods, but not their queries, whose arguments include the webhooks' secrets, and what services sent
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is a store of webhooks, and their calls, in a SQLite database
func New ¶
New returns a store of the path of its database file, such as /data/llm/webhook.db, or sqlite.Memory, which is created when it doesn't exist, with its schema
func (*Store) CreateCall ¶
CreateCall adds the call, once its webhook is known to be there, in a transaction, so it isn't deleted between them
func (*Store) CreateWebhook ¶
func (*Store) DeleteCall ¶ added in v1.7.4
func (*Store) DeleteCalls ¶
func (*Store) DeleteWebhook ¶
func (*Store) GetWebhook ¶
func (*Store) GetWebhookByHash ¶
func (*Store) ListWebhooks ¶
func (self *Store) ListWebhooks(ctx context.Context, req webhook.WebhookListRequest) (_ webhook.WebhookList, err error)
Directories
¶
| Path | Synopsis |
|---|---|
|
Package schema is the schema of the SQLite store of webhooks: its tables, its queries, and the types which are read from, and written to, them
|
Package schema is the schema of the SQLite store of webhooks: its tables, its queries, and the types which are read from, and written to, them |