devadm

package
v0.0.0-...-04a9cd4 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Copyright 2017 Northern.tech AS

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAuthNotFound     = errors.New("device auth set not found")
	ErrNotPreauthorized = errors.New("auth set must be in 'preauthorized' state")
)
View Source
var AuthSetConflictError = errors.New("device already exists")

Functions

This section is empty.

Types

type ApiClientGetter

type ApiClientGetter func() client.HttpRunner

helper for obtaining API clients

type App

type App interface {
	ListDeviceAuths(ctx context.Context, skip int, limit int, filter store.Filter) ([]model.DeviceAuth, error)
	SubmitDeviceAuth(ctx context.Context, d model.DeviceAuth) error
	GetDeviceAuth(ctx context.Context, id model.AuthID) (*model.DeviceAuth, error)
	AcceptDeviceAuth(ctx context.Context, id model.AuthID) error
	RejectDeviceAuth(ctx context.Context, id model.AuthID) error
	DeleteDeviceAuth(ctx context.Context, id model.AuthID) error
	DeleteDeviceAuthPropagate(ctx context.Context, id model.AuthID, authorizationHeader string) error
	AcceptDevicePreAuth(ctx context.Context, id model.AuthID) error

	DeleteDeviceData(ctx context.Context, id model.DeviceID) error

	ProvisionTenant(ctx context.Context, tenant_id string) error

	PreauthorizeDevice(ctx context.Context, authSet model.AuthSet, authorizationHeader string) error
}

this device admission service interface

func NewDevAdm

func NewDevAdm(d store.DataStore, authclientconf deviceauth.Config, clock clock.Clock) App

type DevAdm

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

func (*DevAdm) AcceptDeviceAuth

func (d *DevAdm) AcceptDeviceAuth(ctx context.Context, id model.AuthID) error

func (*DevAdm) AcceptDevicePreAuth

func (d *DevAdm) AcceptDevicePreAuth(ctx context.Context, id model.AuthID) error

func (*DevAdm) DeleteDeviceAuth

func (d *DevAdm) DeleteDeviceAuth(ctx context.Context, id model.AuthID) error

func (*DevAdm) DeleteDeviceAuthPropagate

func (d *DevAdm) DeleteDeviceAuthPropagate(ctx context.Context, id model.AuthID, authorizationHeader string) error

func (*DevAdm) DeleteDeviceData

func (d *DevAdm) DeleteDeviceData(ctx context.Context, devid model.DeviceID) error

func (*DevAdm) GetDeviceAuth

func (d *DevAdm) GetDeviceAuth(ctx context.Context, id model.AuthID) (*model.DeviceAuth, error)

func (*DevAdm) ListDeviceAuths

func (d *DevAdm) ListDeviceAuths(ctx context.Context, skip int, limit int, filter store.Filter) ([]model.DeviceAuth, error)

func (*DevAdm) PreauthorizeDevice

func (d *DevAdm) PreauthorizeDevice(ctx context.Context, authSet model.AuthSet, authorizationHeader string) error

func (*DevAdm) ProvisionTenant

func (d *DevAdm) ProvisionTenant(ctx context.Context, tenant_id string) error

func (*DevAdm) RejectDeviceAuth

func (d *DevAdm) RejectDeviceAuth(ctx context.Context, id model.AuthID) error

func (*DevAdm) SubmitDeviceAuth

func (d *DevAdm) SubmitDeviceAuth(ctx context.Context, dev model.DeviceAuth) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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