model

package
v0.0.0-...-c94490f Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2019 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

View Source
const (
	IndexStructBaseType = "http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#index_structure"
	StructBaseType      = "http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#structure"
	MapBaseType         = "http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#map"
	ListBaseType        = "http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#list"

	XsdString = "http://www.w3.org/2001/XMLSchema#string"
	XsdInt    = "http://www.w3.org/2001/XMLSchema#integer"
	XsdFloat  = "http://www.w3.org/2001/XMLSchema#decimal"
	XsdBool   = "http://www.w3.org/2001/XMLSchema#boolean"
)

Variables

This section is empty.

Functions

func SortDeviceInstance

func SortDeviceInstance(instances *[]DeviceInstance)

func SortDeviceTypes

func SortDeviceTypes(deviceTypes *[]DeviceType)

func SortValueTypes

func SortValueTypes(instances *[]ValueType)

Types

type AdditionalFormatInfo

type AdditionalFormatInfo struct {
	Id         string    `json:"id,omitempty"                    rdf_entity:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#FormatInfo"`
	Field      FieldType `` /* 149-byte string literal not displayed */
	FormatFlag string    `json:"format_flag"                     rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#hasFormatFlag"`
}

type AllowedValues

type AllowedValues struct {
	ServiceTypes []SmartObject `json:"service_types"`
	Formats      []Format      `json:"formats"`
	Primitive    []string      `json:"primitive"`
	Collections  []string      `json:"collections"`
	Structures   []string      `json:"structures"`
	Map          []string      `json:"map"`
	Set          []string      `json:"set"`
}

func GetAllowedValuesBase

func GetAllowedValuesBase() AllowedValues

func (AllowedValues) IsCollection

func (allowedValues AllowedValues) IsCollection(valueType ValueType) bool

func (AllowedValues) IsMap

func (allowedValues AllowedValues) IsMap(valueType ValueType) bool

func (AllowedValues) IsPrimitive

func (allowedValues AllowedValues) IsPrimitive(valueType ValueType) bool

func (AllowedValues) IsSet

func (allowedValues AllowedValues) IsSet(valueType ValueType) bool

func (AllowedValues) IsStructure

func (allowedValues AllowedValues) IsStructure(valueType ValueType) bool

type Auth

type Auth struct {
	ResourceId  string       `json:"resource_id"                        rdf_entity:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#Auth"`
	Owner       string       `json:"owner"                               rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#owner"`
	Permissions []Permission `` /* 130-byte string literal not displayed */
}

type AuthAction

type AuthAction int
const (
	READ AuthAction = iota
	WRITE
	EXECUTE
	ADMINISTRATE
)

type ConfigField

type ConfigField struct {
	Id    string `json:"id,omitempty"    rdf_entity:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#ConfigField"`
	Name  string `json:"name,omitempty"  rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#name"`
	Value string `json:"value"           rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#hasValue"`
}

type ConfigFieldType

type ConfigFieldType struct {
	Id   string `json:"id,omitempty"    rdf_entity:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#ConfigField"`
	Name string `json:"name,omitempty"  rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#name"`
}

type DeviceClass

type DeviceClass struct {
	Id   string `json:"id,omitempty" rdf_entity:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#DeviceClass" rdf_root:"true"`
	Name string `json:"name,omitempty"  rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#name"`
}

type DeviceGatewayRelation

type DeviceGatewayRelation struct {
	Id      string `` /* 144-byte string literal not displayed */
	Gateway string `` /* 141-byte string literal not displayed */
}

type DeviceInstance

type DeviceInstance struct {
	Id         string        `` /* 144-byte string literal not displayed */
	Name       string        `` /* 127-byte string literal not displayed */
	DeviceType string        `` /* 136-byte string literal not displayed */
	Config     []ConfigField `` /* 132-byte string literal not displayed */
	Url        string        `` /* 126-byte string literal not displayed */
	Tags       []string      `` /* 129-byte string literal not displayed */
	UserTags   []string      `` /* 133-byte string literal not displayed */
	Gateway    string        `` /* 141-byte string literal not displayed */
	ImgUrl     string        `` /* 128-byte string literal not displayed */
}

func (DeviceInstance) IsValid

func (this DeviceInstance) IsValid() (valid bool, error string)

