infoscreendb

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const InfoScreenCollection = "infoscreen"

InfoScreenCollection is the MongoDB collection name that holds all infoscreen shows.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database interface {
	// ListShowNames lists the names of all shows stored.
	ListShows(ctx context.Context) ([]v1alpha.ListShowEntry, error)

	// SaveShow saves a new slideshow
	SaveShow(ctx context.Context, show v1alpha.Show) error

	// GetShow returns the slideshow by name.
	GetShow(ctx context.Context, name string) (*v1alpha.Show, error)

	// DeleteShow deletes an existing slide show
	DeleteShow(ctx context.Context, name string) error
}

func NewWithClient

func NewWithClient(ctx context.Context, dbName string, client *mongo.Client) (Database, error)

NewWithClient is like New but uses an already existing mongodb client.

Jump to

Keyboard shortcuts

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