devicestate

package
v0.0.0-...-677ed08 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2016 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Package devicestate implements the manager and state aspects responsible for the device identity and policies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Model

func Model(st *state.State) (*asserts.Model, error)

Model returns the device model assertion.

func Serial

func Serial(st *state.State) (*asserts.Serial, error)

Serial returns the device serial assertion.

Types

type DeviceManager

type DeviceManager struct {
	// contains filtered or unexported fields
}

DeviceManager is responsible for managing the device identity and device policies.

func Manager

func Manager(s *state.State) (*DeviceManager, error)

Manager returns a new device manager.

func (*DeviceManager) DeviceSessionRequest

func (m *DeviceManager) DeviceSessionRequest(nonce string) (*asserts.DeviceSessionRequest, *asserts.Serial, error)

DeviceSessionRequest produces a device-session-request with the given nonce, it also returns the device serial assertion.

func (*DeviceManager) Ensure

func (m *DeviceManager) Ensure() error

Ensure implements StateManager.Ensure.

func (*DeviceManager) Model

func (m *DeviceManager) Model() (*asserts.Model, error)

Model returns the device model assertion.

func (*DeviceManager) Serial

func (m *DeviceManager) Serial() (*asserts.Serial, error)

Serial returns the device serial assertion.

func (*DeviceManager) Stop

func (m *DeviceManager) Stop()

Stop implements StateManager.Stop.

func (*DeviceManager) Wait

func (m *DeviceManager) Wait()

Wait implements StateManager.Wait.

Jump to

Keyboard shortcuts

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