Documentation ¶
Index ¶
- type Config
- type DB
- func (d *DB) Close() error
- func (d *DB) CreateDocument(ctx context.Context, files []File) (*string, *int64, error)
- func (d *DB) CreateWebhook(ctx context.Context, documentID string, url string, secret string, ...) (*Webhook, error)
- func (d *DB) DeleteDocument(ctx context.Context, documentID string) (*Document, error)
- func (d *DB) DeleteDocumentFile(ctx context.Context, documentID string, fileName string) error
- func (d *DB) DeleteDocumentVersion(ctx context.Context, documentID string, documentVersion int64) (*Document, error)
- func (d *DB) DeleteDocumentVersionFile(ctx context.Context, documentID string, documentVersion int64, fileName string) error
- func (d *DB) DeleteDocumentVersions(ctx context.Context, documentID string) error
- func (d *DB) DeleteExpiredDocuments(ctx context.Context, expireAfter time.Duration) error
- func (d *DB) DeleteWebhook(ctx context.Context, documentID string, webhookID string, secret string) error
- func (d *DB) GetAndDeleteWebhooksByDocumentID(ctx context.Context, documentID string) ([]Webhook, error)
- func (d *DB) GetDocument(ctx context.Context, documentID string) ([]File, error)
- func (d *DB) GetDocumentFile(ctx context.Context, documentID string, fileName string) (*File, error)
- func (d *DB) GetDocumentFileVersion(ctx context.Context, documentID string, documentVersion int64, fileName string) (*File, error)
- func (d *DB) GetDocumentVersion(ctx context.Context, documentID string, documentVersion int64) ([]File, error)
- func (d *DB) GetDocumentVersions(ctx context.Context, documentID string) ([]int64, error)
- func (d *DB) GetDocumentVersionsWithFiles(ctx context.Context, documentID string, withContent bool) (map[int64][]File, error)
- func (d *DB) GetVersionCount(ctx context.Context, documentID string) (int, error)
- func (d *DB) GetWebhook(ctx context.Context, documentID string, webhookID string, secret string) (*Webhook, error)
- func (d *DB) GetWebhooksByDocumentID(ctx context.Context, documentID string) ([]Webhook, error)
- func (d *DB) UpdateDocument(ctx context.Context, documentID string, files []File) (*int64, error)
- func (d *DB) UpdateWebhook(ctx context.Context, documentID string, webhookID string, secret string, ...) (*Webhook, error)
- type Document
- type File
- type Webhook
- type WebhookUpdate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Type string `cfg:"type"` Debug bool `cfg:"debug"` ExpireAfter time.Duration `cfg:"expire_after"` CleanupInterval time.Duration `cfg:"cleanup_interval"` // SQLite Path string `cfg:"path"` // PostgreSQL Host string `cfg:"host"` Port int `cfg:"port"` Username string `cfg:"username"` Password string `cfg:"password"` Database string `cfg:"database"` SSLMode string `cfg:"ssl_mode"` }
func (Config) PostgresDataSourceName ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) CreateDocument ¶
func (*DB) CreateWebhook ¶
func (*DB) DeleteDocument ¶
func (*DB) DeleteDocumentFile ¶
func (*DB) DeleteDocumentVersion ¶
func (*DB) DeleteDocumentVersionFile ¶
func (*DB) DeleteDocumentVersions ¶
func (*DB) DeleteExpiredDocuments ¶
func (*DB) DeleteWebhook ¶
func (*DB) GetAndDeleteWebhooksByDocumentID ¶
func (*DB) GetDocument ¶
func (*DB) GetDocumentFile ¶
func (*DB) GetDocumentFileVersion ¶
func (*DB) GetDocumentVersion ¶
func (*DB) GetDocumentVersions ¶
func (*DB) GetDocumentVersionsWithFiles ¶
func (*DB) GetVersionCount ¶
func (*DB) GetWebhook ¶
func (*DB) GetWebhooksByDocumentID ¶
func (*DB) UpdateDocument ¶
Click to show internal directories.
Click to hide internal directories.