blob: 224288b36b68b453f66dc8d54a9069a4b06b438b [file] [log] [blame]
// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// This file was auto-generated by the vanadium vdl tool.
// Source: advertisement.vdl
package testdata
import (
// VDL system imports
"v.io/v23/vdl"
// VDL user imports
"v.io/v23/discovery"
discovery_2 "v.io/x/ref/lib/discovery"
)
// AdvertisementConversionTestCase represents a test case for converting between the Vanadium Advertisement format
// and the Ble Advertisement format.
type AdvertisementConversionTestCase struct {
VAdvertisement discovery_2.Advertisement
// BleAdvertisement is a map from human readable uuid strings to the byte data.
BleAdvertisement map[string][]byte
}
func (AdvertisementConversionTestCase) __VDLReflect(struct {
Name string `vdl:"v.io/x/ref/lib/discovery/plugins/ble/testdata.AdvertisementConversionTestCase"`
}) {
}
func init() {
vdl.Register((*AdvertisementConversionTestCase)(nil))
}
// ConversionTestData contains test cases for conversions between the ble format and the v23 advertising format.
var ConversionTestData = []AdvertisementConversionTestCase{
{
VAdvertisement: discovery_2.Advertisement{
Service: discovery.Service{
InstanceUuid: []byte("\x05\x92\xeb\x19l|A\xa2\xa5\xe6\x01\xa2\xb3\x96W\x1e"),
InstanceName: "service",
InterfaceName: "v.io/x/ref",
Attrs: discovery.Attributes{
"key1": "value1",
"key2": "value2",
},
Addrs: []string{
"localhost:1000",
"example.com:540",
},
},
ServiceUuid: discovery_2.Uuid("\xde\xed\xe9d\xa2\xe9T\x17\x83\x84\xdd\f\x86\xd2D\x0e"),
EncryptionAlgorithm: 1,
EncryptionKeys: []discovery_2.EncryptionKey{
discovery_2.EncryptionKey("k"),
},
},
BleAdvertisement: map[string][]byte{
"12db9a9c-1c7c-5560-bc6b-73a115c93413": []byte("\x05\x92\xeb\x19l|A\xa2\xa5\xe6\x01\xa2\xb3\x96W\x1e"),
"4ce68e8b-173b-597e-9f93-ca453e7bb790": []byte("key1=value1"),
"6286d80a-adaa-519a-8a06-281a4645a607": []byte("\x01\x01k"),
"777f349c-d01f-5543-aa31-528e48bb53bd": []byte("key2=value2"),
"ad2566b7-59d8-50ae-8885-222f43f65fdc": []byte("\x0elocalhost:1000\x0fexample.com:540"),
"b2cadfd4-d003-576c-acad-58b8e3a9cbc8": []byte("v.io/x/ref"),
"ffbdcff3-e56f-58f0-8c1a-e416c39aac0d": []byte("service"),
},
},
}