Documentation
¶
Index ¶
- Constants
- Variables
- func EnvWithApi(ctx context.Context, wg *sync.WaitGroup, deviceTypes []devicemodel.DeviceType, ...) (managerurl string, repourl string, permv2Url string, selectionurl string, ...)
- func EnvWithDevices(ctx context.Context, wg *sync.WaitGroup, deviceTypes []devicemodel.DeviceType, ...) (kafkaUrl string, managerurl string, repourl string, permv2Url string, ...)
- func EnvWithMetadata(ctx context.Context, wg *sync.WaitGroup, deviceTypes []devicemodel.DeviceType, ...) (managerurl string, repourl string, permv2Url, selectionurl string, err error)
- func ExpandExpectedAspectIds(expected model.DeviceGroupHelperResult) model.DeviceGroupHelperResult
- func ExpandExpectedCriteriaAspectIds(expected []devicemodel.DeviceGroupFilterCriteria) []devicemodel.DeviceGroupFilterCriteria
- func ExpandExpectedDeviceTypeSelectables(selectables []devicemodel.DeviceTypeSelectable) []devicemodel.DeviceTypeSelectable
- func ExpandExpectedSelectables(selectables []model.Selectable) []model.Selectable
- func GroupHelper(selectionurl string, maintainUsability bool, deviceIds []string, ...) func(t *testing.T)
- func IsZero(x interface{}) bool
- func Jwtpost(token string, url string, msg interface{}) (resp *http.Response, err error)
- func Jwtput(token string, url string, msg interface{}) (resp *http.Response, err error)
- func SetAspect(devicemanagerUrl string, a devicemodel.Aspect) error
- func SetConcept(devicemanagerUrl string, c devicemodel.Concept) error
- func SetDevice(devicemanagerUrl string, d devicemodel.Device) error
- func SetDeviceType(devicemanagerUrl string, dt devicemodel.DeviceType) error
- func SetFunction(devicemanagerUrl string, f devicemodel.Function) error
- func TestRequest(serviceUrl string, method string, path string, body interface{}, ...) func(t *testing.T)
- func TestRequestWithToken(serviceUrl string, token string, method string, path string, body interface{}, ...) func(t *testing.T)
- type DeviceDescription
- type DeviceDescriptions
- type TestPermSearchDevice
Constants ¶
View Source
const AdminJwt = "" /* 1949-byte string literal not displayed */
View Source
const JwtSubject = "dd69ea0d-f553-4336-80f3-7f4567f85c7b"
Variables ¶
View Source
var SleepAfterEdit = 2 * time.Second
Functions ¶
func EnvWithApi ¶
func EnvWithApi(ctx context.Context, wg *sync.WaitGroup, deviceTypes []devicemodel.DeviceType, deviceInstances []devicemodel.Device) (managerurl string, repourl string, permv2Url string, selectionurl string, err error)
func EnvWithDevices ¶
func EnvWithDevices(ctx context.Context, wg *sync.WaitGroup, deviceTypes []devicemodel.DeviceType, deviceInstances []devicemodel.Device) (kafkaUrl string, managerurl string, repourl string, permv2Url string, err error)
func EnvWithMetadata ¶
func EnvWithMetadata(ctx context.Context, wg *sync.WaitGroup, deviceTypes []devicemodel.DeviceType, deviceInstances []devicemodel.Device, aspects []devicemodel.Aspect, functions []devicemodel.Function) (managerurl string, repourl string, permv2Url, selectionurl string, err error)
func ExpandExpectedAspectIds ¶
func ExpandExpectedAspectIds(expected model.DeviceGroupHelperResult) model.DeviceGroupHelperResult
ExpandExpectedAspectIds fills AspectIds from the deprecated AspectId of an expected criteria. The fixtures are written with the alias, while a criteria of a result carries the list it stands for. This is applied to the expectation only, so that a result leaving AspectIds unset still fails.
func ExpandExpectedCriteriaAspectIds ¶
func ExpandExpectedCriteriaAspectIds(expected []devicemodel.DeviceGroupFilterCriteria) []devicemodel.DeviceGroupFilterCriteria
func ExpandExpectedDeviceTypeSelectables ¶
func ExpandExpectedDeviceTypeSelectables(selectables []devicemodel.DeviceTypeSelectable) []devicemodel.DeviceTypeSelectable
ExpandExpectedDeviceTypeSelectables expands the aspect aliases of expected device-type selectables, which carry the same services and path options without a device.
func ExpandExpectedSelectables ¶
func ExpandExpectedSelectables(selectables []model.Selectable) []model.Selectable
ExpandExpectedSelectables expands the aspect aliases of expected selectables.
func GroupHelper ¶
func SetConcept ¶
func SetConcept(devicemanagerUrl string, c devicemodel.Concept) error
func SetDeviceType ¶
func SetDeviceType(devicemanagerUrl string, dt devicemodel.DeviceType) error
func SetFunction ¶
func SetFunction(devicemanagerUrl string, f devicemodel.Function) error
func TestRequest ¶
Types ¶
type DeviceDescription ¶
type DeviceDescription struct {
CharacteristicId string `json:"characteristic_id"`
Function devicemodel.Function `json:"function"`
DeviceClass *devicemodel.DeviceClass `json:"device_class,omitempty"`
Aspect *devicemodel.Aspect `json:"aspect,omitempty"`
}
type DeviceDescriptions ¶
type DeviceDescriptions []DeviceDescription
func (DeviceDescriptions) ToFilter ¶
func (this DeviceDescriptions) ToFilter() (result model.FilterCriteriaAndSet)
type TestPermSearchDevice ¶
Click to show internal directories.
Click to hide internal directories.