db

package
v0.0.0-...-d440da4 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EstablishSKCDeckAPIDBConn

func EstablishSKCDeckAPIDBConn()

connects to Deck API database

Types

type SKCDeckAPIDAO

type SKCDeckAPIDAO interface {
	GetSKCDeckAPIDBVersion(context.Context) (string, error)

	InsertDeckList(context.Context, model.DeckList) *model.APIError
	GetDeckList(context.Context, string) (*model.DeckList, *model.APIError)
	GetDecksThatFeatureCards(context.Context, []string) (*[]model.DeckList, *model.APIError)
}

interface

type SKCDeckAPIDAOImplementation

type SKCDeckAPIDAOImplementation struct{}

impl

func (SKCDeckAPIDAOImplementation) GetDeckList

func (dbInterface SKCDeckAPIDAOImplementation) GetDeckList(ctx context.Context, deckID string) (*model.DeckList, *model.APIError)

func (SKCDeckAPIDAOImplementation) GetDecksThatFeatureCards

func (dbInterface SKCDeckAPIDAOImplementation) GetDecksThatFeatureCards(ctx context.Context,
	cardIDs []string) (*[]model.DeckList, *model.APIError)

func (SKCDeckAPIDAOImplementation) GetSKCDeckAPIDBVersion

func (dbInterface SKCDeckAPIDAOImplementation) GetSKCDeckAPIDBVersion(ctx context.Context) (string, error)

Retrieves the version number of the SKC Deck API DB or throws an error if an exception occurs.

func (SKCDeckAPIDAOImplementation) InsertDeckList

func (dbInterface SKCDeckAPIDAOImplementation) InsertDeckList(ctx context.Context,
	deckList model.DeckList) *model.APIError

Jump to

Keyboard shortcuts

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