device

package
v0.0.0-...-a52efcf Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorRequireEventID    = "missing required event id"
	ErrorRequireDeviceID   = "missing required device id"
	ErrorRequireUnlockCode = "missing required unlock code"
	ErrorRepository        = "unable to query repository"
	ErrorEventNotFound     = "event not found"
	ErrorUnlockNotFound    = "device / unlock code combination not found"
)

Device Service Error descriptions

View Source
const ServiceName = "device"

ServiceName of this service.

Variables

View Source
var (
	ErrRequireEventID    = errors.New(ErrorRequireEventID)
	ErrRequireDeviceID   = errors.New(ErrorRequireDeviceID)
	ErrRequireUnlockCode = errors.New(ErrorRequireUnlockCode)
	ErrRepository        = errors.New(ErrorRepository)
	ErrEventNotFound     = errors.New(ErrorEventNotFound)
	ErrUnlockNotFound    = errors.New(ErrorUnlockNotFound)
)

Device Service Errors

Functions

This section is empty.

Types

type Service

type Service interface {
	Unlock(ctx context.Context, eventID, deviceID uuid.UUID, code string) (*Session, error)
}

Service describes our Device service.

type Session

type Session struct {
	EventCaption  string `json:"event_caption,omitempty"`
	DeviceCaption string `json:"device_caption,omitempty"`
	Token         string `json:"token,omitempty"`
}

Session holds session details

Directories

Path Synopsis
pb
Package pb is a generated protocol buffer package.
Package pb is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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