db

package
v0.0.0-...-e93d5d0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddWebhook

func AddWebhook(webhook *structs.Webhook)

func Clear

func Clear()

func DeleteWebhook

func DeleteWebhook(webhook *structs.Webhook)

func GetURIs

func GetURIs(channel string) ([]string, error)

Types

type DatabaseHandler

type DatabaseHandler struct {
	Config *config.Config
}

func (*DatabaseHandler) Clear

func (dbHandler *DatabaseHandler) Clear() error

func (*DatabaseHandler) Delete

func (dbHandler *DatabaseHandler) Delete(webhook *structs.Webhook) int64

func (*DatabaseHandler) DeleteByID

func (dbHandler *DatabaseHandler) DeleteByID(id string) (int64, error)

func (*DatabaseHandler) GetAllWebhooks

func (dbHandler *DatabaseHandler) GetAllWebhooks() ([]*structs.Webhook, error)

func (*DatabaseHandler) GetWebhook

func (dbHandler *DatabaseHandler) GetWebhook(id string) (*structs.Webhook, error)

func (*DatabaseHandler) Insert

func (dbHandler *DatabaseHandler) Insert(webhook *structs.Webhook) primitive.ObjectID

func (*DatabaseHandler) SetConfirmed

func (dbHandler *DatabaseHandler) SetConfirmed(id string) int64

Jump to

Keyboard shortcuts

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