adapter

package
v0.0.0-...-eea4d52 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseAdapter

type DatabaseAdapter interface {
	AddMeasurement(watt uint16) error
	KwhLatest() float32
	KwhToday() float32
	KwhThisMonth() float32
	KwhThisYear() float32
	KwhTotal() float32

	CreateTableIfNotExits()
	Close()
}

type MySqlAdapter

type MySqlAdapter struct {
	// contains filtered or unexported fields
}

func NewMySqlAdapter

func NewMySqlAdapter(user string, password string, host string) *MySqlAdapter

func (*MySqlAdapter) AddMeasurement

func (m *MySqlAdapter) AddMeasurement(watt uint16) error

func (*MySqlAdapter) Close

func (m *MySqlAdapter) Close()

func (*MySqlAdapter) CreateTableIfNotExits

func (m *MySqlAdapter) CreateTableIfNotExits()

func (*MySqlAdapter) KwhLatest

func (m *MySqlAdapter) KwhLatest() float32

func (*MySqlAdapter) KwhThisMonth

func (m *MySqlAdapter) KwhThisMonth() float32

func (*MySqlAdapter) KwhThisYear

func (m *MySqlAdapter) KwhThisYear() float32

func (*MySqlAdapter) KwhToday

func (m *MySqlAdapter) KwhToday() float32

func (*MySqlAdapter) KwhTotal

func (m *MySqlAdapter) KwhTotal() float32

Jump to

Keyboard shortcuts

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