client

package
v0.1.53 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: Apache-2.0 Imports: 22 Imported by: 44

Documentation

Index

Constants

View Source
const ADMINISTRATE = model.ADMINISTRATE
View Source
const EXECUTE = model.EXECUTE
View Source
const InternalAdminToken = `` /* 727-byte string literal not displayed */

InternalAdminToken is expired and invalid. but because this service does not validate the received tokens, it may be used by trusted internal services which are within the same network (kubernetes cluster). requests with this token may not be routed over an ingres with token validation

View Source
const READ = model.READ
View Source
const SES_ONTOLOGY_CONTROLLING_FUNCTION = model.SES_ONTOLOGY_CONTROLLING_FUNCTION
View Source
const SES_ONTOLOGY_MEASURING_FUNCTION = model.SES_ONTOLOGY_MEASURING_FUNCTION
View Source
const WRITE = model.WRITE

Variables

View Source
var ConnectionStateOffline = &connectionStateOffline
View Source
var ConnectionStateOnline = &connectionStateOnline
View Source
var ConnectionStateUnknown = &connectionStateUnknown
View Source
var Event = models.EVENT
View Source
var EventAndRequest = models.EVENT_AND_REQUEST
View Source
var Request = models.REQUEST

Functions

func NewTokenProvider added in v0.1.53

func NewTokenProvider(authEndpoint string, authClientId string, authClientSecret string) func() (string, error)

func NewUserTokenProvider added in v0.1.53

func NewUserTokenProvider(authEndpoint string, authClientId string, authClientSecret string, userName string, pw string) func() (string, error)

Types

type AspectListOptions added in v0.1.40

type AspectListOptions = model.AspectListOptions

type CharacteristicListOptions added in v0.1.48

type CharacteristicListOptions = model.CharacteristicListOptions

type Client

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

func (*Client) CreateDevice added in v0.1.53

func (c *Client) CreateDevice(token string, device models.Device) (result models.Device, err error, code int)

func (*Client) DeleteAspect added in v0.1.53

func (c *Client) DeleteAspect(token string, id string) (err error, code int)

func (*Client) DeleteCharacteristic added in v0.1.53

func (c *Client) DeleteCharacteristic(token string, id string) (err error, code int)

func (*Client) DeleteConcept added in v0.1.53

func (c *Client) DeleteConcept(token string, id string) (err error, code int)

func (*Client) DeleteDevice added in v0.1.53

func (c *Client) DeleteDevice(token string, id string) (err error, code int)

func (*Client) DeleteDeviceClass added in v0.1.53

func (c *Client) DeleteDeviceClass(token string, id string) (err error, code int)

func (*Client) DeleteDeviceGroup added in v0.1.53

func (c *Client) DeleteDeviceGroup(token string, id string) (err error, code int)

func (*Client) DeleteDeviceType added in v0.1.53

func (c *Client) DeleteDeviceType(token string, id string) (err error, code int)

func (*Client) DeleteFunction added in v0.1.53

func (c *Client) DeleteFunction(token string, id string) (err error, code int)

func (*Client) DeleteHub added in v0.1.53

func (c *Client) DeleteHub(token string, id string) (err error, code int)

func (*Client) DeleteLocation added in v0.1.53

func (c *Client) DeleteLocation(token string, id string) (err error, code int)

func (*Client) DeleteProtocol added in v0.1.53

func (c *Client) DeleteProtocol(token string, id string) (err error, code int)

func (*Client) DeleteUser added in v0.1.53

func (c *Client) DeleteUser(adminToken string, userId string) (err error, errCode int)

func (*Client) Export added in v0.1.53

func (c *Client) Export(token string, options model.ImportExportOptions) (result model.ImportExport, err error, code int)

func (*Client) GetAspect

func (c *Client) GetAspect(id string) (models.Aspect, error, int)

func (*Client) GetAspectNode

func (c *Client) GetAspectNode(id string) (models.AspectNode, error, int)

func (*Client) GetAspectNodes

func (c *Client) GetAspectNodes() ([]models.AspectNode, error, int)

