dpresponse

package
v0.0.0-...-8d2fcc7 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package dpresponse ...

Package dpresponse ...

Package dpresponse ...

Package dpresponse ...

Package dpresponse ...

Index

Constants

This section is empty.

Variables

View Source
var (
	// ServerToken is the token generated by odimra
	ServerToken string
	// PluginToken is the token generated by Plugin
	PluginToken string
)

Functions

func SetErrorResponse

func SetErrorResponse(ctx iris.Context, err string, statusCode int32)

SetErrorResponse will accepts the iris context, error string and status code it will set error response to ctx

Types

type Device

type Device struct {
	ServerIP   string `json:"ServerIP"`
	Username   string `json:"Username"`
	DeviceUUID string `json:"device_UUID"`
}

Device struct definition

type EmbQueue

type EmbQueue struct {
	QueueName string `json:"EmbQueueName"`
	QueueDesc string `json:"EmbQueueDesc"`
}

EmbQueue holds the information of Queue Name and Queue Description

type Error

type Error struct {
	Code                string            `json:"Code"`
	Message             string            `json:"Message"`
	MessageExtendedInfo []MsgExtendedInfo `json:"@Message.ExtendedInfo"`
}

Error struct is standard response struct

type ErrorResopnse

type ErrorResopnse struct {
	Error Error `json:"Error"`
}

ErrorResopnse struct is response Error struct

func CreateErrorResponse

func CreateErrorResponse(errs string) ErrorResopnse

CreateErrorResponse will accepts the error string and create standard error response

type EventMessageBus

type EventMessageBus struct {
	EmbType  string     `json:"EmbType"`
	EmbQueue []EmbQueue `json:"EmbQueue"`
}

EventMessageBus holds the information of EMB Broker type and EMBQueue information

type Link struct {
	Oid string `json:"@odata.id"`
}

Link stores value of the links

type Login

type Login struct {
	Token string `json:"Token"`
}

Login struct definition

type Manager

type Manager struct {
	OdataContext    string         `json:"@odata.context"`
	Etag            string         `json:"@odata.etag,omitempty"`
	OdataID         string         `json:"@odata.id"`
	OdataType       string         `json:"@odata.type"`
	Name            string         `json:"Name"`
	ManagerType     string         `json:"ManagerType"`
	ID              string         `json:"Id"`
	UUID            string         `json:"UUID"`
	FirmwareVersion string         `json:"FirmwareVersion"`
	Status          *ManagerStatus `json:"Status,omitempty"`
}

Manager struct for manager deta

type ManagerStatus

type ManagerStatus struct {
	State string `json:"State"`
}

ManagerStatus struct is to define the status of the manager

type ManagersCollection

type ManagersCollection struct {
	OdataContext string `json:"@odata.context"`
	Etag         string `json:"@odata.etag,omitempty"`
	OdataID      string `json:"@odata.id"`
	OdataType    string `json:"@odata.type"`
	Description  string `json:"Description"`
	Name         string `json:"Name"`
	Members      []Link `json:"Members"`
	MembersCount int    `json:"Members@odata.count"`
}

ManagersCollection for Plugin

type MsgExtendedInfo

type MsgExtendedInfo struct {
	MessageID   string   `json:"MessageId"`
	Message     string   `json:"Message"`
	MessageArgs []string `json:"MessageArgs"`
}

MsgExtendedInfo struct definition

type PluginResponse

type PluginResponse struct {
	PublicKey []byte `json:"publicKey"`
	Token     string `json:"token"`
}

PluginResponse struct definition

type PluginStatusResponse

type PluginStatusResponse struct {
	Comment         string          `json:"_comment"`
	Name            string          `json:"Name"`
	Version         string          `json:"Version"`
	Status          Status          `json:"Status"`
	EventMessageBus EventMessageBus `json:"EventMessageBus"`
}

PluginStatusResponse holds the information of response of PluginStatus

type Status

type Status struct {
	Available string `json:"Available"`
	Uptime    string `json:"Uptime"`
	TimeStamp string `json:"TimeStamp"`
}

Status holds information of Plugin Status

Jump to

Keyboard shortcuts

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