mongodbimpl

package
v0.0.0-...-84f279d Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OrderASC  int = 1
	OrderDESC int = -1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IndexDefinition

type IndexDefinition struct {
	Fields []IndexField
	// Name of the index, it is automatically suffixed with "Idx" so no need to add that
	Name string
}

type IndexField

type IndexField struct {
	Name  string
	Order int
}

type Storage

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

func NewStorage

func NewStorage(uri, dbname string) (*Storage, error)

func (*Storage) AddWebhook

func (m *Storage) AddWebhook(webhook *core.Webhook) error

func (*Storage) DeleteRequest

func (m *Storage) DeleteRequest(id string) error

func (*Storage) GetAllWebhooks

func (m *Storage) GetAllWebhooks() ([]*core.Webhook, error)

func (*Storage) GetNewestRequests

func (m *Storage) GetNewestRequests(count int) ([]*core.Request, error)

func (*Storage) GetOldestRequests

func (m *Storage) GetOldestRequests(count int) ([]*core.Request, error)

func (*Storage) GetRequest

func (m *Storage) GetRequest(id string) (*core.Request, error)

func (*Storage) GetWebhook

func (m *Storage) GetWebhook(id string) (*core.Webhook, error)

func (*Storage) RemoveWebhook

func (m *Storage) RemoveWebhook(id string) error

func (*Storage) StoreRequest

func (m *Storage) StoreRequest(request *core.Request) error

func (*Storage) UpdateWebhook

func (m *Storage) UpdateWebhook(webhook *core.Webhook) error

Jump to

Keyboard shortcuts

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