func (*Client) GetAspectNodesByIdList

func (c *Client) GetAspectNodesByIdList(ids []string) (result []models.AspectNode, err error, code int)

func (*Client) GetAspectNodesMeasuringFunctions

func (c *Client) GetAspectNodesMeasuringFunctions(id string, ancestors bool, descendants bool) (result []models.Function, err error, errCode int)

func (*Client) GetAspectNodesWithFunction

func (c *Client) GetAspectNodesWithFunction(function string, ancestors bool, descendants bool) ([]models.AspectNode, error, int)

func (*Client) GetAspectNodesWithMeasuringFunction

func (c *Client) GetAspectNodesWithMeasuringFunction(ancestors bool, descendants bool) ([]models.AspectNode, error, int)

func (*Client) GetAspects

func (c *Client) GetAspects() ([]models.Aspect, error, int)

func (*Client) GetAspectsWithMeasuringFunction

func (c *Client) GetAspectsWithMeasuringFunction(ancestors bool, descendants bool) ([]models.Aspect, error, int)

func (*Client) GetCharacteristic

func (c *Client) GetCharacteristic(id string) (result models.Characteristic, err error, errCode int)

func (*Client) GetCharacteristics added in v0.1.15

func (c *Client) GetCharacteristics(leafsOnly bool) (result []models.Characteristic, err error, errCode int)

func (*Client) GetConceptWithCharacteristics

func (c *Client) GetConceptWithCharacteristics(id string) (models.ConceptWithCharacteristics, error, int)

func (*Client) GetConceptWithoutCharacteristics

func (c *Client) GetConceptWithoutCharacteristics(id string) (models.Concept, error, int)

func (*Client) GetDeviceClass

func (c *Client) GetDeviceClass(id string) (result models.DeviceClass, err error, errCode int)

func (*Client) GetDeviceClasses

func (c *Client) GetDeviceClasses() ([]models.DeviceClass, error, int)

func (*Client) GetDeviceClassesControllingFunctions

func (c *Client) GetDeviceClassesControllingFunctions(id string) (result []models.Function, err error, errCode int)

func (*Client) GetDeviceClassesFunctions

func (c *Client) GetDeviceClassesFunctions(id string) (result []models.Function, err error, errCode int)

func (*Client) GetDeviceClassesWithControllingFunctions

func (c *Client) GetDeviceClassesWithControllingFunctions() ([]models.DeviceClass, error, int)

func (*Client) GetDeviceTypeSelectables

func (c *Client) GetDeviceTypeSelectables(query []model.FilterCriteria, pathPrefix string, interactionsFilter []string, includeModified bool) (result []model.DeviceTypeSelectable, err error, code int)

func (*Client) GetDeviceTypeSelectablesV2

func (c *Client) GetDeviceTypeSelectablesV2(query []model.FilterCriteria, pathPrefix string, includeModified bool, servicesMustMatchAllCriteria bool) (result []model.DeviceTypeSelectable, err error, code int)

func (*Client) GetFunction

func (c *Client) GetFunction(id string) (result models.Function, err error, errCode int)

func (*Client) GetFunctionsByType

func (c *Client) GetFunctionsByType(rdfType string) (result []models.Function, err error, errCode int)

func (*Client) GetLocation

func (c *Client) GetLocation(id string, token string) (location models.Location, err error, errCode int)

func (*Client) GetPermissionsClient added in v0.1.15

func (c *Client) GetPermissionsClient() permissions.Client

func (*Client) GetService

func (c *Client) GetService(id string) (result models.Service, err error, code int)

func (*Client) GetUsedInDeviceType added in v0.0.6

func (c *Client) GetUsedInDeviceType(query model.UsedInDeviceTypeQuery) (result model.UsedInDeviceTypeResponse, err error, errCode int)

func (*Client) Import added in v0.1.53

func (c *Client) Import(token string, importModel model.ImportExport, options model.ImportExportOptions) (err error, code int)

func (*Client) ListAspectNodes added in v0.1.40

