rpimonitor

package module
v0.0.0-...-ffb5472 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2017 License: MIT Imports: 1 Imported by: 0

README

rpimonitor


Build Go Report Card Coverage Status

My Raspberry Pi Monitor

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device interface {
	StatusReader
	SampleReader
}

Device implemented by components that read hw data.

type Info

type Info map[string]interface{}

Info is a basic data type

type Sample

type Sample struct {
	LocalTime time.Time `json:"localTime" bson:"localTime"`
	Timestamp int64     `json:"timestamp" bson:"timestamp"`
	Metrics   Info      `json:"metrics" bson:"metrics"`
}

Sample holds data collected at some time.

type SampleFetcher

type SampleFetcher interface {
	Query(start, end time.Time) ([]Sample, error)
}

SampleFetcher is the interface that must be implemented by a database service for querying data.

type SampleReader

type SampleReader interface {
	ReadSample() (*Sample, error)
}

SampleReader is the interface that must implemented by the device.

type SampleWriter

type SampleWriter interface {
	Write(sample *Sample) error
}

SampleWriter is the interface that must be implemented by a database service for persisting data.

type Status

type Status struct {
	LocalTime time.Time `json:"localTime" bson:"localTime"`
	Metrics   Info      `json:"metrics" bson:"metrics"`
}

Status holds static data about the device like CPU info, users, etc.

type StatusReader

type StatusReader interface {
	ReadStatus() (*Status, error)
}

StatusReader is the interface the must be implemented by the device.

type User

type User struct {
	Login string
	Name  string
}

User represents a User in the application.

type UserManager

type UserManager interface {
	Authenticate(login, password string) (*User, error)
}

UserManager is the interface that must be implemented by the database service for fetching and authenticating users.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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