Documentation
¶
Overview ¶
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
Index ¶
- Constants
- func Create(ctx context.Context, conn sqlite.Conn) error
- func NewQueries() (*sqlite.Queries, error)
- type CallCount
- type CallID
- type CallInsert
- type CallList
- type CallListRequest
- type CallsBefore
- type WebhookHash
- type WebhookID
- type WebhookInsert
- type WebhookList
- type WebhookListRequest
- type WebhookUpdate
Constants ¶
const ( // Version is the version of the schema, of the database's user_version Version = 2 // ListLimit is the most rows which are listed at once ListLimit = 100 )
Variables ¶
This section is empty.
Functions ¶
func Create ¶
Create creates the schema, in a transaction, when the database hasn't one, or upgrades it, when it's older, and sets its version. A database whose schema is newer is an error.
func NewQueries ¶
NewQueries returns the queries, which a connection is bound to, with WithQueries, so the types' selectors and writers use them
Types ¶
type CallID ¶
type CallID uint64
CallID selects a call, by its serial number, which is got, or deleted
type CallInsert ¶
CallInsert is a call which is created
type CallList ¶
CallList is the calls which are read, of a list, or one, of a get, a create, or a delete
type CallListRequest ¶
type CallListRequest webhook.CallListRequest
CallListRequest selects the calls which are listed
type CallsBefore ¶
CallsBefore selects the calls received before the time, which are deleted
type WebhookHash ¶
type WebhookHash []byte
WebhookHash selects a webhook, by the hash of its token, which is got
type WebhookID ¶
type WebhookID uint64
WebhookID selects a webhook, by its serial number, which is got, updated, or deleted
type WebhookInsert ¶
type WebhookInsert struct {
webhook.WebhookMeta
Hash []byte
}
WebhookInsert is a webhook which is created, with the hash of its token
type WebhookList ¶
type WebhookList webhook.WebhookList
WebhookList is the webhooks which are read, of a list, or one, of a get, a create, an update, or a delete
type WebhookListRequest ¶
type WebhookListRequest webhook.WebhookListRequest
WebhookListRequest selects the webhooks which are listed
type WebhookUpdate ¶
type WebhookUpdate webhook.WebhookRequest
WebhookUpdate is what's changed of a webhook