func (c *Client) ListAspectNodes(options model.AspectListOptions) (result []models.AspectNode, total int64, err error, errCode int)

func (*Client) ListAspects added in v0.1.40

func (c *Client) ListAspects(options model.AspectListOptions) (result []models.Aspect, total int64, err error, errCode int)

func (*Client) ListCharacteristics added in v0.1.48

func (c *Client) ListCharacteristics(options model.CharacteristicListOptions) (result []models.Characteristic, total int64, err error, errCode int)

func (*Client) ListConcepts added in v0.1.41

func (c *Client) ListConcepts(options model.ConceptListOptions) (result []models.Concept, total int64, err error, errCode int)

func (*Client) ListConceptsWithCharacteristics added in v0.1.41

func (c *Client) ListConceptsWithCharacteristics(options model.ConceptListOptions) (result []models.ConceptWithCharacteristics, total int64, err error, errCode int)

func (*Client) ListDeviceClasses added in v0.1.43

func (c *Client) ListDeviceClasses(options model.DeviceClassListOptions) (result []models.DeviceClass, total int64, err error, errCode int)

func (*Client) ListDeviceGroups added in v0.1.25

func (c *Client) ListDeviceGroups(token string, options model.DeviceGroupListOptions) (result []models.DeviceGroup, total int64, err error, errCode int)

func (*Client) ListDeviceTypes

func (c *Client) ListDeviceTypes(token string, limit int64, offset int64, sort string, filter []model.FilterCriteria, interactionsFilter []string, includeModified bool, includeUnmodified bool) (result []models.DeviceType, err error, errCode int)

func (*Client) ListDeviceTypesV2

func (c *Client) ListDeviceTypesV2(token string, limit int64, offset int64, sort string, filter []model.FilterCriteria, includeModified bool, includeUnmodified bool) (result []models.DeviceType, err error, errCode int)

func (*Client) ListDeviceTypesV3 added in v0.1.12

func (c *Client) ListDeviceTypesV3(token string, options model.DeviceTypeListOptions) (result []models.DeviceType, total int64, err error, errCode int)

func (*Client) ListDevices added in v0.0.20

func (c *Client) ListDevices(token string, options DeviceListOptions) (result []models.Device, err error, errCode int)

func (*Client) ListExtendedDevices added in v0.1.0

func (c *Client) ListExtendedDevices(token string, options model.ExtendedDeviceListOptions) (result []models.ExtendedDevice, total int64, err error, errCode int)

func (*Client) ListExtendedHubs added in v0.1.0

func (c *Client) ListExtendedHubs(token string, options model.HubListOptions) (result []models.ExtendedHub, total int64, err error, errCode int)

func (*Client) ListFunctions added in v0.1.38

func (c *Client) ListFunctions(options model.FunctionListOptions) (result []models.Function, total int64, err error, errCode int)

func (*Client) ListHubDeviceIds

func (c *Client) ListHubDeviceIds(id string, token string, action model.AuthAction, asLocalId bool) (result []string, err error, errCode int)

func (*Client) ListHubs added in v0.1.0

func (c *Client) ListHubs(token string, options model.HubListOptions) (result []models.Hub, err error, errCode int)

func (*Client) ListLocations added in v0.1.30

func (c *Client) ListLocations(token string, options model.LocationListOptions) (result []models.Location, total int64, err error, errCode int)

func (*Client) ListProtocols

func (c *Client) ListProtocols(token string, limit int64, offset int64, sort string) (result []models.Protocol, err error, errCode int)

func (*Client) ReadDevice

func (c *Client) ReadDevice(id string, token string, action model.AuthAction) (result models.Device, err error, errCode int)

func (*Client) ReadDeviceByLocalId

func (c *Client) ReadDeviceByLocalId(ownerId string, localId string, token string, action model.AuthAction) (result models.Device, err error, errCode int)

func (*Client) ReadDeviceGroup

func (c *Client) ReadDeviceGroup(id string, token string, filterGenericDuplicateCriteria bool) (result models.DeviceGroup, err error, errCode int)