type DeviceServiceEntity

type DeviceServiceEntity struct {
	Device   DeviceInstance `json:"device"`
	Services []ShortService `json:"services"`
}

type DeviceToGateway

type DeviceToGateway struct {
	Id      string      `` /* 144-byte string literal not displayed */
	Gateway GatewayName `` /* 126-byte string literal not displayed */
}

type DeviceType

type DeviceType struct {
	Id          string            `` /* 134-byte string literal not displayed */
	Name        string            `json:"name,omitempty"                              rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#name"`
	Description string            `` /* 132-byte string literal not displayed */
	Generated   bool              `` /* 128-byte string literal not displayed */
	Maintenance []string          `` /* 132-byte string literal not displayed */
	DeviceClass DeviceClass       `` /* 135-byte string literal not displayed */
	Services    []Service         `` /* 131-byte string literal not displayed */
	Vendor      Vendor            `` /* 127-byte string literal not displayed */
	Config      []ConfigFieldType `` /* 139-byte string literal not displayed */
	ImgUrl      string            `` /* 126-byte string literal not displayed */
}

func (DeviceType) IsValid

func (this DeviceType) IsValid() (valid bool, error string)

type Endpoint

type Endpoint struct {
	Id              string `json:"id"                                  rdf_entity:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#Endpoint"`
	Endpoint        string `json:"endpoint"                            rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#endpoint"`
	Service         string `json:"service"           rdf_ref:"true"    rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#refService"`
	Device          string `json:"device"            rdf_ref:"true"    rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#refDevice"`
	ProtocolHandler string `` /* 129-byte string literal not displayed */
}

type FieldType

type FieldType struct {
	Id   string    `json:"id,omitempty"    rdf_entity:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#FieldType"`
	Name string    `json:"name,omitempty"  rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#name"`
	Type ValueType `json:"type,omitempty"  rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#hasValueType"`
}

type Format

type Format struct {
	Id   string `json:"id,omitempty" rdf_entity:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#Format" rdf_root:"true"`
	Name string `json:"name,omitempty"  rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#name"`
}

type Gateway

type Gateway struct {
	Id      string           `` /* 128-byte string literal not displayed */
	Name    string           `json:"name,omitempty"                        rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#name"`
	Hash    string           `json:"hash,omitempty"                        rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#hash"`
	Devices []DeviceInstance `` /* 130-byte string literal not displayed */
}

type GatewayFlat

type GatewayFlat struct {
	Id      string   `` /* 137-byte string literal not displayed */
	Devices []string `` /* 138-byte string literal not displayed */
	Hash    string   `json:"hash,omitempty"                        rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#hash"`
	Name    string   `json:"name,omitempty"                        rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#name"`
}

type GatewayName

type GatewayName struct {
	Id   string `` /* 129-byte string literal not displayed */
	Name string `json:"name,omitempty"                        rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#name"`
}

type GatewayRef

type GatewayRef struct {
	Id      string   `` /* 137-byte string literal not displayed */
	Devices []string `` /* 138-byte string literal not displayed */
	Hash    string   `json:"hash,omitempty"                        rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#hash"`
}

type MsgSegment

type MsgSegment struct {
	Id          string   `json:"id"            rdf_entity:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#MsgSegment" rdf_root:"true"`
	Name        string   `json:"name"                               rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#name"`
	Constraints []string `json:"constraints"   rdf_ref:"true"       rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#hasConstraint"`
}

type OrderDeviceInstance

type OrderDeviceInstance []DeviceInstance

func (OrderDeviceInstance) Len

func (a OrderDeviceInstance) Len() int

func (OrderDeviceInstance) Less

func (a OrderDeviceInstance) Less(i, j int) bool

func (OrderDeviceInstance) Swap

func (a OrderDeviceInstance) Swap(i, j int)

type OrderDeviceType

type OrderDeviceType []DeviceType

func (OrderDeviceType) Len

func (a OrderDeviceType) Len() int

func (OrderDeviceType) Less

func (a OrderDeviceType) Less(i, j int) bool

func (OrderDeviceType) Swap

func (a OrderDeviceType) Swap(i, j int)

type OrderValueType

type OrderValueType []ValueType

func (OrderValueType) Len

