kb

package
v0.0.0-...-53718e7 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "go-irleak",
	Short: "go-irleak is a tool for performing the tasks of the IRLeak project",
	Long: `go-irleak is a tool for performing the tasks of the IRLeak project.

	
	`,
}

RootCmd represents the base command when called without any subcommands

Functions

func Execute

func Execute()

Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func NewMysqlKB

func NewMysqlKB(user, password, dbname string, params map[string]string) *mysqlKB

Types

type KB

type KB interface {
	Stop()
	GetHash(user string) ([]byte, bool)
	AddToken(user string, token string, expiration int64) bool
	AddUser(user string, hash string) bool
	GetUser(token string) (string, int64, bool)
	ExpireToken(token string) bool
	PurgeTokens(expiration int64) bool

	AddTemperature(user, sensor string, timestamp, value float64) bool
	AddWeather(location, timestamp int64, sunUp bool, temperature, apparentTemperature, cloudCover, humidity, pressure, precipProbability float64) bool
	GetTemperatures(user, sensor string, start, end float64) map[float64]float64
	GetTemperatureSensors(user string, start, end float64) []string

	GetCoordinates() ([][]string, []int64, bool)
}

func NewSQLiteKB

func NewSQLiteKB(dbFile string, sqliteOpts map[string]string) KB

Jump to

Keyboard shortcuts

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