helpers

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: Apache-2.0 Imports: 27 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCouchServiceFiles

func GetCouchServiceFiles(service, designation, deviceType, deviceID string) (map[string][]byte, error)

GetCouchServiceFiles .

func GetServiceFromCouch

func GetServiceFromCouch(service, designation, deviceType, deviceID string) ([]file, bool, error)

GetServiceFromCouch .

func MakeDockerRequest

func MakeDockerRequest(serviceID, designation string) (map[string]interface{}, error)

MakeDockerRequest .

func MakeEnvironmentRequest

func MakeEnvironmentRequest(serviceID, designation string) (map[string]string, error)

MakeEnvironmentRequest .

func NewSession

func NewSession(client *ssh.Client, output io.Writer) (*ssh.Session, *nerr.E)

NewSession opens a new session with the <client>, and writes stdout/err to a <output>

func RetrieveDockerCompose

func RetrieveDockerCompose(deviceType, designation string) ([]byte, error)

RetrieveDockerCompose .

func SetToken

func SetToken(request *http.Request) error

SetToken .

Types

type DeployReport

type DeployReport struct {
	Address   string `json:"address"`
	Timestamp string `json:"timestamp"`
	Message   string `json:"msg"`
	Success   bool   `json:"success"`
}

DeployReport is returned after attempting a deployment

func Deploy

func Deploy(address string, output io.Writer, servicesToDeploy []string, files ...file) DeployReport

Deploy deploys to a single pi

func DeployByHostname

func DeployByHostname(hostname string) (DeployReport, *nerr.E)

DeployByHostname deploys to one specific device with the corresponding hostname

func DeployToDevice

func DeployToDevice(device structs.Device, designation string) (DeployReport, *nerr.E)

DeployToDevice takes a device and gets all the data it needs to deploy

Jump to

Keyboard shortcuts

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