func (a OrderValueType) Len() int

func (OrderValueType) Less

func (a OrderValueType) Less(i, j int) bool

func (OrderValueType) Swap

func (a OrderValueType) Swap(i, j int)

type Permission

type Permission struct {
	Id      string `json:"id,omitempty"                        rdf_entity:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#Permission"`
	Role    string `json:"role,omitempty"                      rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#role"`
	User    string `json:"user,omitempty"                      rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#user"`
	Read    bool   `json:"read"                                rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#read"`
	Write   bool   `json:"write"                               rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#write"`
	Execute bool   `json:"execute"                             rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#execute"`
}

type Protocol

type Protocol struct {
	Id                 string       `json:"id,omitempty"     rdf_entity:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#Protocol" rdf_root:"true"`
	ProtocolHandlerUrl string       `` /* 127-byte string literal not displayed */
	Name               string       `json:"name,omitempty"                rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#name"`
	Desc               string       `json:"description"                   rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#description"`
	MsgStructure       []MsgSegment `json:"msg_structure"                 rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#hasMsgSegment"`
}

type Service

type Service struct {
	Id          string `json:"id,omitempty"                           rdf_entity:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#Service"`
	ServiceType string `` // "Actuator" || "Sensor"
	/* 138-byte string literal not displayed */
	Name        string           `` /* 128-byte string literal not displayed */
	Description string           `` /* 135-byte string literal not displayed */
	Protocol    Protocol         `` /* 135-byte string literal not displayed */
	Input       []TypeAssignment `` /* 132-byte string literal not displayed */
	Output      []TypeAssignment `` // list of alternative result types; for example a string if success or a json on error
	/* 133-byte string literal not displayed */
	Url            string `` /* 127-byte string literal not displayed */
	EndpointFormat string `` /* 139-byte string literal not displayed */
}

func (Service) IsValid

func (service Service) IsValid() (valid bool, error string)

type ShortDeviceType

type ShortDeviceType struct {
	Id       string         `` /* 134-byte string literal not displayed */
	Services []ShortService `` /* 131-byte string literal not displayed */
}

type ShortService

type ShortService struct {
	Id          string `json:"id,omitempty"                           rdf_entity:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#Service"`
	ServiceType string `` // "Actuator" || "Sensor"
	/* 138-byte string literal not displayed */
	Url string `` /* 127-byte string literal not displayed */
}

type SmartObject

type SmartObject struct {
	Id   string `json:"id,omitempty" rdf_entity:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#SmartObject" rdf_root:"true"`
	Name string `json:"name,omitempty"  rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#name"`
}

type TypeAssignment

type TypeAssignment struct {
	Id                   string                 `json:"id,omitempty"             rdf_entity:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#MsgSegmentAssignment"`
	Name                 string                 `json:"name"                     rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#name"`
	MsgSegment           MsgSegment             `json:"msg_segment"              rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#hasMsgSegment"`
	Type                 ValueType              `json:"type"                     rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#hasTypeAssigned"`
	Format               string                 `json:"format" rdf_ref:"true"    rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#hasFormat"`
	AdditionalFormatinfo []AdditionalFormatInfo `json:"additional_formatinfo"    rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#hasFormatInfo"`
}

type UltraShortDeviceType

type UltraShortDeviceType struct {
	Id      string `json:"id"                  rdf_entity:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#DeviceType" rdf_root:"true"`
	Service string `json:"service"             rdf_ref:"true"    rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#hasService"`
}

type ValueType

type ValueType struct {
	Id          string      `` /* 128-byte string literal not displayed */
	Name        string      `json:"name,omitempty"                             rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#name"`
	Description string      `` /* 131-byte string literal not displayed */
	BaseType    string      `` /* 131-byte string literal not displayed */
	Fields      []FieldType `json:"fields"                           rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#hasField"`
	Literal     string      `` //is literal, if not empty
	/* 130-byte string literal not displayed */
}

type Vendor

type Vendor struct {
	Id   string `json:"id,omitempty" rdf_entity:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#Vendor" rdf_root:"true"`
	Name string `json:"name,omitempty"  rdf_field:"http://www.sepl.wifa.uni-leipzig.de/ontlogies/device-repo#name"`
}

Jump to

Keyboard shortcuts

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