storage

package
v0.0.0-...-4845449 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

func New

func New(db *gorm.DB, logger log.Logger) *Storage

func (*Storage) AllWebhooks

func (s *Storage) AllWebhooks() (webhooks []*model.Webhook, err error)

func (*Storage) CountRows

func (s *Storage) CountRows(webhookId uint32) (uint, error)

func (*Storage) Fetch

func (s *Storage) Fetch(webhookHash string, target io.Writer) (webhook *model.Webhook, err error)

func (*Storage) FlushData

func (s *Storage) FlushData(webhookHash string) (result string, err error)

func (*Storage) Get

func (s *Storage) Get(hashStr string) (*model.Webhook, error)

func (*Storage) MigrateDb

func (s *Storage) MigrateDb() error

func (*Storage) RegisterWebhook

func (s *Storage) RegisterWebhook(token model.Token, tableId string, conditions model.Conditions) (*model.Webhook, error)

func (*Storage) UpdateWebhook

func (s *Storage) UpdateWebhook(webhookHash string, conditions model.Conditions) (webhook *model.Webhook, err error)

func (*Storage) WriteRow

func (s *Storage) WriteRow(webhookHash string, headers, body string) (webhook *model.Webhook, count uint, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL