resourcesgateway

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Company

type Company struct {
	ID          string `json:"id"`
	CompanyName string `json:"companyname"`
	Domain      string `json:"domain"`
}

type CompanyData added in v1.0.0

type CompanyData struct {
	Company Company `json:"company"`
	Contact string  `json:"contact"`
	Status  string  `json:"status"`
}

type Gateway

type Gateway interface {
	FindCompanies(ctx context.Context, request *ListCompaniesRequest) ([]CompanyData, error)
	FindMachines(ctx context.Context, request *ListMachinesRequest) ([]Machine, error)
	FindSensors(ctx context.Context, request *ListSensorsRequest) ([]Sensor, error)
}

func NewAdapter

func NewAdapter(client restclient.RestClient, env types.Environment) Gateway

type ListCompaniesRequest added in v1.0.0

type ListCompaniesRequest struct {
	OwnCompanyID string
}

type ListMachinesRequest

type ListMachinesRequest struct {
	CompanyID    string
	OwnCompanyID string
}

type ListSensorsRequest

type ListSensorsRequest struct {
	MachineID string
}

type Machine

type Machine struct {
	ID          string `json:"id"`
	Name        string `json:"displayname"`
	Description string `json:"description"`
}

type Sensor

type Sensor struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

type SensorData added in v1.0.0

type SensorData struct {
	ID      string   `json:"id"`
	Sensors []Sensor `json:"sensors"`
}

Jump to

Keyboard shortcuts

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