database

package
v0.0.0-...-f4af470 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitManager

func InitManager(conf *Config)

InitManager creates an instace of gifven manager type

Types

type Config

type Config struct {
	Driver      string
	Host        string
	Port        int
	Name        string
	ServiceName string
}

Config is a type to store database connection config

type Manager

type Manager interface {
	GetBoardByID(c *gin.Context, id string) (models.Board, error)
	InsertBoard(c *gin.Context, board models.Board) error
	UpdateBoard(c *gin.Context, board models.Board) error
	Close(c *gin.Context)
}

Manager provides interface to communicate with database chosen by the user

func GetManager

func GetManager() Manager

GetManager returns database manager instance

Jump to

Keyboard shortcuts

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