hiveConfig

package
v0.0.0-...-79ef193 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2016 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authtokens

type Authtokens struct {
	Tokens []string `json:"tokens"`
}

Authtokens stores json represent array of tokens

type Endpoints

type Endpoints struct {
	URL   string `json:"url"`
	Delay int    `json:"delay"`
}

Endpoints stores all urls for requests

type HiveConfig

type HiveConfig struct {
	ServerURL    string               `json:"server"`
	TokensPath   string               `json:"token_file_path"`
	DeviceCodes  string               `json:"device_codes_file_path"`
	SecondsDelay int64                `json:"delay"`
	Endpoints    map[string]Endpoints `json:"endpoints"`
}

HiveConfig gather all of needed configs

func GetConfigJSON

func GetConfigJSON(jsonFile string) (cfg HiveConfig, err error)

GetConfigJSON func get full path to config.json and store it in HiveConfig struct

type SadirLogins

type SadirLogins struct {
	Logins []string `json:"sadira_logins"`
}

SadirLogins stores logins

func GetLogins

func GetLogins(loginsFile string) (logins SadirLogins, err error)

GetLogins read avaible logins and return it

Jump to

Keyboard shortcuts

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