database

package
v0.0.0-...-42bbcaa Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package database allows the bookwarehouse service to store total books data into MySQL persistent storage

Index

Constants

View Source
const (
	KeyTotalBooks = "total-books"
)

Variables

This section is empty.

Functions

func GetMySQLConnection

func GetMySQLConnection() (*gorm.DB, error)

GetMySQLConnection returns a MySQL connection using default configuration

func Init

func Init()

func Update

func Update(numberOfBooks int) int

Types

type Record

type Record struct {
	Key      string `gorm:"primaryKey"`
	ValueInt int64
}

Record stores key value pairs

Jump to

Keyboard shortcuts

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