func (*Client) ReadDeviceType

func (c *Client) ReadDeviceType(id string, token string) (result models.DeviceType, err error, errCode int)

func (*Client) ReadExtendedDevice added in v0.1.0

func (c *Client) ReadExtendedDevice(id string, token string, action model.AuthAction, fullDt bool) (result models.ExtendedDevice, err error, errCode int)

func (*Client) ReadExtendedDeviceByLocalId added in v0.1.0

func (c *Client) ReadExtendedDeviceByLocalId(ownerId string, localId string, token string, action model.AuthAction, fullDt bool) (result models.ExtendedDevice, err error, errCode int)

func (*Client) ReadExtendedHub added in v0.1.0

func (c *Client) ReadExtendedHub(id string, token string, action model.AuthAction) (result models.ExtendedHub, err error, errCode int)

func (*Client) ReadHub

func (c *Client) ReadHub(id string, token string, action model.AuthAction) (result models.Hub, err error, errCode int)

func (*Client) ReadProtocol

func (c *Client) ReadProtocol(id string, token string) (result models.Protocol, err error, errCode int)

func (*Client) SetAspect added in v0.1.53

func (c *Client) SetAspect(token string, aspect models.Aspect) (result models.Aspect, err error, code int)

func (*Client) SetCharacteristic added in v0.1.53

func (c *Client) SetCharacteristic(token string, characteristic models.Characteristic) (result models.Characteristic, err error, code int)

func (*Client) SetConcept added in v0.1.53

func (c *Client) SetConcept(token string, concept models.Concept) (result models.Concept, err error, code int)

func (*Client) SetDevice added in v0.1.53

func (c *Client) SetDevice(token string, device models.Device, options model.DeviceUpdateOptions) (result models.Device, err error, code int)

func (*Client) SetDeviceClass added in v0.1.53

func (c *Client) SetDeviceClass(token string, deviceClass models.DeviceClass) (result models.DeviceClass, err error, code int)

func (*Client) SetDeviceConnectionState added in v0.1.53

func (c *Client) SetDeviceConnectionState(token string, id string, connected bool) (error, int)

func (*Client) SetDeviceGroup added in v0.1.53

func (c *Client) SetDeviceGroup(token string, deviceGroup models.DeviceGroup) (result models.DeviceGroup, err error, code int)

func (*Client) SetDeviceType added in v0.1.53

func (c *Client) SetDeviceType(token string, deviceType models.DeviceType, options model.DeviceTypeUpdateOptions) (result models.DeviceType, err error, code int)

func (*Client) SetFunction added in v0.1.53

func (c *Client) SetFunction(token string, function models.Function) (result models.Function, err error, code int)

func (*Client) SetHub added in v0.1.53

func (c *Client) SetHub(token string, hub models.Hub) (result models.Hub, err error, code int)

func (*Client) SetHubConnectionState added in v0.1.53

func (c *Client) SetHubConnectionState(token string, id string, connected bool) (error, int)

func (*Client) SetLocation added in v0.1.53

func (c *Client) SetLocation(token string, location models.Location) (result models.Location, err error, code int)

func (*Client) SetProtocol added in v0.1.53

func (c *Client) SetProtocol(token string, protocol models.Protocol) (result models.Protocol, err error, code int)

func (*Client) ValidateAspect

func (c *Client) ValidateAspect(aspect models.Aspect) (err error, code int)

func (*Client) ValidateAspectDelete

func (c *Client) ValidateAspectDelete(id string) (err error, code int)

func (*Client) ValidateCharacteristicDelete

func (c *Client) ValidateCharacteristicDelete(id string) (err error, code int)

func (*Client) ValidateCharacteristics

func (c *Client) ValidateCharacteristics(characteristic models.Characteristic) (err error, code int)

func (*Client) ValidateConcept

func (c *Client) ValidateConcept(concept models.Concept) (err error, code int)

func (*Client) ValidateConceptDelete

func (c *Client) ValidateConceptDelete(id string) (err error, code int)

