mocks

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DeviceRepo = (&DeviceRepoStruct{}).Init()

Functions

func NewMockConceptRepo

func NewMockConceptRepo(ctx context.Context) (*conceptrepo.ConceptRepo, error)

Types

type Converter

type Converter struct{}

func (Converter) Cast

func (this Converter) Cast(in interface{}, from marshaller.CharacteristicId, to marshaller.CharacteristicId) (out interface{}, err error)

func (Converter) CastWithExtension

func (this Converter) CastWithExtension(in interface{}, from v2.CharacteristicId, to v2.CharacteristicId, extensions []models.ConverterExtension) (out interface{}, err error)

type DeviceRepoStruct

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

func (*DeviceRepoStruct) GetAspectNode

func (this *DeviceRepoStruct) GetAspectNode(id string) (result model.AspectNode, err error)

func (*DeviceRepoStruct) GetDeviceType

func (this *DeviceRepoStruct) GetDeviceType(id string) (result model.DeviceType, err error, code int)

func (*DeviceRepoStruct) GetProtocol

func (this *DeviceRepoStruct) GetProtocol(id string) (model.Protocol, error)

func (*DeviceRepoStruct) GetService

func (this *DeviceRepoStruct) GetService(serviceId string) (model.Service, error)

func (*DeviceRepoStruct) GetServiceWithErrCode

func (this *DeviceRepoStruct) GetServiceWithErrCode(serviceId string) (result model.Service, err error, code int)

func (*DeviceRepoStruct) Init

func (this *DeviceRepoStruct) Init() *DeviceRepoStruct

func (*DeviceRepoStruct) SetDeviceType

func (this *DeviceRepoStruct) SetDeviceType(dt model.DeviceType) *DeviceRepoStruct

func (*DeviceRepoStruct) SetProtocol

func (this *DeviceRepoStruct) SetProtocol(protocol model.Protocol) *DeviceRepoStruct

func (*DeviceRepoStruct) SetProtocolJson

func (this *DeviceRepoStruct) SetProtocolJson(protocolStr string) *DeviceRepoStruct

func (*DeviceRepoStruct) SetService

func (this *DeviceRepoStruct) SetService(service model.Service) *DeviceRepoStruct

func (*DeviceRepoStruct) SetServiceJson

func (this *DeviceRepoStruct) SetServiceJson(serviceStr string) *DeviceRepoStruct

type MockAccess

type MockAccess struct{}

func (MockAccess) Ensure

func (m MockAccess) Ensure() (config.Impersonate, error)

Jump to

Keyboard shortcuts

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