device

package
v0.0.0-...-c74f1dd Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DeviceHooks = map[Codename]*CustomHooks{
	DeviceJasmine: jasmineHooks,
	DeviceWalleye: walleyeHooks,
}

Functions

This section is empty.

Types

type Codename

type Codename string
const (
	DeviceJasmine Codename = "jasmine"
	DeviceWalleye Codename = "walleye"
)

type CustomHooks

type CustomHooks struct {
	DiscoveryPost     func(device *Device, logger *logrus.Logger) error
	FlashingPreUnlock Hook
	FlashingPreLock   Hook
}

type Device

type Device struct {
	ID            string
	Codename      Codename
	DiscoveryTool ToolName
	CustomHooks   *CustomHooks
}

func New

func New(deviceId, codename, discoveryTool string, logger *logrus.Logger) *Device

func (*Device) String

func (d *Device) String() string

type Hook

type Hook func(device *Device, logger *logrus.Entry) error

type ToolName

type ToolName string
const (
	ADB      ToolName = "adb"
	Fastboot ToolName = "fastboot"
)

Jump to

Keyboard shortcuts

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