func (*Client) ValidateDevice

func (c *Client) ValidateDevice(token string, device models.Device) (err error, code int)

func (*Client) ValidateDeviceClass

func (c *Client) ValidateDeviceClass(deviceclass models.DeviceClass) (err error, code int)

func (*Client) ValidateDeviceClassDelete

func (c *Client) ValidateDeviceClassDelete(id string) (err error, code int)

func (*Client) ValidateDeviceGroup

func (c *Client) ValidateDeviceGroup(token string, deviceGroup models.DeviceGroup) (err error, code int)

func (*Client) ValidateDeviceGroupDelete added in v0.1.18

func (c *Client) ValidateDeviceGroupDelete(token string, id string) (err error, code int)

func (*Client) ValidateDeviceType

func (c *Client) ValidateDeviceType(deviceType models.DeviceType, options model.ValidationOptions) (err error, code int)

func (*Client) ValidateFunction

func (c *Client) ValidateFunction(function models.Function) (err error, code int)

func (*Client) ValidateFunctionDelete

func (c *Client) ValidateFunctionDelete(id string) (err error, code int)

func (*Client) ValidateHub

func (c *Client) ValidateHub(token string, hub models.Hub) (err error, code int)

func (*Client) ValidateLocation

func (c *Client) ValidateLocation(location models.Location) (err error, code int)

func (*Client) ValidateProtocol

func (c *Client) ValidateProtocol(protocol models.Protocol) (err error, code int)

type ConceptListOptions added in v0.1.41

type ConceptListOptions = model.ConceptListOptions

type DeviceClassListOptions added in v0.1.43

type DeviceClassListOptions = model.DeviceClassListOptions

type DeviceGroupListOptions added in v0.1.25

type DeviceGroupListOptions = model.DeviceGroupListOptions

type DeviceListOptions added in v0.0.20

type DeviceListOptions = model.DeviceListOptions

type DeviceTypeListOptions added in v0.1.12

type DeviceTypeListOptions = model.DeviceTypeListOptions

type DeviceTypeUpdateOptions added in v0.1.53

type DeviceTypeUpdateOptions = model.DeviceTypeUpdateOptions

type DeviceTypeValidationOptions added in v0.0.5

type DeviceTypeValidationOptions = model.ValidationOptions

type DeviceUpdateOptions added in v0.1.53

type DeviceUpdateOptions = model.DeviceUpdateOptions

type DeviceWithConnectionState added in v0.1.37

type DeviceWithConnectionState = model.DeviceWithConnectionState

type ExtendedDeviceListOptions added in v0.1.23

type ExtendedDeviceListOptions = model.ExtendedDeviceListOptions

type FilterCriteria added in v0.1.25

type FilterCriteria = model.FilterCriteria

type FunctionListOptions added in v0.1.38

type FunctionListOptions = model.FunctionListOptions

type HubListOptions added in v0.1.0

type HubListOptions = model.HubListOptions

type Interface

type Interface interface {
	api.Controller
	GetPermissionsClient() permissions.Client
}

func NewClient

func NewClient(baseUrl string, optionalAuthTokenForApiGatewayRequest func() (token string, err error)) Interface

NewClient creates a new client optionalAuthTokenForApiGatewayRequest:

  • may be nil if used internally, without kong routing
  • is used for requests that internally don`t need an auth token but are forced to send one if the request is routed over the SENERGY-Platform api-gateway

func NewTestClient

func NewTestClient() (ctrl Interface, db database.Database, err error)

type LocationListOptions added in v0.1.30

type LocationListOptions = model.LocationListOptions

type OpenidToken added in v0.1.53

type OpenidToken struct {
	AccessToken      string    `json:"access_token"`
	ExpiresIn        float64   `json:"expires_in"`
	RefreshExpiresIn float64   `json:"refresh_expires_in"`
	RefreshToken     string    `json:"refresh_token"`
	TokenType        string    `json:"token_type"`
	RequestTime      time.Time `json:"-"`
}

Jump to

Keyboard shortcuts

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