model

package
v0.0.0-...-e38139c Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func C2F

func C2F(cels float64) (fahr float64, err error)

C2F returns appropriate number of fahrenheits, storing and caching the pair

func F2C

func F2C(fahr float64) (cels float64, err error)

F2C returns appropriate number of celsius, storing and caching the pair

func SetDatabase

func SetDatabase(dBase Database)

SetDatabase sets DB interface

Types

type Database

type Database interface {
	GetByC(cels float64) (fahr float64, notFound bool, err error)
	GetByF(fahr float64) (cels float64, notFound bool, err error)
	SetPair(cels, fahr float64) (err error)
}

Database is DB interface

Jump to

Keyboard shortcuts

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