device

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	Log               *logrus.Logger         `json:"-"`
	Board             board.Interface        `json:"-"`
	Name              string                 `json:"name"`
	BoardType         board.Type             `json:"boardType"`
	LocalUUID         string                 `json:"localUUID"`
	ResinUUID         string                 `json:"resinUUID"`
	ApplicationUUID   int                    `json:"applicationUUID"`
	ApplicationName   string                 `json:"applicationName"`
	Commit            string                 `json:"commit"`
	TargetCommit      string                 `json:"targetCommit"`
	Status            status.Status          `json:"status"`
	Progress          float32                `json:"progress"`
	Config            map[string]interface{} `json:"config"`
	TargetConfig      map[string]interface{} `json:"targetConfig"`
	Environment       map[string]interface{} `json:"environment"`
	TargetEnvironment map[string]interface{} `json:"targetEnvironment"`
	RestartFlag       bool                   `json:"restartFlag"`
	DeleteFlag        bool                   `json:"deleteFlag"`
	// contains filtered or unexported fields
}

func Create added in v0.1.3

func Create(boardType board.Type, name, localUUID, resinUUID string, applicationUUID int, applicationName, targetCommit string) (*Device, error)

func Unmarshall added in v0.1.3

func Unmarshall(bytes []byte) (*Device, error)

func (*Device) Marshall added in v0.1.3

func (d *Device) Marshall() ([]byte, error)

func (*Device) SetStatus

func (d *Device) SetStatus(newStatus status.Status) []error

Only set the is_online field if the device is_online state has changed

func (Device) String

func (d Device) String() string

func (*Device) Sync added in v0.1.5

func (d *Device) Sync() []error

Sync device with resin to ensure we have the latest values for: - Device name - Device target config - Device target environment

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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