inject

package
v0.53.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: AGPL-3.0 Imports: 67 Imported by: 2

Documentation

Overview

Package inject provides dependency injected structures for mocking interfaces.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analog added in v0.26.0

type Analog struct {
	board.Analog
	ReadFunc func(ctx context.Context, extra map[string]interface{}) (board.AnalogValue, error)

	WriteFunc func(ctx context.Context, value int, extra map[string]interface{}) error
	// contains filtered or unexported fields
}

Analog is an injected analog pin.

func (*Analog) Read added in v0.26.0

func (a *Analog) Read(ctx context.Context, extra map[string]interface{}) (board.AnalogValue, error)

Read calls the injected Read or the real version.

func (*Analog) ReadCap added in v0.26.0

func (a *Analog) ReadCap() []interface{}

ReadCap returns the last parameters received by Read, and then clears them.

func (*Analog) Write added in v0.26.0

func (a *Analog) Write(ctx context.Context, value int, extra map[string]interface{}) error

Write calls the injected Write or the real version.

func (*Analog) WriteCap added in v0.26.0

func (a *Analog) WriteCap() []interface{}

WriteCap returns the last parameters received by Write, and then clears them.

type AppServiceClient added in v0.7.3

type AppServiceClient struct {
	apppb.AppServiceClient
	GetUserIDByEmailFunc func(ctx context.Context, in *apppb.GetUserIDByEmailRequest,
		opts ...grpc.CallOption) (*apppb.GetUserIDByEmailResponse, error)
	CreateOrganizationFunc func(ctx context.Context, in *apppb.CreateOrganizationRequest,
		opts ...grpc.CallOption) (*apppb.CreateOrganizationResponse, error)
	ListOrganizationsFunc func(ctx context.Context, in *apppb.ListOrganizationsRequest,
		opts ...grpc.CallOption) (*apppb.ListOrganizationsResponse, error)
	GetOrganizationsWithAccessToLocationFunc func(ctx context.Context, in *apppb.GetOrganizationsWithAccessToLocationRequest,
		opts ...grpc.CallOption) (*apppb.GetOrganizationsWithAccessToLocationResponse, error)
	ListOrganizationsByUserFunc func(ctx context.Context, in *apppb.ListOrganizationsByUserRequest,
		opts ...grpc.CallOption) (*apppb.ListOrganizationsByUserResponse, error)
	GetOrganizationFunc func(ctx context.Context, in *apppb.GetOrganizationRequest,
		opts ...grpc.CallOption) (*apppb.GetOrganizationResponse, error)
	GetOrganizationNamespaceAvailabilityFunc func(ctx context.Context, in *apppb.GetOrganizationNamespaceAvailabilityRequest,
		opts ...grpc.CallOption) (*apppb.GetOrganizationNamespaceAvailabilityResponse, error)
	UpdateOrganizationFunc func(ctx context.Context, in *apppb.UpdateOrganizationRequest,
		opts ...grpc.CallOption) (*apppb.UpdateOrganizationResponse, error)
	DeleteOrganizationFunc func(ctx context.Context, in *apppb.DeleteOrganizationRequest,
		opts ...grpc.CallOption) (*apppb.DeleteOrganizationResponse, error)
	ListOrganizationMembersFunc func(ctx context.Context, in *apppb.ListOrganizationMembersRequest,
		opts ...grpc.CallOption) (*apppb.ListOrganizationMembersResponse, error)
	CreateOrganizationInviteFunc func(ctx context.Context, in *apppb.CreateOrganizationInviteRequest,
		opts ...grpc.CallOption) (*apppb.CreateOrganizationInviteResponse, error)
	UpdateOrganizationInviteAuthorizationsFunc func(ctx context.Context, in *apppb.UpdateOrganizationInviteAuthorizationsRequest,
		opts ...grpc.CallOption) (*apppb.UpdateOrganizationInviteAuthorizationsResponse, error)
	DeleteOrganizationMemberFunc func(ctx context.Context, in *apppb.DeleteOrganizationMemberRequest,
		opts ...grpc.CallOption) (*apppb.DeleteOrganizationMemberResponse, error)
	DeleteOrganizationInviteFunc func(ctx context.Context, in *apppb.DeleteOrganizationInviteRequest,
		opts ...grpc.CallOption) (*apppb.DeleteOrganizationInviteResponse, error)
	ResendOrganizationInviteFunc func(ctx context.Context, in *apppb.ResendOrganizationInviteRequest,
		opts ...grpc.CallOption) (*apppb.ResendOrganizationInviteResponse, error)
	EnableBillingServiceFunc func(ctx context.Context, in *apppb.EnableBillingServiceRequest,
		opts ...grpc.CallOption) (*apppb.EnableBillingServiceResponse, error)
	DisableBillingServiceFunc func(ctx context.Context, in *apppb.DisableBillingServiceRequest,
		opts ...grpc.CallOption) (*apppb.DisableBillingServiceResponse, error)
	UpdateBillingServiceFunc func(ctx context.Context, in *apppb.UpdateBillingServiceRequest,
		opts ...grpc.CallOption) (*apppb.UpdateBillingServiceResponse, error)
	OrganizationSetSupportEmailFunc func(ctx context.Context, in *apppb.OrganizationSetSupportEmailRequest,
		opts ...grpc.CallOption) (*apppb.OrganizationSetSupportEmailResponse, error)
	OrganizationGetSupportEmailFunc func(ctx context.Context, in *apppb.OrganizationGetSupportEmailRequest,
		opts ...grpc.CallOption) (*apppb.OrganizationGetSupportEmailResponse, error)
	CreateLocationFunc func(ctx context.Context, in *apppb.CreateLocationRequest,
		opts ...grpc.CallOption) (*apppb.CreateLocationResponse, error)
	GetLocationFunc func(ctx context.Context, in *apppb.GetLocationRequest,
		opts ...grpc.CallOption) (*apppb.GetLocationResponse, error)
	UpdateLocationFunc func(ctx context.Context, in *apppb.UpdateLocationRequest,
		opts ...grpc.CallOption) (*apppb.UpdateLocationResponse, error)
	DeleteLocationFunc func(ctx context.Context, in *apppb.DeleteLocationRequest,
		opts ...grpc.CallOption) (*apppb.DeleteLocationResponse, error)
	ListLocationsFunc func(ctx context.Context, in *apppb.ListLocationsRequest,
		opts ...grpc.CallOption) (*apppb.ListLocationsResponse, error)
	ShareLocationFunc func(ctx context.Context, in *apppb.ShareLocationRequest,
		opts ...grpc.CallOption) (*apppb.ShareLocationResponse, error)
	UnshareLocationFunc func(ctx context.Context, in *apppb.UnshareLocationRequest,
		opts ...grpc.CallOption) (*apppb.UnshareLocationResponse, error)
	LocationAuthFunc func(ctx context.Context, in *apppb.LocationAuthRequest,
		opts ...grpc.CallOption) (*apppb.LocationAuthResponse, error)
	CreateLocationSecretFunc func(ctx context.Context, in *apppb.CreateLocationSecretRequest,
		opts ...grpc.CallOption) (*apppb.CreateLocationSecretResponse, error)
	DeleteLocationSecretFunc func(ctx context.Context, in *apppb.DeleteLocationSecretRequest,
		opts ...grpc.CallOption) (*apppb.DeleteLocationSecretResponse, error)
	GetRobotFunc func(ctx context.Context, in *apppb.GetRobotRequest,
		opts ...grpc.CallOption) (*apppb.GetRobotResponse, error)
	GetRoverRentalRobotsFunc func(ctx context.Context, in *apppb.GetRoverRentalRobotsRequest,
		opts ...grpc.CallOption) (*apppb.GetRoverRentalRobotsResponse, error)
	GetRobotPartsFunc func(ctx context.Context, in *apppb.GetRobotPartsRequest,
		opts ...grpc.CallOption) (*apppb.GetRobotPartsResponse, error)
	GetRobotPartFunc func(ctx context.Context, in *apppb.GetRobotPartRequest,
		opts ...grpc.CallOption) (*apppb.GetRobotPartResponse, error)
	GetRobotPartLogsFunc func(ctx context.Context, in *apppb.GetRobotPartLogsRequest,
		opts ...grpc.CallOption) (*apppb.GetRobotPartLogsResponse, error)
	TailRobotPartLogsFunc func(ctx context.Context, in *apppb.TailRobotPartLogsRequest,
		opts ...grpc.CallOption) (apppb.AppService_TailRobotPartLogsClient, error)
	GetRobotPartHistoryFunc func(ctx context.Context, in *apppb.GetRobotPartHistoryRequest,
		opts ...grpc.CallOption) (*apppb.GetRobotPartHistoryResponse, error)
	UpdateRobotPartFunc func(ctx context.Context, in *apppb.UpdateRobotPartRequest,
		opts ...grpc.CallOption) (*apppb.UpdateRobotPartResponse, error)
	NewRobotPartFunc func(ctx context.Context, in *apppb.NewRobotPartRequest,
		opts ...grpc.CallOption) (*apppb.NewRobotPartResponse, error)
	DeleteRobotPartFunc func(ctx context.Context, in *apppb.DeleteRobotPartRequest,
		opts ...grpc.CallOption) (*apppb.DeleteRobotPartResponse, error)
	GetRobotAPIKeysFunc func(ctx context.Context, in *apppb.GetRobotAPIKeysRequest,
		opts ...grpc.CallOption) (*apppb.GetRobotAPIKeysResponse, error)
	MarkPartAsMainFunc func(ctx context.Context, in *apppb.MarkPartAsMainRequest,
		opts ...grpc.CallOption) (*apppb.MarkPartAsMainResponse, error)
	MarkPartForRestartFunc func(ctx context.Context, in *apppb.MarkPartForRestartRequest,
		opts ...grpc.CallOption) (*apppb.MarkPartForRestartResponse, error)
	CreateRobotPartSecretFunc func(ctx context.Context, in *apppb.CreateRobotPartSecretRequest,
		opts ...grpc.CallOption) (*apppb.CreateRobotPartSecretResponse, error)
	DeleteRobotPartSecretFunc func(ctx context.Context, in *apppb.DeleteRobotPartSecretRequest,
		opts ...grpc.CallOption) (*apppb.DeleteRobotPartSecretResponse, error)
	ListRobotsFunc func(ctx context.Context, in *apppb.ListRobotsRequest,
		opts ...grpc.CallOption) (*apppb.ListRobotsResponse, error)
	NewRobotFunc func(ctx context.Context, in *apppb.NewRobotRequest,
		opts ...grpc.CallOption) (*apppb.NewRobotResponse, error)
	UpdateRobotFunc func(ctx context.Context, in *apppb.UpdateRobotRequest,
		opts ...grpc.CallOption) (*apppb.UpdateRobotResponse, error)
	DeleteRobotFunc func(ctx context.Context, in *apppb.DeleteRobotRequest,
		opts ...grpc.CallOption) (*apppb.DeleteRobotResponse, error)
	ListFragmentsFunc func(ctx context.Context, in *apppb.ListFragmentsRequest,
		opts ...grpc.CallOption) (*apppb.ListFragmentsResponse, error)
	GetFragmentFunc func(ctx context.Context, in *apppb.GetFragmentRequest,
		opts ...grpc.CallOption) (*apppb.GetFragmentResponse, error)
	CreateFragmentFunc func(ctx context.Context, in *apppb.CreateFragmentRequest,
		opts ...grpc.CallOption) (*apppb.CreateFragmentResponse, error)
	UpdateFragmentFunc func(ctx context.Context, in *apppb.UpdateFragmentRequest,
		opts ...grpc.CallOption) (*apppb.UpdateFragmentResponse, error)
	DeleteFragmentFunc func(ctx context.Context, in *apppb.DeleteFragmentRequest,
		opts ...grpc.CallOption) (*apppb.DeleteFragmentResponse, error)
	ListMachineFragmentsFunc func(ctx context.Context, in *apppb.ListMachineFragmentsRequest,
		opts ...grpc.CallOption) (*apppb.ListMachineFragmentsResponse, error)
	GetFragmentHistoryFunc func(ctx context.Context, in *apppb.GetFragmentHistoryRequest,
		opts ...grpc.CallOption) (*apppb.GetFragmentHistoryResponse, error)
	AddRoleFunc func(ctx context.Context, in *apppb.AddRoleRequest,
		opts ...grpc.CallOption) (*apppb.AddRoleResponse, error)
	RemoveRoleFunc func(ctx context.Context, in *apppb.RemoveRoleRequest,
		opts ...grpc.CallOption) (*apppb.RemoveRoleResponse, error)
	ChangeRoleFunc func(ctx context.Context, in *apppb.ChangeRoleRequest,
		opts ...grpc.CallOption) (*apppb.ChangeRoleResponse, error)
	ListAuthorizationsFunc func(ctx context.Context, in *apppb.ListAuthorizationsRequest,
		opts ...grpc.CallOption) (*apppb.ListAuthorizationsResponse, error)
	CheckPermissionsFunc func(ctx context.Context, in *apppb.CheckPermissionsRequest,
		opts ...grpc.CallOption) (*apppb.CheckPermissionsResponse, error)
	GetRegistryItemFunc func(ctx context.Context, in *apppb.GetRegistryItemRequest,
		opts ...grpc.CallOption) (*apppb.GetRegistryItemResponse, error)
	CreateRegistryItemFunc func(ctx context.Context, in *apppb.CreateRegistryItemRequest,
		opts ...grpc.CallOption) (*apppb.CreateRegistryItemResponse, error)
	UpdateRegistryItemFunc func(ctx context.Context, in *apppb.UpdateRegistryItemRequest,
		opts ...grpc.CallOption) (*apppb.UpdateRegistryItemResponse, error)
	ListRegistryItemsFunc func(ctx context.Context, in *apppb.ListRegistryItemsRequest,
		opts ...grpc.CallOption) (*apppb.ListRegistryItemsResponse, error)
	DeleteRegistryItemFunc func(ctx context.Context, in *apppb.DeleteRegistryItemRequest,
		opts ...grpc.CallOption) (*apppb.DeleteRegistryItemResponse, error)
	TransferRegistryItemFunc func(ctx context.Context, in *apppb.TransferRegistryItemRequest,
		opts ...grpc.CallOption) (*apppb.TransferRegistryItemResponse, error)
	CreateModuleFunc func(ctx context.Context, in *apppb.CreateModuleRequest,
		opts ...grpc.CallOption) (*apppb.CreateModuleResponse, error)
	UpdateModuleFunc func(ctx context.Context, in *apppb.UpdateModuleRequest,
		opts ...grpc.CallOption) (*apppb.UpdateModuleResponse, error)
	UploadModuleFileFunc func(ctx context.Context, opts ...grpc.CallOption) (apppb.AppService_UploadModuleFileClient, error)
	GetModuleFunc        func(ctx context.Context, in *apppb.GetModuleRequest,
		opts ...grpc.CallOption) (*apppb.GetModuleResponse, error)
	ListModulesFunc func(ctx context.Context, in *apppb.ListModulesRequest,
		opts ...grpc.CallOption) (*apppb.ListModulesResponse, error)
	CreateKeyFunc func(ctx context.Context, in *apppb.CreateKeyRequest,
		opts ...grpc.CallOption) (*apppb.CreateKeyResponse, error)
	DeleteKeyFunc func(ctx context.Context, in *apppb.DeleteKeyRequest,
		opts ...grpc.CallOption) (*apppb.DeleteKeyResponse, error)
	ListKeysFunc func(ctx context.Context, in *apppb.ListKeysRequest,
		opts ...grpc.CallOption) (*apppb.ListKeysResponse, error)
	RenameKeyFunc func(ctx context.Context, in *apppb.RenameKeyRequest,
		opts ...grpc.CallOption) (*apppb.RenameKeyResponse, error)
	RotateKeyFunc func(ctx context.Context, in *apppb.RotateKeyRequest,
		opts ...grpc.CallOption) (*apppb.RotateKeyResponse, error)
	CreateKeyFromExistingKeyAuthorizationsFunc func(ctx context.Context, in *apppb.CreateKeyFromExistingKeyAuthorizationsRequest,
		opts ...grpc.CallOption) (*apppb.CreateKeyFromExistingKeyAuthorizationsResponse, error)
}

AppServiceClient represents a fake instance of an app service client.

func (*AppServiceClient) AddRole added in v0.53.0

AddRole calls the injected AddRoleFunc or the real version.

func (*AppServiceClient) ChangeRole added in v0.53.0

ChangeRole calls the injected ChangeRoleFunc or the real version.

func (*AppServiceClient) CheckPermissions added in v0.53.0

CheckPermissions calls the injected CheckPermissionsFunc or the real version.

func (*AppServiceClient) CreateFragment added in v0.53.0

CreateFragment calls the injected CreateFragmentFunc or the real version.

func (*AppServiceClient) CreateKey added in v0.8.0

CreateKey calls the injected CreateKeyFunc or the real version.

func (*AppServiceClient) CreateKeyFromExistingKeyAuthorizations added in v0.53.0

CreateKeyFromExistingKeyAuthorizations calls the injected CreateKeyFromExistingKeyAuthorizationsFunc or the real version.

func (*AppServiceClient) CreateLocation added in v0.53.0

CreateLocation calls the injected CreateLocationFunc or the real version.

func (*AppServiceClient) CreateLocationSecret added in v0.53.0

CreateLocationSecret calls the injected CreateLocationSecretFunc or the real version.

func (*AppServiceClient) CreateModule added in v0.53.0

CreateModule calls the injected CreateModuleFunc or the real version.

func (*AppServiceClient) CreateOrganization added in v0.53.0

CreateOrganization calls the injected CreateOrganizationFunc or the real version.

func (*AppServiceClient) CreateOrganizationInvite added in v0.53.0

CreateOrganizationInvite calls the injected CreateOrganizationInviteFunc or the real version.

func (*AppServiceClient) CreateRegistryItem added in v0.53.0

CreateRegistryItem calls the injected CreateRegistryItemFunc or the real version.

func (*AppServiceClient) CreateRobotPartSecret added in v0.53.0

CreateRobotPartSecret calls the injected CreateRobotPartSecretFunc or the real version.

func (*AppServiceClient) DeleteFragment added in v0.53.0

DeleteFragment calls the injected DeleteFragmentFunc or the real version.

func (*AppServiceClient) DeleteKey added in v0.53.0

DeleteKey calls the injected DeleteKeyFunc or the real version.

func (*AppServiceClient) DeleteLocation added in v0.53.0

DeleteLocation calls the injected DeleteLocationFunc or the real version.

func (*AppServiceClient) DeleteLocationSecret added in v0.53.0

DeleteLocationSecret calls the injected DeleteLocationSecretFunc or the real version.

func (*AppServiceClient) DeleteOrganization added in v0.53.0

DeleteOrganization calls the injected DeleteOrganizationFunc or the real version.

func (*AppServiceClient) DeleteOrganizationInvite added in v0.53.0

DeleteOrganizationInvite calls the injected DeleteOrganizationInviteFunc or the real version.

func (*AppServiceClient) DeleteOrganizationMember added in v0.53.0

DeleteOrganizationMember calls the injected DeleteOrganizationMemberFunc or the real version.

func (*AppServiceClient) DeleteRegistryItem added in v0.53.0

DeleteRegistryItem calls the injected DeleteRegistryItemFunc or the real version.

func (*AppServiceClient) DeleteRobot added in v0.53.0

DeleteRobot calls the injected DeleteRobotFunc or the real version.

func (*AppServiceClient) DeleteRobotPart added in v0.53.0

DeleteRobotPart calls the injected DeleteRobotPartFunc or the real version.

func (*AppServiceClient) DeleteRobotPartSecret added in v0.53.0

DeleteRobotPartSecret calls the injected DeleteRobotPartSecretFunc or the real version.

func (*AppServiceClient) DisableBillingService added in v0.53.0

DisableBillingService calls the injected DisableBillingServiceFunc or the real version.

func (*AppServiceClient) EnableBillingService added in v0.53.0

EnableBillingService calls the injected EnableBillingServiceFunc or the real version.

func (*AppServiceClient) GetFragment added in v0.53.0

GetFragment calls the injected GetFragmentFunc or the real version.

func (*AppServiceClient) GetFragmentHistory added in v0.53.0

GetFragmentHistory calls the injected GetFragmentHistoryFunc or the real version.

func (*AppServiceClient) GetLocation added in v0.53.0

GetLocation calls the injected GetLocationFunc or the real version.

func (*AppServiceClient) GetModule added in v0.53.0

GetModule calls the injected GetModuleFunc or the real version.

func (*AppServiceClient) GetOrganization added in v0.53.0

GetOrganization calls the injected GetOrganizationFunc or the real version.

func (*AppServiceClient) GetOrganizationNamespaceAvailability added in v0.53.0

GetOrganizationNamespaceAvailability calls the injected GetOrganizationNamespaceAvailabilityFunc or the real version.

func (*AppServiceClient) GetOrganizationsWithAccessToLocation added in v0.53.0

GetOrganizationsWithAccessToLocation calls the injected GetOrganizationsWithAccessToLocationFunc or the real version.

func (*AppServiceClient) GetRegistryItem added in v0.53.0

GetRegistryItem calls the injected GetRegistryItemFunc or the real version.

func (*AppServiceClient) GetRobot added in v0.53.0

GetRobot calls the injected GetRobotFunc or the real version.

func (*AppServiceClient) GetRobotAPIKeys added in v0.26.0

GetRobotAPIKeys calls the injected GetRobotAPIKeysFunc or the real version.

func (*AppServiceClient) GetRobotPart added in v0.26.0

GetRobotPart calls the injected GetRobotPartFunc or the real version.

func (*AppServiceClient) GetRobotPartHistory added in v0.53.0

GetRobotPartHistory calls the injected GetRobotPartHistoryFunc or the real version.

func (*AppServiceClient) GetRobotPartLogs added in v0.25.0

GetRobotPartLogs calls the injected GetRobotPartLogsFunc or the real version.

func (*AppServiceClient) GetRobotParts added in v0.25.0

GetRobotParts calls the injected GetRobotPartsFunc or the real version.

func (*AppServiceClient) GetRoverRentalRobots added in v0.53.0

GetRoverRentalRobots calls the injected GetRoverRentalRobotsFunc or the real version.

func (*AppServiceClient) GetUserIDByEmail added in v0.53.0

GetUserIDByEmail calls the injected GetUserIDByEmailFunc or the real version.

func (*AppServiceClient) ListAuthorizations added in v0.53.0

ListAuthorizations calls the injected ListAuthorizationsFunc or the real version.

func (*AppServiceClient) ListFragments added in v0.53.0

ListFragments calls the injected ListFragmentsFunc or the real version.

func (*AppServiceClient) ListKeys added in v0.53.0

ListKeys calls the injected ListKeysFunc or the real version.

func (*AppServiceClient) ListLocations added in v0.25.0

ListLocations calls the injected ListLocationsFunc or the real version.

func (*AppServiceClient) ListMachineFragments added in v0.53.0

ListMachineFragments calls the injected ListMachineFragmentsFunc or the real version.

func (*AppServiceClient) ListModules added in v0.53.0

ListModules calls the injected ListModulesFunc or the real version.

func (*AppServiceClient) ListOrganizationMembers added in v0.53.0

ListOrganizationMembers calls the injected ListOrganizationMembersFunc or the real version.

func (*AppServiceClient) ListOrganizations added in v0.7.3

ListOrganizations calls the injected ListOrganizationsFunc or the real version.

func (*AppServiceClient) ListOrganizationsByUser added in v0.53.0

ListOrganizationsByUser calls the injected ListOrganizationsByUserFunc or the real version.

func (*AppServiceClient) ListRegistryItems added in v0.53.0

ListRegistryItems calls the injected ListRegistryItemsFunc or the real version.

func (*AppServiceClient) ListRobots added in v0.25.0

ListRobots calls the injected ListRobotsFunc or the real version.

func (*AppServiceClient) LocationAuth added in v0.53.0

LocationAuth calls the injected LocationAuthFunc or the real version.

func (*AppServiceClient) MarkPartAsMain added in v0.53.0

MarkPartAsMain calls the injected MarkPartAsMainFunc or the real version.

func (*AppServiceClient) MarkPartForRestart added in v0.53.0

MarkPartForRestart calls the injected MarkPartForRestartFunc or the real version.

func (*AppServiceClient) NewRobot added in v0.53.0

NewRobot calls the injected NewRobotFunc or the real version.

func (*AppServiceClient) NewRobotPart added in v0.53.0

NewRobotPart calls the injected NewRobotPartFunc or the real version.

func (*AppServiceClient) OrganizationGetSupportEmail added in v0.53.0

OrganizationGetSupportEmail calls the injected OrganizationGetSupportEmailFunc or the real version.

func (*AppServiceClient) OrganizationSetSupportEmail added in v0.53.0

OrganizationSetSupportEmail calls the injected OrganizationSetSupportEmailFunc or the real version.

func (*AppServiceClient) RemoveRole added in v0.53.0

RemoveRole calls the injected RemoveRoleFunc or the real version.

func (*AppServiceClient) RenameKey added in v0.53.0

RenameKey calls the injected RenameKeyFunc or the real version.

func (*AppServiceClient) ResendOrganizationInvite added in v0.53.0

ResendOrganizationInvite calls the injected ResendOrganizationInviteFunc or the real version.

func (*AppServiceClient) RotateKey added in v0.53.0

RotateKey calls the injected RotateKeyFunc or the real version.

func (*AppServiceClient) ShareLocation added in v0.53.0

ShareLocation calls the injected ShareLocationFunc or the real version.

func (*AppServiceClient) TailRobotPartLogs added in v0.53.0

TailRobotPartLogs calls the injected TailRobotPartLogsFunc or the real version.

func (*AppServiceClient) TransferRegistryItem added in v0.53.0

TransferRegistryItem calls the injected TransferRegistryItemFunc or the real version.

func (*AppServiceClient) UnshareLocation added in v0.53.0

UnshareLocation calls the injected UnshareLocationFunc or the real version.

func (*AppServiceClient) UpdateBillingService added in v0.53.0

UpdateBillingService calls the injected UpdateBillingServiceFunc or the real version.

func (*AppServiceClient) UpdateFragment added in v0.53.0

UpdateFragment calls the injected UpdateFragmentFunc or the real version.

func (*AppServiceClient) UpdateLocation added in v0.53.0

UpdateLocation calls the injected UpdateLocationFunc or the real version.

func (*AppServiceClient) UpdateModule added in v0.53.0

UpdateModule calls the injected UpdateModuleFunc or the real version.

func (*AppServiceClient) UpdateOrganization added in v0.53.0

UpdateOrganization calls the injected UpdateOrganizationFunc or the real version.

func (*AppServiceClient) UpdateOrganizationInviteAuthorizations added in v0.53.0

UpdateOrganizationInviteAuthorizations calls the injected UpdateOrganizationInviteAuthorizationsFunc or the real version.

func (*AppServiceClient) UpdateRegistryItem added in v0.53.0

UpdateRegistryItem calls the injected UpdateRegistryItemFunc or the real version.

func (*AppServiceClient) UpdateRobot added in v0.53.0

UpdateRobot calls the injected UpdateRobotFunc or the real version.

func (*AppServiceClient) UpdateRobotPart added in v0.26.0

UpdateRobotPart calls the injected UpdateRobotPartFunc or the real version.

func (*AppServiceClient) UploadModuleFile added in v0.53.0

func (asc *AppServiceClient) UploadModuleFile(
	ctx context.Context, opts ...grpc.CallOption,
) (apppb.AppService_UploadModuleFileClient, error)

UploadModuleFile calls the injected UploadModuleFileFunc or the real version.

type AppServiceTailRobotPartLogsClient added in v0.53.0

type AppServiceTailRobotPartLogsClient struct {
	apppb.AppService_TailRobotPartLogsClient
	RecvFunc func() (*apppb.TailRobotPartLogsResponse, error)
}

AppServiceTailRobotPartLogsClient represents a fake instance of a proto AppService_TailRobotPartLogsClient.

func (*AppServiceTailRobotPartLogsClient) Recv added in v0.53.0

Recv calls the injected RecvFunc or the real version.

type AppServiceUploadModuleFileClient added in v0.53.0

type AppServiceUploadModuleFileClient struct {
	apppb.AppService_UploadModuleFileClient
	SendFunc         func(*apppb.UploadModuleFileRequest) error
	CloseAndRecvFunc func() (*apppb.UploadModuleFileResponse, error)
}

AppServiceUploadModuleFileClient represents a fake instance of a proto AppService_UploadModuleFileClient.

func (*AppServiceUploadModuleFileClient) CloseAndRecv added in v0.53.0

CloseAndRecv calls the injected CloseAndRecvFunc or the real version.

func (*AppServiceUploadModuleFileClient) Send added in v0.53.0

Send calls the injected SendFunc or the real version.

type Arm

type Arm struct {
	arm.Arm

	DoFunc                        func(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)
	EndPositionFunc               func(ctx context.Context, extra map[string]interface{}) (spatialmath.Pose, error)
	MoveToPositionFunc            func(ctx context.Context, to spatialmath.Pose, extra map[string]interface{}) error
	MoveToJointPositionsFunc      func(ctx context.Context, positions []referenceframe.Input, extra map[string]interface{}) error
	MoveThroughJointPositionsFunc func(
		ctx context.Context,
		positions [][]referenceframe.Input,
		options *arm.MoveOptions,
		extra map[string]interface{},
	) error
	JointPositionsFunc func(ctx context.Context, extra map[string]interface{}) ([]referenceframe.Input, error)
	StopFunc           func(ctx context.Context, extra map[string]interface{}) error
	IsMovingFunc       func(context.Context) (bool, error)
	CloseFunc          func(ctx context.Context) error
	ModelFrameFunc     func() referenceframe.Model
	CurrentInputsFunc  func(ctx context.Context) ([]referenceframe.Input, error)
	GoToInputsFunc     func(ctx context.Context, inputSteps ...[]referenceframe.Input) error
	GeometriesFunc     func(ctx context.Context) ([]spatialmath.Geometry, error)
	// contains filtered or unexported fields
}

Arm is an injected arm.

func NewArm added in v0.2.36

func NewArm(name string) *Arm

NewArm returns a new injected arm.

func (*Arm) Close

func (a *Arm) Close(ctx context.Context) error

Close calls the injected Close or the real version.

func (*Arm) CurrentInputs added in v0.7.3

func (a *Arm) CurrentInputs(ctx context.Context) ([]referenceframe.Input, error)

CurrentInputs calls the injected CurrentInputs or the real version.

func (*Arm) DoCommand added in v0.1.0

func (a *Arm) DoCommand(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)

DoCommand calls the injected DoCommand or the real version.

func (*Arm) EndPosition added in v0.1.0

func (a *Arm) EndPosition(ctx context.Context, extra map[string]interface{}) (spatialmath.Pose, error)

EndPosition calls the injected EndPosition or the real version.

func (*Arm) Geometries added in v0.27.0

func (a *Arm) Geometries(ctx context.Context, extra map[string]interface{}) ([]spatialmath.Geometry, error)

Geometries returns the gripper's geometries.

func (*Arm) GoToInputs added in v0.7.3

func (a *Arm) GoToInputs(ctx context.Context, inputSteps ...[]referenceframe.Input) error

GoToInputs calls the injected GoToInputs or the real version.

func (*Arm) IsMoving

func (a *Arm) IsMoving(ctx context.Context) (bool, error)

IsMoving calls the injected IsMoving or the real version.

func (*Arm) JointPositions added in v0.1.0

func (a *Arm) JointPositions(ctx context.Context, extra map[string]interface{}) ([]referenceframe.Input, error)

JointPositions calls the injected JointPositions or the real version.

func (*Arm) ModelFrame added in v0.2.15

func (a *Arm) ModelFrame() referenceframe.Model

ModelFrame calls the injected ModelFrame or the real version.

func (*Arm) MoveThroughJointPositions added in v0.50.0

func (a *Arm) MoveThroughJointPositions(
	ctx context.Context,
	positions [][]referenceframe.Input,
	options *arm.MoveOptions,
	extra map[string]interface{},
) error

MoveThroughJointPositions calls the injected MoveThroughJointPositions or the real version.

func (*Arm) MoveToJointPositions

func (a *Arm) MoveToJointPositions(ctx context.Context, positions []referenceframe.Input, extra map[string]interface{}) error

MoveToJointPositions calls the injected MoveToJointPositions or the real version.

func (*Arm) MoveToPosition

func (a *Arm) MoveToPosition(ctx context.Context, to spatialmath.Pose, extra map[string]interface{}) error

MoveToPosition calls the injected MoveToPosition or the real version.

func (*Arm) Name added in v0.2.36

func (a *Arm) Name() resource.Name

Name returns the name of the resource.

func (*Arm) Stop

func (a *Arm) Stop(ctx context.Context, extra map[string]interface{}) error

Stop calls the injected Stop or the real version.

type AudioInput added in v0.0.8

type AudioInput struct {
	audioinput.AudioInput

	DoFunc     func(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)
	StreamFunc func(
		ctx context.Context,
		errHandlers ...gostream.ErrorHandler,
	) (gostream.AudioStream, error)
	MediaPropertiesFunc func(ctx context.Context) (prop.Audio, error)
	CloseFunc           func(ctx context.Context) error
	// contains filtered or unexported fields
}

AudioInput is an injected audio input.

func NewAudioInput added in v0.2.36

func NewAudioInput(name string) *AudioInput

NewAudioInput returns a new injected audio input.

func (*AudioInput) Close added in v0.0.8

func (ai *AudioInput) Close(ctx context.Context) error

Close calls the injected Close or the real version.

func (*AudioInput) DoCommand added in v0.1.0

func (ai *AudioInput) DoCommand(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)

DoCommand calls the injected DoCommand or the real version.

func (*AudioInput) MediaProperties added in v0.0.8

func (ai *AudioInput) MediaProperties(ctx context.Context) (prop.Audio, error)

MediaProperties calls the injected MediaProperties or the real version.

func (*AudioInput) Name added in v0.2.36

func (ai *AudioInput) Name() resource.Name

Name returns the name of the resource.

func (*AudioInput) Stream added in v0.0.8

func (ai *AudioInput) Stream(
	ctx context.Context,
	errHandlers ...gostream.ErrorHandler,
) (gostream.AudioStream, error)

Stream calls the injected Stream or the real version.

type Base

type Base struct {
	base.Base

	DoFunc           func(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)
	MoveStraightFunc func(ctx context.Context, distanceMm int, mmPerSec float64, extra map[string]interface{}) error
	SpinFunc         func(ctx context.Context, angleDeg, degsPerSec float64, extra map[string]interface{}) error
	StopFunc         func(ctx context.Context, extra map[string]interface{}) error
	IsMovingFunc     func(context.Context) (bool, error)
	CloseFunc        func(ctx context.Context) error
	SetPowerFunc     func(ctx context.Context, linear, angular r3.Vector, extra map[string]interface{}) error
	SetVelocityFunc  func(ctx context.Context, linear, angular r3.Vector, extra map[string]interface{}) error
	PropertiesFunc   func(ctx context.Context, extra map[string]interface{}) (base.Properties, error)
	GeometriesFunc   func(ctx context.Context) ([]spatialmath.Geometry, error)
	// contains filtered or unexported fields
}

Base is an injected base.

func NewBase added in v0.2.36

func NewBase(name string) *Base

NewBase returns a new injected base.

func (*Base) Close

func (b *Base) Close(ctx context.Context) error

Close calls the injected Close or the real version.

func (*Base) DoCommand added in v0.1.0

func (b *Base) DoCommand(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)

DoCommand calls the injected DoCommand or the real version.

func (*Base) Geometries added in v0.3.0

func (b *Base) Geometries(ctx context.Context, extra map[string]interface{}) ([]spatialmath.Geometry, error)

Geometries returns the base's geometries.

func (*Base) IsMoving

func (b *Base) IsMoving(ctx context.Context) (bool, error)

IsMoving calls the injected IsMoving or the real version.

func (*Base) MoveStraight

func (b *Base) MoveStraight(ctx context.Context, distanceMm int, mmPerSec float64, extra map[string]interface{}) error

MoveStraight calls the injected MoveStraight or the real version.

func (*Base) Name added in v0.2.36

func (b *Base) Name() resource.Name

Name returns the name of the resource.

func (*Base) Properties added in v0.2.50

func (b *Base) Properties(ctx context.Context, extra map[string]interface{}) (base.Properties, error)

Properties returns the base's properties.

func (*Base) SetPower added in v0.2.5

func (b *Base) SetPower(ctx context.Context, linear, angular r3.Vector, extra map[string]interface{}) error

SetPower calls the injected SetPower or the real version.

func (*Base) SetVelocity added in v0.3.0

func (b *Base) SetVelocity(ctx context.Context, linear, angular r3.Vector, extra map[string]interface{}) error

SetVelocity calls the injected SetVelocity or the real version.

func (*Base) Spin

func (b *Base) Spin(ctx context.Context, angleDeg, degsPerSec float64, extra map[string]interface{}) error

Spin calls the injected Spin or the real version.

func (*Base) Stop

func (b *Base) Stop(ctx context.Context, extra map[string]interface{}) error

Stop calls the injected Stop or the real version.

type BillingServiceClient added in v0.53.0

BillingServiceClient represents a fake instance of a billing service client.

func (*BillingServiceClient) GetCurrentMonthUsage added in v0.53.0

GetCurrentMonthUsage calls the injected GetCurrentMonthUsageFunc or the real version.

func (*BillingServiceClient) GetInvoicePdf added in v0.53.0

GetInvoicePdf calls the injected GetInvoicePdfFunc or the real version.

func (*BillingServiceClient) GetInvoicesSummary added in v0.53.0

GetInvoicesSummary calls the injected GetInvoicesSummaryFunc or the real version.

func (*BillingServiceClient) GetOrgBillingInformation added in v0.53.0

GetOrgBillingInformation calls the injected GetOrgBillingInformationFunc or the real version.

func (*BillingServiceClient) SendPaymentRequiredEmail added in v0.53.0

SendPaymentRequiredEmail calls the injected SendPaymentRequiredEmailFunc or the real version.

type BillingServiceGetInvoicePdfClient added in v0.53.0

type BillingServiceGetInvoicePdfClient struct {
	billingpb.BillingService_GetInvoicePdfClient
	RecvFunc func() (*billingpb.GetInvoicePdfResponse, error)
}

BillingServiceGetInvoicePdfClient represents a fake instance of a proto BillingService_GetInvoicePdfClient.

func (*BillingServiceGetInvoicePdfClient) Recv added in v0.53.0

Recv calls the injected RecvFunc or the real version.

type Board

type Board struct {
	board.Board

	DoFunc           func(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)
	AnalogByNameFunc func(name string) (board.Analog, error)

	DigitalInterruptByNameFunc func(name string) (board.DigitalInterrupt, error)

	GPIOPinByNameFunc func(name string) (board.GPIOPin, error)

	AnalogNamesFunc           func() []string
	DigitalInterruptNamesFunc func() []string
	CloseFunc                 func(ctx context.Context) error
	SetPowerModeFunc          func(ctx context.Context, mode boardpb.PowerMode, duration *time.Duration) error
	StreamTicksFunc           func(ctx context.Context,
		interrupts []board.DigitalInterrupt, ch chan board.Tick, extra map[string]interface{}) error
	// contains filtered or unexported fields
}

Board is an injected board.

func NewBoard added in v0.2.36

func NewBoard(name string) *Board

NewBoard returns a new injected board.

func (*Board) AnalogByName added in v0.26.0

func (b *Board) AnalogByName(name string) (board.Analog, error)

AnalogByName calls the injected AnalogByName or the real version.

func (*Board) AnalogByNameCap added in v0.26.0

func (b *Board) AnalogByNameCap() []interface{}

AnalogByNameCap returns the last parameters received by AnalogByName, and then clears them.

func (*Board) AnalogNames added in v0.26.0

func (b *Board) AnalogNames() []string

AnalogNames calls the injected AnalogNames or the real version.

func (*Board) Close

func (b *Board) Close(ctx context.Context) error

Close calls the injected Close or the real version.

func (*Board) DigitalInterruptByName

func (b *Board) DigitalInterruptByName(name string) (board.DigitalInterrupt, error)

DigitalInterruptByName calls the injected DigitalInterruptByName or the real version.

func (*Board) DigitalInterruptByNameCap

func (b *Board) DigitalInterruptByNameCap() []interface{}

DigitalInterruptByNameCap returns the last parameters received by DigitalInterruptByName, and then clears them.

func (*Board) DigitalInterruptNames

func (b *Board) DigitalInterruptNames() []string

DigitalInterruptNames calls the injected DigitalInterruptNames or the real version.

func (*Board) DoCommand added in v0.1.0

func (b *Board) DoCommand(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)

DoCommand calls the injected DoCommand or the real version.

func (*Board) GPIOPinByName

func (b *Board) GPIOPinByName(name string) (board.GPIOPin, error)

GPIOPinByName calls the injected GPIOPinByName or the real version.

func (*Board) GPIOPinByNameCap

func (b *Board) GPIOPinByNameCap() []interface{}

GPIOPinByNameCap returns the last parameters received by GPIOPinByName, and then clears them.

func (*Board) Name added in v0.2.36

func (b *Board) Name() resource.Name

Name returns the name of the resource.

func (*Board) SetPowerMode added in v0.2.28

func (b *Board) SetPowerMode(ctx context.Context, mode boardpb.PowerMode, duration *time.Duration) error

SetPowerMode sets the board to the given power mode. If provided, the board will exit the given power mode after the specified duration.

func (*Board) StreamTicks added in v0.24.0

func (b *Board) StreamTicks(ctx context.Context,
	interrupts []board.DigitalInterrupt, ch chan board.Tick, extra map[string]interface{},
) error

StreamTicks calls the injected StreamTicks or the real version.

type BuildServiceClient added in v0.17.0

type BuildServiceClient struct {
	buildpb.BuildServiceClient
	ListJobsFunc   func(ctx context.Context, in *buildpb.ListJobsRequest, opts ...grpc.CallOption) (*buildpb.ListJobsResponse, error)
	StartBuildFunc func(ctx context.Context, in *buildpb.StartBuildRequest, opts ...grpc.CallOption) (*buildpb.StartBuildResponse, error)
}

BuildServiceClient is an injectable buildpb.BuildServiceClient.

func (*BuildServiceClient) ListJobs added in v0.17.0

ListJobs calls the injected ListJobsFunc or the real version.

func (*BuildServiceClient) StartBuild added in v0.17.0

StartBuild calls the injected StartBuildFunc or the real version.

type Camera

type Camera struct {
	camera.Camera

	RTPPassthroughSource rtppassthrough.Source
	DoFunc               func(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)
	ImagesFunc           func(ctx context.Context) ([]camera.NamedImage, resource.ResponseMetadata, error)
	StreamFunc           func(
		ctx context.Context,
		errHandlers ...gostream.ErrorHandler,
	) (gostream.VideoStream, error)
	NextPointCloudFunc func(ctx context.Context) (pointcloud.PointCloud, error)
	ProjectorFunc      func(ctx context.Context) (transform.Projector, error)
	PropertiesFunc     func(ctx context.Context) (camera.Properties, error)
	CloseFunc          func(ctx context.Context) error
	// contains filtered or unexported fields
}

Camera is an injected camera.

func NewCamera added in v0.2.36

func NewCamera(name string) *Camera

NewCamera returns a new injected camera.

func (*Camera) Close

func (c *Camera) Close(ctx context.Context) error

Close calls the injected Close or the real version.

func (*Camera) DoCommand added in v0.1.0

func (c *Camera) DoCommand(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)

DoCommand calls the injected DoCommand or the real version.

func (*Camera) Images added in v0.5.0

Images calls the injected Images or the real version.

func (*Camera) Name added in v0.2.36

func (c *Camera) Name() resource.Name

Name returns the name of the resource.

func (*Camera) NextPointCloud

func (c *Camera) NextPointCloud(ctx context.Context) (pointcloud.PointCloud, error)

NextPointCloud calls the injected NextPointCloud or the real version.

func (*Camera) Properties added in v0.1.0

func (c *Camera) Properties(ctx context.Context) (camera.Properties, error)

Properties calls the injected Properties or the real version.

func (*Camera) Stream added in v0.0.8

func (c *Camera) Stream(
	ctx context.Context,
	errHandlers ...gostream.ErrorHandler,
) (gostream.VideoStream, error)

Stream calls the injected Stream or the real version.

func (*Camera) SubscribeRTP added in v0.25.0

func (c *Camera) SubscribeRTP(
	ctx context.Context,
	bufferSize int,
	packetsCB rtppassthrough.PacketCallback,
) (rtppassthrough.Subscription, error)

SubscribeRTP calls the injected RTPPassthroughSource or returns an error if unimplemented.

func (*Camera) Unsubscribe added in v0.25.0

func (c *Camera) Unsubscribe(ctx context.Context, id rtppassthrough.SubscriptionID) error

Unsubscribe calls the injected RTPPassthroughSource or returns an error if unimplemented.

type DataManagerService

type DataManagerService struct {
	datamanager.Service

	SyncFunc      func(ctx context.Context, extra map[string]interface{}) error
	DoCommandFunc func(ctx context.Context,
		cmd map[string]interface{}) (map[string]interface{}, error)
	CloseFunc func(ctx context.Context) error
	// contains filtered or unexported fields
}

DataManagerService represents a fake instance of an data manager service.

func NewDataManagerService added in v0.2.36

func NewDataManagerService(name string) *DataManagerService

NewDataManagerService returns a new injected data manager service.

func (*DataManagerService) Close added in v0.2.36

func (svc *DataManagerService) Close(ctx context.Context) error

Close calls the injected Close or the real version.

func (*DataManagerService) DoCommand added in v0.2.20

func (svc *DataManagerService) DoCommand(ctx context.Context,
	cmd map[string]interface{},
) (map[string]interface{}, error)

DoCommand calls the injected DoCommand or the real variant.

func (*DataManagerService) Name added in v0.2.36

func (svc *DataManagerService) Name() resource.Name

Name returns the name of the resource.

func (*DataManagerService) Sync

func (svc *DataManagerService) Sync(ctx context.Context, extra map[string]interface{}) error

Sync calls the injected Sync or the real variant.

type DataServiceClient added in v0.8.0

type DataServiceClient struct {
	datapb.DataServiceClient
	TabularDataByFilterFunc func(ctx context.Context, in *datapb.TabularDataByFilterRequest,
		opts ...grpc.CallOption) (*datapb.TabularDataByFilterResponse, error)
	TabularDataBySQLFunc func(ctx context.Context, in *datapb.TabularDataBySQLRequest,
		opts ...grpc.CallOption) (*datapb.TabularDataBySQLResponse, error)
	TabularDataByMQLFunc func(ctx context.Context, in *datapb.TabularDataByMQLRequest,
		opts ...grpc.CallOption) (*datapb.TabularDataByMQLResponse, error)
	BinaryDataByFilterFunc func(ctx context.Context, in *datapb.BinaryDataByFilterRequest,
		opts ...grpc.CallOption) (*datapb.BinaryDataByFilterResponse, error)
	BinaryDataByIDsFunc func(ctx context.Context, in *datapb.BinaryDataByIDsRequest,
		opts ...grpc.CallOption) (*datapb.BinaryDataByIDsResponse, error)
	DeleteTabularDataFunc func(ctx context.Context, in *datapb.DeleteTabularDataRequest,
		opts ...grpc.CallOption) (*datapb.DeleteTabularDataResponse, error)
	DeleteBinaryDataByFilterFunc func(ctx context.Context, in *datapb.DeleteBinaryDataByFilterRequest,
		opts ...grpc.CallOption) (*datapb.DeleteBinaryDataByFilterResponse, error)
	DeleteBinaryDataByIDsFunc func(ctx context.Context, in *datapb.DeleteBinaryDataByIDsRequest,
		opts ...grpc.CallOption) (*datapb.DeleteBinaryDataByIDsResponse, error)
	AddTagsToBinaryDataByIDsFunc func(ctx context.Context, in *datapb.AddTagsToBinaryDataByIDsRequest,
		opts ...grpc.CallOption) (*datapb.AddTagsToBinaryDataByIDsResponse, error)
	AddTagsToBinaryDataByFilterFunc func(ctx context.Context, in *datapb.AddTagsToBinaryDataByFilterRequest,
		opts ...grpc.CallOption) (*datapb.AddTagsToBinaryDataByFilterResponse, error)
	RemoveTagsFromBinaryDataByIDsFunc func(ctx context.Context, in *datapb.RemoveTagsFromBinaryDataByIDsRequest,
		opts ...grpc.CallOption) (*datapb.RemoveTagsFromBinaryDataByIDsResponse, error)
	RemoveTagsFromBinaryDataByFilterFunc func(ctx context.Context, in *datapb.RemoveTagsFromBinaryDataByFilterRequest,
		opts ...grpc.CallOption) (*datapb.RemoveTagsFromBinaryDataByFilterResponse, error)
	TagsByFilterFunc func(ctx context.Context, in *datapb.TagsByFilterRequest,
		opts ...grpc.CallOption) (*datapb.TagsByFilterResponse, error)
	AddBoundingBoxToImageByIDFunc func(ctx context.Context, in *datapb.AddBoundingBoxToImageByIDRequest,
		opts ...grpc.CallOption) (*datapb.AddBoundingBoxToImageByIDResponse, error)
	RemoveBoundingBoxFromImageByIDFunc func(ctx context.Context, in *datapb.RemoveBoundingBoxFromImageByIDRequest,
		opts ...grpc.CallOption) (*datapb.RemoveBoundingBoxFromImageByIDResponse, error)
	BoundingBoxLabelsByFilterFunc func(ctx context.Context, in *datapb.BoundingBoxLabelsByFilterRequest,
		opts ...grpc.CallOption) (*datapb.BoundingBoxLabelsByFilterResponse, error)
	UpdateBoundingBoxFunc func(ctx context.Context, in *datapb.UpdateBoundingBoxRequest,
		opts ...grpc.CallOption) (*datapb.UpdateBoundingBoxResponse, error)
	GetDatabaseConnectionFunc func(ctx context.Context, in *datapb.GetDatabaseConnectionRequest,
		opts ...grpc.CallOption) (*datapb.GetDatabaseConnectionResponse, error)
	ConfigureDatabaseUserFunc func(ctx context.Context, in *datapb.ConfigureDatabaseUserRequest,
		opts ...grpc.CallOption) (*datapb.ConfigureDatabaseUserResponse, error)
	AddBinaryDataToDatasetByIDsFunc func(ctx context.Context, in *datapb.AddBinaryDataToDatasetByIDsRequest,
		opts ...grpc.CallOption) (*datapb.AddBinaryDataToDatasetByIDsResponse, error)
	RemoveBinaryDataFromDatasetByIDsFunc func(ctx context.Context, in *datapb.RemoveBinaryDataFromDatasetByIDsRequest,
		opts ...grpc.CallOption) (*datapb.RemoveBinaryDataFromDatasetByIDsResponse, error)
}

DataServiceClient represents a fake instance of a data service client.

func (*DataServiceClient) AddBinaryDataToDatasetByIDs added in v0.52.0

AddBinaryDataToDatasetByIDs calls the injected AddBinaryDataToDatasetByIDs or the real version.

func (*DataServiceClient) AddBoundingBoxToImageByID added in v0.52.0

AddBoundingBoxToImageByID calls the injected AddBoundingBoxToImageByID or the real version.

func (*DataServiceClient) AddTagsToBinaryDataByFilter added in v0.52.0

AddTagsToBinaryDataByFilter calls the injected AddTagsToBinaryDataByFilter or the real version.

func (*DataServiceClient) AddTagsToBinaryDataByIDs added in v0.52.0

AddTagsToBinaryDataByIDs calls the injected AddTagsToBinaryDataByIDs or the real version.

func (*DataServiceClient) BinaryDataByFilter added in v0.52.0

BinaryDataByFilter calls the injected BinaryDataByFilter or the real version.

func (*DataServiceClient) BinaryDataByIDs added in v0.52.0

BinaryDataByIDs calls the injected BinaryDataByIDs or the real version.

func (*DataServiceClient) BoundingBoxLabelsByFilter added in v0.52.0

BoundingBoxLabelsByFilter calls the injected BoundingBoxLabelsByFilter or the real version.

func (*DataServiceClient) ConfigureDatabaseUser added in v0.52.0

ConfigureDatabaseUser calls the injected ConfigureDatabaseUser or the real version.

func (*DataServiceClient) DeleteBinaryDataByFilter added in v0.52.0

DeleteBinaryDataByFilter calls the injected DeleteBinaryDataByFilter or the real version.

func (*DataServiceClient) DeleteBinaryDataByIDs added in v0.52.0

DeleteBinaryDataByIDs calls the injected DeleteBinaryDataByIDs or the real version.

func (*DataServiceClient) DeleteTabularData added in v0.52.0

DeleteTabularData calls the injected DeleteTabularData or the real version.

func (*DataServiceClient) GetDatabaseConnection added in v0.52.0

GetDatabaseConnection calls the injected GetDatabaseConnection or the real version.

func (*DataServiceClient) RemoveBinaryDataFromDatasetByIDs added in v0.52.0

RemoveBinaryDataFromDatasetByIDs calls the injected RemoveBinaryDataFromDatasetByIDs or the real version.

func (*DataServiceClient) RemoveBoundingBoxFromImageByID added in v0.52.0

RemoveBoundingBoxFromImageByID calls the injected RemoveBoundingBoxFromImageByID or the real version.

func (*DataServiceClient) RemoveTagsFromBinaryDataByFilter added in v0.52.0

RemoveTagsFromBinaryDataByFilter calls the injected RemoveTagsFromBinaryDataByFilter or the real version.

func (*DataServiceClient) RemoveTagsFromBinaryDataByIDs added in v0.52.0

RemoveTagsFromBinaryDataByIDs calls the injected RemoveTagsFromBinaryDataByIDs or the real version.

func (*DataServiceClient) TabularDataByFilter added in v0.8.0

TabularDataByFilter calls the injected TabularDataByFilter or the real version.

func (*DataServiceClient) TabularDataByMQL added in v0.52.0

TabularDataByMQL calls the injected TabularDataByMQL or the real version.

func (*DataServiceClient) TabularDataBySQL added in v0.52.0

TabularDataBySQL calls the injected TabularDataBySQL or the real version.

func (*DataServiceClient) TagsByFilter added in v0.52.0

TagsByFilter calls the injected TagsByFilter or the real version.

func (*DataServiceClient) UpdateBoundingBox added in v0.52.0

UpdateBoundingBox calls the injected UpdateBoundingBox or the real version.

type DataSyncServiceClient added in v0.52.0

type DataSyncServiceClient struct {
	datapb.DataSyncServiceClient
	DataCaptureUploadFunc func(ctx context.Context, in *datapb.DataCaptureUploadRequest,
		opts ...grpc.CallOption) (*datapb.DataCaptureUploadResponse, error)
	FileUploadFunc func(ctx context.Context,
		opts ...grpc.CallOption) (datapb.DataSyncService_FileUploadClient, error)
	StreamingDataCaptureUploadFunc func(ctx context.Context,
		opts ...grpc.CallOption) (datapb.DataSyncService_StreamingDataCaptureUploadClient, error)
}

DataSyncServiceClient represents a fake instance of a data sync service client.

func (*DataSyncServiceClient) DataCaptureUpload added in v0.52.0

DataCaptureUpload calls the injected DataCaptureUpload or the real version.

func (*DataSyncServiceClient) FileUpload added in v0.52.0

FileUpload calls the injected FileUpload or the real version.

func (*DataSyncServiceClient) StreamingDataCaptureUpload added in v0.52.0

StreamingDataCaptureUpload calls the injected StreamingDataCaptureUpload or the real version.

type DataSyncServiceFileUploadClient added in v0.52.0

type DataSyncServiceFileUploadClient struct {
	datapb.DataSyncService_FileUploadClient
	SendFunc         func(*datapb.FileUploadRequest) error
	CloseAndRecvFunc func() (*datapb.FileUploadResponse, error)
}

DataSyncServiceFileUploadClient represents a fake instance of a FileUpload client.

func (*DataSyncServiceFileUploadClient) CloseAndRecv added in v0.52.0

CloseAndRecv calls the injected CloseAndRecv or the real version.

func (*DataSyncServiceFileUploadClient) Send added in v0.52.0

Send calls the injected Send or the real version.

type DataSyncServiceStreamingDataCaptureUploadClient added in v0.52.0

type DataSyncServiceStreamingDataCaptureUploadClient struct {
	datapb.DataSyncService_StreamingDataCaptureUploadClient
	SendFunc         func(*datapb.StreamingDataCaptureUploadRequest) error
	CloseAndRecvFunc func() (*datapb.StreamingDataCaptureUploadResponse, error)
}

DataSyncServiceStreamingDataCaptureUploadClient represents a fake instance of a StreamingDataCaptureUpload client.

func (*DataSyncServiceStreamingDataCaptureUploadClient) CloseAndRecv added in v0.52.0

CloseAndRecv calls the injected CloseAndRecv or the real version.

func (*DataSyncServiceStreamingDataCaptureUploadClient) Send added in v0.52.0

Send calls the injected Send or the real version.

type DatasetServiceClient added in v0.53.0

DatasetServiceClient represents a fake instance of a dataset service client.

func (*DatasetServiceClient) CreateDataset added in v0.53.0

CreateDataset calls the injected CreateDataset or the real version.

func (*DatasetServiceClient) DeleteDataset added in v0.53.0

DeleteDataset calls the injected DeleteDataset or the real version.

func (*DatasetServiceClient) ListDatasetsByIDs added in v0.53.0

ListDatasetsByIDs calls the injected ListDatasetsByIDs or the real version.

func (*DatasetServiceClient) ListDatasetsByOrganizationID added in v0.53.0

ListDatasetsByOrganizationID calls the injected ListDatasetsByOrganizationID or the real version.

func (*DatasetServiceClient) RenameDataset added in v0.53.0

RenameDataset calls the injected RenameDataset or the real version.

type DigitalInterrupt

type DigitalInterrupt struct {
	board.DigitalInterrupt
	ValueFunc func(ctx context.Context, extra map[string]interface{}) (int64, error)

	TickFunc func(ctx context.Context, high bool, nanoseconds uint64) error

	AddCallbackFunc func(c chan board.Tick)
	NameFunc        func() string
	// contains filtered or unexported fields
}

DigitalInterrupt is an injected digital interrupt.

func (*DigitalInterrupt) Name added in v0.26.0

func (d *DigitalInterrupt) Name() string

Name calls the injected name or the real version.

func (*DigitalInterrupt) Tick

func (d *DigitalInterrupt) Tick(ctx context.Context, high bool, nanoseconds uint64) error

Tick calls the injected Tick.

func (*DigitalInterrupt) TickCap

func (d *DigitalInterrupt) TickCap() []interface{}

TickCap returns the last parameters received by Tick, and then clears them.

func (*DigitalInterrupt) Value

func (d *DigitalInterrupt) Value(ctx context.Context, extra map[string]interface{}) (int64, error)

Value calls the injected Value or the real version.

func (*DigitalInterrupt) ValueCap

func (d *DigitalInterrupt) ValueCap() []interface{}

ValueCap returns the last parameters received by Value, and then clears them.

type Encoder added in v0.2.34

type Encoder struct {
	encoder.Encoder

	DoFunc            func(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)
	ResetPositionFunc func(ctx context.Context, extra map[string]interface{}) error
	PositionFunc      func(ctx context.Context,
		positionType encoder.PositionType,
		extra map[string]interface{},
	) (float64, encoder.PositionType, error)
	PropertiesFunc func(ctx context.Context, extra map[string]interface{}) (encoder.Properties, error)
	// contains filtered or unexported fields
}

Encoder is an injected encoder.

func NewEncoder added in v0.2.36

func NewEncoder(name string) *Encoder

NewEncoder returns a new injected Encoder.

func (*Encoder) DoCommand added in v0.2.34

func (e *Encoder) DoCommand(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)

DoCommand calls the injected DoCommand or the real version.

func (*Encoder) Name added in v0.2.36

func (e *Encoder) Name() resource.Name

Name returns the name of the resource.

func (*Encoder) Position added in v0.2.50

func (e *Encoder) Position(
	ctx context.Context,
	positionType encoder.PositionType,
	extra map[string]interface{},
) (float64, encoder.PositionType, error)

Position calls the injected Position or the real version.

func (*Encoder) Properties added in v0.2.50

func (e *Encoder) Properties(ctx context.Context, extra map[string]interface{}) (encoder.Properties, error)

Properties calls the injected Properties or the real version.

func (*Encoder) ResetPosition added in v0.2.34

func (e *Encoder) ResetPosition(ctx context.Context, extra map[string]interface{}) error

ResetPosition calls the injected Zero or the real version.

type EndUserServiceClient added in v0.28.0

type EndUserServiceClient struct {
	apppb.EndUserServiceClient
	RegisterAuthApplicationFunc func(ctx context.Context, in *apppb.RegisterAuthApplicationRequest,
		opts ...grpc.CallOption,
	) (*apppb.RegisterAuthApplicationResponse, error)
	UpdateAuthApplicationFunc func(ctx context.Context, in *apppb.UpdateAuthApplicationRequest,
		opts ...grpc.CallOption,
	) (*apppb.UpdateAuthApplicationResponse, error)
	GetAuthApplicationFunc func(ctx context.Context, in *apppb.GetAuthApplicationRequest,
		opts ...grpc.CallOption,
	) (*apppb.GetAuthApplicationResponse, error)
}

EndUserServiceClient represents a fake instance of an end user service client.

func (*EndUserServiceClient) GetAuthApplication added in v0.29.0

GetAuthApplication calls the injected GetAuthApplication or the real version.

func (*EndUserServiceClient) RegisterAuthApplication added in v0.28.0

RegisterAuthApplication calls the injected RegisterAuthApplicationFunc or the real version.

func (*EndUserServiceClient) UpdateAuthApplication added in v0.28.0

UpdateAuthApplication calls the injected UpdateAuthApplicationFunc or the real version.

type FrameSystemService added in v0.5.0

type FrameSystemService struct {
	framesystem.Service

	TransformPoseFunc func(
		ctx context.Context,
		pose *referenceframe.PoseInFrame,
		dst string,
		additionalTransforms []*referenceframe.LinkInFrame,
	) (*referenceframe.PoseInFrame, error)
	TransformPointCloudFunc func(
		ctx context.Context,
		srcpc pointcloud.PointCloud,
		srcName, dstName string,
	) (pointcloud.PointCloud, error)
	CurrentInputsFunc func(ctx context.Context) (map[string][]referenceframe.Input, map[string]framesystem.InputEnabled, error)
	FrameSystemFunc   func(
		ctx context.Context,
		additionalTransforms []*referenceframe.LinkInFrame,
	) (referenceframe.FrameSystem, error)
	DoCommandFunc func(
		ctx context.Context,
		cmd map[string]interface{},
	) (map[string]interface{}, error)
	CloseFunc func(ctx context.Context) error
	// contains filtered or unexported fields
}

FrameSystemService represents a fake instance of a framesystem service. Due to the nature of the framesystem service, there should never be more than one on a robot. If you use an injected frame system, do not also create the system's default frame system as well.

func NewFrameSystemService added in v0.5.0

func NewFrameSystemService(name string) *FrameSystemService

NewFrameSystemService returns a new injected framesystem service.

func (*FrameSystemService) Close added in v0.5.0

func (fs *FrameSystemService) Close(ctx context.Context) error

Close calls the injected Close or the real version.

func (*FrameSystemService) CurrentInputs added in v0.5.0

CurrentInputs calls the injected method or the real variant.

func (*FrameSystemService) DoCommand added in v0.5.0

func (fs *FrameSystemService) DoCommand(ctx context.Context,
	cmd map[string]interface{},
) (map[string]interface{}, error)

DoCommand calls the injected DoCommand or the real variant.

func (*FrameSystemService) FrameSystem added in v0.5.0

func (fs *FrameSystemService) FrameSystem(
	ctx context.Context,
	additionalTransforms []*referenceframe.LinkInFrame,
) (referenceframe.FrameSystem, error)

FrameSystem calls the injected method of the real variant.

func (*FrameSystemService) Name added in v0.5.0

func (fs *FrameSystemService) Name() resource.Name

Name returns the name of the resource.

func (*FrameSystemService) TransformPointCloud added in v0.5.0

func (fs *FrameSystemService) TransformPointCloud(
	ctx context.Context,
	srcpc pointcloud.PointCloud,
	srcName, dstName string,
) (pointcloud.PointCloud, error)

TransformPointCloud calls the injected method or the real variant.

func (*FrameSystemService) TransformPose added in v0.5.0

func (fs *FrameSystemService) TransformPose(
	ctx context.Context,
	pose *referenceframe.PoseInFrame,
	dst string,
	additionalTransforms []*referenceframe.LinkInFrame,
) (*referenceframe.PoseInFrame, error)

TransformPose calls the injected method or the real variant.

type GPIOPin

type GPIOPin struct {
	board.GPIOPin

	SetFunc func(ctx context.Context, high bool, extra map[string]interface{}) error

	GetFunc func(ctx context.Context, extra map[string]interface{}) (bool, error)

	PWMFunc func(ctx context.Context, extra map[string]interface{}) (float64, error)

	SetPWMFunc func(ctx context.Context, dutyCyclePct float64, extra map[string]interface{}) error

	PWMFreqFunc func(ctx context.Context, extra map[string]interface{}) (uint, error)

	SetPWMFreqFunc func(ctx context.Context, freqHz uint, extra map[string]interface{}) error
	// contains filtered or unexported fields
}

GPIOPin is an injected GPIOPin.

func (*GPIOPin) Get

func (gp *GPIOPin) Get(ctx context.Context, extra map[string]interface{}) (bool, error)

Get calls the injected Get or the real version.

func (*GPIOPin) GetCap

func (gp *GPIOPin) GetCap() []interface{}

GetCap returns the last parameters received by Get, and then clears them.

func (*GPIOPin) PWM

func (gp *GPIOPin) PWM(ctx context.Context, extra map[string]interface{}) (float64, error)

PWM calls the injected PWM or the real version.

func (*GPIOPin) PWMCap

func (gp *GPIOPin) PWMCap() []interface{}

PWMCap returns the last parameters received by PWM, and then clears them.

func (*GPIOPin) PWMFreq

func (gp *GPIOPin) PWMFreq(ctx context.Context, extra map[string]interface{}) (uint, error)

PWMFreq calls the injected PWMFreq or the real version.

func (*GPIOPin) PWMFreqCap

func (gp *GPIOPin) PWMFreqCap() []interface{}

PWMFreqCap returns the last parameters received by PWMFreq, and then clears them.

func (*GPIOPin) Set

func (gp *GPIOPin) Set(ctx context.Context, high bool, extra map[string]interface{}) error

Set calls the injected Set or the real version.

func (*GPIOPin) SetCap

func (gp *GPIOPin) SetCap() []interface{}

SetCap returns the last parameters received by Set, and then clears them.

func (*GPIOPin) SetPWM

func (gp *GPIOPin) SetPWM(ctx context.Context, dutyCyclePct float64, extra map[string]interface{}) error

SetPWM calls the injected SetPWM or the real version.

func (*GPIOPin) SetPWMCap

func (gp *GPIOPin) SetPWMCap() []interface{}

SetPWMCap returns the last parameters received by SetPWM, and then clears them.

func (*GPIOPin) SetPWMFreq

func (gp *GPIOPin) SetPWMFreq(ctx context.Context, freqHz uint, extra map[string]interface{}) error

SetPWMFreq calls the injected SetPWMFreq or the real version.

func (*GPIOPin) SetPWMFreqCap

func (gp *GPIOPin) SetPWMFreqCap() []interface{}

SetPWMFreqCap returns the last parameters received by SetPWMFreq, and then clears them.

type Gantry

type Gantry struct {
	gantry.Gantry

	DoFunc             func(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)
	PositionFunc       func(ctx context.Context, extra map[string]interface{}) ([]float64, error)
	MoveToPositionFunc func(ctx context.Context, pos, speed []float64, extra map[string]interface{}) error
	LengthsFunc        func(ctx context.Context, extra map[string]interface{}) ([]float64, error)
	StopFunc           func(ctx context.Context, extra map[string]interface{}) error
	HomeFunc           func(ctx context.Context, extra map[string]interface{}) (bool, error)
	IsMovingFunc       func(context.Context) (bool, error)
	CloseFunc          func(ctx context.Context) error
	ModelFrameFunc     func() referenceframe.Model
	// contains filtered or unexported fields
}

Gantry is an injected gantry.

func NewGantry added in v0.2.36

func NewGantry(name string) *Gantry

NewGantry returns a new injected gantry.

func (*Gantry) Close

func (g *Gantry) Close(ctx context.Context) error

Close calls the injected Close or the real version.

func (*Gantry) DoCommand added in v0.1.0

func (g *Gantry) DoCommand(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)

DoCommand calls the injected DoCommand or the real version.

func (*Gantry) Home added in v0.4.0

func (g *Gantry) Home(ctx context.Context, extra map[string]interface{}) (bool, error)

Home calls the injected Home or the real version.

func (*Gantry) IsMoving

func (g *Gantry) IsMoving(ctx context.Context) (bool, error)

IsMoving calls the injected IsMoving or the real version.

func (*Gantry) Lengths added in v0.1.0

func (g *Gantry) Lengths(ctx context.Context, extra map[string]interface{}) ([]float64, error)

Lengths calls the injected Lengths or the real version.

func (*Gantry) ModelFrame

func (g *Gantry) ModelFrame() referenceframe.Model

ModelFrame returns a Gantry ModelFrame.

func (*Gantry) MoveToPosition

func (g *Gantry) MoveToPosition(ctx context.Context, positions, speeds []float64, extra map[string]interface{}) error

MoveToPosition calls the injected MoveToPosition or the real version.

func (*Gantry) Name added in v0.2.36

func (g *Gantry) Name() resource.Name

Name returns the name of the resource.

func (*Gantry) Position added in v0.1.0

func (g *Gantry) Position(ctx context.Context, extra map[string]interface{}) ([]float64, error)

Position calls the injected Position or the real version.

func (*Gantry) Stop

func (g *Gantry) Stop(ctx context.Context, extra map[string]interface{}) error

Stop calls the injected Stop or the real version.

type GenericComponent added in v0.20.0

type GenericComponent struct {
	resource.Resource

	DoFunc func(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)
	// contains filtered or unexported fields
}

GenericComponent is an injectable generic component.

func NewGenericComponent added in v0.20.0

func NewGenericComponent(name string) *GenericComponent

NewGenericComponent returns a new injected generic component.

func (*GenericComponent) DoCommand added in v0.20.0

func (g *GenericComponent) DoCommand(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)

DoCommand calls the injected DoCommand or the real version.

func (*GenericComponent) Name added in v0.20.0

func (g *GenericComponent) Name() resource.Name

Name returns the name of the resource.

type GenericService added in v0.20.0

type GenericService struct {
	resource.Resource

	DoFunc func(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)
	// contains filtered or unexported fields
}

GenericService is an injectable generic service.

func NewGenericService added in v0.20.0

func NewGenericService(name string) *GenericService

NewGenericService returns a new injected generic service.

func (*GenericService) DoCommand added in v0.20.0

func (g *GenericService) DoCommand(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)

DoCommand calls the injected DoCommand or the real version.

func (*GenericService) Name added in v0.20.0

func (g *GenericService) Name() resource.Name

Name returns the name of the resource.

type Gripper

type Gripper struct {
	gripper.Gripper

	DoFunc         func(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)
	OpenFunc       func(ctx context.Context, extra map[string]interface{}) error
	GrabFunc       func(ctx context.Context, extra map[string]interface{}) (bool, error)
	StopFunc       func(ctx context.Context, extra map[string]interface{}) error
	IsMovingFunc   func(context.Context) (bool, error)
	CloseFunc      func(ctx context.Context) error
	GeometriesFunc func(ctx context.Context) ([]spatialmath.Geometry, error)
	// contains filtered or unexported fields
}

Gripper is an injected gripper.

func NewGripper added in v0.2.36

func NewGripper(name string) *Gripper

NewGripper returns a new injected gripper.

func (*Gripper) Close

func (g *Gripper) Close(ctx context.Context) error

Close calls the injected Close or the real version.

func (*Gripper) DoCommand added in v0.1.0

func (g *Gripper) DoCommand(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)

DoCommand calls the injected DoCommand or the real version.

func (*Gripper) Geometries added in v0.27.0

func (g *Gripper) Geometries(ctx context.Context, extra map[string]interface{}) ([]spatialmath.Geometry, error)

Geometries returns the gripper's geometries.

func (*Gripper) Grab

func (g *Gripper) Grab(ctx context.Context, extra map[string]interface{}) (bool, error)

Grab calls the injected Grab or the real version.

func (*Gripper) IsMoving

func (g *Gripper) IsMoving(ctx context.Context) (bool, error)

IsMoving calls the injected IsMoving or the real version.

func (*Gripper) Name added in v0.2.36

func (g *Gripper) Name() resource.Name

Name returns the name of the resource.

func (*Gripper) Open

func (g *Gripper) Open(ctx context.Context, extra map[string]interface{}) error

Open calls the injected Open or the real version.

func (*Gripper) Stop

func (g *Gripper) Stop(ctx context.Context, extra map[string]interface{}) error

Stop calls the injected Stop or the real version.

type I2C

type I2C struct {
	buses.I2C
	OpenHandleFunc func(addr byte) (buses.I2CHandle, error)
}

I2C is an injected I2C.

func (*I2C) OpenHandle

func (s *I2C) OpenHandle(addr byte) (buses.I2CHandle, error)

OpenHandle calls the injected OpenHandle or the real version.

type I2CHandle added in v0.2.25

type I2CHandle struct {
	buses.I2CHandle
	WriteFunc          func(ctx context.Context, tx []byte) error
	ReadFunc           func(ctx context.Context, count int) ([]byte, error)
	ReadByteDataFunc   func(ctx context.Context, register byte) (byte, error)
	WriteByteDataFunc  func(ctx context.Context, register, data byte) error
	ReadBlockDataFunc  func(ctx context.Context, register byte, numBytes uint8) ([]byte, error)
	WriteBlockDataFunc func(ctx context.Context, register byte, data []byte) error
	CloseFunc          func() error
}

I2CHandle is an injected I2CHandle.

func (*I2CHandle) Close added in v0.2.25

func (handle *I2CHandle) Close() error

Close calls the injected CloseFunc or the real version.

func (*I2CHandle) Read added in v0.2.36

func (handle *I2CHandle) Read(ctx context.Context, count int) ([]byte, error)

Read calls the injected ReadFunc or the real version.

func (*I2CHandle) ReadBlockData added in v0.2.25

func (handle *I2CHandle) ReadBlockData(ctx context.Context, register byte, numBytes uint8) ([]byte, error)

ReadBlockData calls the injected ReadBlockDataFunc or the real version.

func (*I2CHandle) ReadByteData added in v0.2.36

func (handle *I2CHandle) ReadByteData(ctx context.Context, register byte) (byte, error)

ReadByteData calls the injected ReadByteDataFunc or the real version.

func (*I2CHandle) Write added in v0.2.36

func (handle *I2CHandle) Write(ctx context.Context, tx []byte) error

Write calls the injected WriteFunc or the real version.

func (*I2CHandle) WriteBlockData added in v0.2.36

func (handle *I2CHandle) WriteBlockData(ctx context.Context, register byte, data []byte) error

WriteBlockData calls the injected WriteBlockDataFunc or the real version.

func (*I2CHandle) WriteByteData added in v0.2.25

func (handle *I2CHandle) WriteByteData(ctx context.Context, register, data byte) error

WriteByteData calls the injected WriteByteDataFunc or the real version.

type InputController

type InputController struct {
	input.Controller

	DoFunc                      func(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)
	ControlsFunc                func(ctx context.Context, extra map[string]interface{}) ([]input.Control, error)
	EventsFunc                  func(ctx context.Context, extra map[string]interface{}) (map[input.Control]input.Event, error)
	RegisterControlCallbackFunc func(
		ctx context.Context,
		control input.Control,
		triggers []input.EventType,
		ctrlFunc input.ControlFunction,
		extra map[string]interface{},
	) error
	// contains filtered or unexported fields
}

InputController is an injected InputController.

func NewInputController added in v0.2.36

func NewInputController(name string) *InputController

NewInputController returns a new injected input controller.

func (*InputController) Controls added in v0.1.0

func (s *InputController) Controls(ctx context.Context, extra map[string]interface{}) ([]input.Control, error)

Controls calls the injected function or the real version.

func (*InputController) DoCommand added in v0.1.0

func (s *InputController) DoCommand(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)

DoCommand calls the injected DoCommand or the real version.

func (*InputController) Events added in v0.1.0

func (s *InputController) Events(ctx context.Context, extra map[string]interface{}) (map[input.Control]input.Event, error)

Events calls the injected function or the real version.

func (*InputController) Name added in v0.2.36

func (s *InputController) Name() resource.Name

Name returns the name of the resource.

func (*InputController) RegisterControlCallback

func (s *InputController) RegisterControlCallback(
	ctx context.Context,
	control input.Control,
	triggers []input.EventType,
	ctrlFunc input.ControlFunction,
	extra map[string]interface{},
) error

RegisterControlCallback calls the injected function or the real version.

type MLModelService added in v0.2.34

type MLModelService struct {
	mlmodel.Service

	InferFunc    func(ctx context.Context, tensors ml.Tensors) (ml.Tensors, error)
	MetadataFunc func(ctx context.Context) (mlmodel.MLMetadata, error)
	CloseFunc    func(ctx context.Context) error
	// contains filtered or unexported fields
}

MLModelService represents a fake instance of an MLModel service.

func NewMLModelService added in v0.2.36

func NewMLModelService(name string) *MLModelService

NewMLModelService returns a new injected mlmodel service.

func (*MLModelService) Close added in v0.2.36

func (s *MLModelService) Close(ctx context.Context) error

Close calls the injected Close or the real version.

func (*MLModelService) Infer added in v0.2.34

func (s *MLModelService) Infer(
	ctx context.Context,
	tensors ml.Tensors,
) (ml.Tensors, error)

Infer calls the injected Infer or the real variant.

func (*MLModelService) Metadata added in v0.2.34

func (s *MLModelService) Metadata(ctx context.Context) (mlmodel.MLMetadata, error)

Metadata calls the injected Metadata or the real variant.

func (*MLModelService) Name added in v0.2.36

func (s *MLModelService) Name() resource.Name

Name returns the name of the resource.

type MotionService

type MotionService struct {
	motion.Service

	MoveFunc func(
		ctx context.Context,
		req motion.MoveReq,
	) (bool, error)
	MoveOnMapFunc func(
		ctx context.Context,
		req motion.MoveOnMapReq,
	) (motion.ExecutionID, error)
	MoveOnGlobeFunc func(
		ctx context.Context,
		req motion.MoveOnGlobeReq,
	) (motion.ExecutionID, error)
	GetPoseFunc func(
		ctx context.Context,
		componentName resource.Name,
		destinationFrame string,
		supplementalTransforms []*referenceframe.LinkInFrame,
		extra map[string]interface{},
	) (*referenceframe.PoseInFrame, error)
	StopPlanFunc func(
		ctx context.Context,
		req motion.StopPlanReq,
	) error
	ListPlanStatusesFunc func(
		ctx context.Context,
		req motion.ListPlanStatusesReq,
	) ([]motion.PlanStatusWithID, error)
	PlanHistoryFunc func(
		ctx context.Context,
		req motion.PlanHistoryReq,
	) ([]motion.PlanWithStatus, error)
	DoCommandFunc func(
		ctx context.Context,
		cmd map[string]interface{}) (map[string]interface{}, error,
	)
	CloseFunc func(ctx context.Context) error
	// contains filtered or unexported fields
}

MotionService represents a fake instance of an motion service.

func NewMotionService added in v0.2.36

func NewMotionService(name string) *MotionService

NewMotionService returns a new injected motion service.

func (*MotionService) Close added in v0.2.36

func (mgs *MotionService) Close(ctx context.Context) error

Close calls the injected Close or the real version.

func (*MotionService) DoCommand added in v0.2.20

func (mgs *MotionService) DoCommand(ctx context.Context,
	cmd map[string]interface{},
) (map[string]interface{}, error)

DoCommand calls the injected DoCommand or the real variant.

func (*MotionService) GetPose

func (mgs *MotionService) GetPose(
	ctx context.Context,
	componentName resource.Name,
	destinationFrame string,
	supplementalTransforms []*referenceframe.LinkInFrame,
	extra map[string]interface{},
) (*referenceframe.PoseInFrame, error)

GetPose calls the injected GetPose or the real variant.

func (*MotionService) ListPlanStatuses added in v0.11.0

func (mgs *MotionService) ListPlanStatuses(
	ctx context.Context,
	req motion.ListPlanStatusesReq,
) ([]motion.PlanStatusWithID, error)

ListPlanStatuses calls the injected ListPlanStatuses or the real variant.

func (*MotionService) Move

func (mgs *MotionService) Move(ctx context.Context, req motion.MoveReq) (bool, error)

Move calls the injected Move or the real variant.

func (*MotionService) MoveOnGlobe added in v0.2.49

func (mgs *MotionService) MoveOnGlobe(ctx context.Context, req motion.MoveOnGlobeReq) (motion.ExecutionID, error)

MoveOnGlobe calls the injected MoveOnGlobe or the real variant.

func (*MotionService) MoveOnMap added in v0.2.34

func (mgs *MotionService) MoveOnMap(
	ctx context.Context,
	req motion.MoveOnMapReq,
) (motion.ExecutionID, error)

MoveOnMap calls the injected MoveOnMap or the real variant.

func (*MotionService) Name added in v0.2.36

func (mgs *MotionService) Name() resource.Name

Name returns the name of the resource.

func (*MotionService) PlanHistory added in v0.11.0

func (mgs *MotionService) PlanHistory(
	ctx context.Context,
	req motion.PlanHistoryReq,
) ([]motion.PlanWithStatus, error)

PlanHistory calls the injected PlanHistory or the real variant.

func (*MotionService) StopPlan added in v0.11.0

func (mgs *MotionService) StopPlan(
	ctx context.Context,
	req motion.StopPlanReq,
) error

StopPlan calls the injected StopPlan or the real variant.

type Motor

type Motor struct {
	motor.Motor

	DoFunc                func(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)
	SetPowerFunc          func(ctx context.Context, powerPct float64, extra map[string]interface{}) error
	GoForFunc             func(ctx context.Context, rpm, rotations float64, extra map[string]interface{}) error
	GoToFunc              func(ctx context.Context, rpm, position float64, extra map[string]interface{}) error
	SetRPMFunc            func(ctx context.Context, rpm float64, extra map[string]interface{}) error
	ResetZeroPositionFunc func(ctx context.Context, offset float64, extra map[string]interface{}) error
	PositionFunc          func(ctx context.Context, extra map[string]interface{}) (float64, error)
	PropertiesFunc        func(ctx context.Context, extra map[string]interface{}) (motor.Properties, error)
	StopFunc              func(ctx context.Context, extra map[string]interface{}) error
	IsPoweredFunc         func(ctx context.Context, extra map[string]interface{}) (bool, float64, error)
	IsMovingFunc          func(context.Context) (bool, error)
	// contains filtered or unexported fields
}

Motor is an injected motor.

func NewMotor added in v0.2.36

func NewMotor(name string) *Motor

NewMotor returns a new injected motor.

func (*Motor) DoCommand added in v0.1.0

func (m *Motor) DoCommand(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)

DoCommand calls the injected DoCommand or the real version.

func (*Motor) GoFor

func (m *Motor) GoFor(ctx context.Context, rpm, revolutions float64, extra map[string]interface{}) error

GoFor calls the injected GoFor or the real version.

func (*Motor) GoTo

func (m *Motor) GoTo(ctx context.Context, rpm, positionRevolutions float64, extra map[string]interface{}) error

GoTo calls the injected GoTo or the real version.

func (*Motor) IsMoving added in v0.4.0

func (m *Motor) IsMoving(ctx context.Context) (bool, error)

IsMoving calls the injected IsMoving or the real version.

func (*Motor) IsPowered

func (m *Motor) IsPowered(ctx context.Context, extra map[string]interface{}) (bool, float64, error)

IsPowered calls the injected IsPowered or the real version.

func (*Motor) Name added in v0.2.36

func (m *Motor) Name() resource.Name

Name returns the name of the resource.

func (*Motor) Position added in v0.1.0

func (m *Motor) Position(ctx context.Context, extra map[string]interface{}) (float64, error)

Position calls the injected Position or the real version.

func (*Motor) Properties added in v0.1.0

func (m *Motor) Properties(ctx context.Context, extra map[string]interface{}) (motor.Properties, error)

Properties calls the injected Properties or the real version.

func (*Motor) ResetZeroPosition

func (m *Motor) ResetZeroPosition(ctx context.Context, offset float64, extra map[string]interface{}) error

ResetZeroPosition calls the injected Zero or the real version.

func (*Motor) SetPower

func (m *Motor) SetPower(ctx context.Context, powerPct float64, extra map[string]interface{}) error

SetPower calls the injected Power or the real version.

func (*Motor) SetRPM added in v0.29.0

func (m *Motor) SetRPM(ctx context.Context, rpm float64, extra map[string]interface{}) error

SetRPM calls the injected SetRPM or the real version.

func (*Motor) Stop

func (m *Motor) Stop(ctx context.Context, extra map[string]interface{}) error

Stop calls the injected Off or the real version.

type MovementSensor added in v0.0.6

type MovementSensor struct {
	movementsensor.MovementSensor

	Mu                          sync.RWMutex
	PositionFuncExtraCap        map[string]interface{}
	PositionFunc                func(ctx context.Context, extra map[string]interface{}) (*geo.Point, float64, error)
	LinearVelocityFuncExtraCap  map[string]interface{}
	LinearVelocityFunc          func(ctx context.Context, extra map[string]interface{}) (r3.Vector, error)
	AngularVelocityFuncExtraCap map[string]interface{}
	AngularVelocityFunc         func(ctx context.Context, extra map[string]interface{}) (spatialmath.AngularVelocity, error)
	CompassHeadingFuncExtraCap  map[string]interface{}
	CompassHeadingFunc          func(ctx context.Context, extra map[string]interface{}) (float64, error)
	LinearAccelerationExtraCap  map[string]interface{}
	LinearAccelerationFunc      func(ctx context.Context, extra map[string]interface{}) (r3.Vector, error)
	OrientationFuncExtraCap     map[string]interface{}
	OrientationFunc             func(ctx context.Context, extra map[string]interface{}) (spatialmath.Orientation, error)
	PropertiesFuncExtraCap      map[string]interface{}
	PropertiesFunc              func(ctx context.Context, extra map[string]interface{}) (*movementsensor.Properties, error)
	AccuracyFuncExtraCap        map[string]interface{}
	AccuracyFunc                func(ctx context.Context, extra map[string]interface{}) (*movementsensor.Accuracy, error)
	ReadingsFuncExtraCap        map[string]interface{}
	ReadingsFunc                func(ctx context.Context, extra map[string]interface{}) (map[string]interface{}, error)
	DoFunc                      func(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)
	CloseFunc                   func() error
	// contains filtered or unexported fields
}

MovementSensor is an injected MovementSensor.

func NewMovementSensor added in v0.2.36

func NewMovementSensor(name string) *MovementSensor

NewMovementSensor returns a new injected movement sensor.

func (*MovementSensor) Accuracy added in v0.2.0

func (i *MovementSensor) Accuracy(ctx context.Context, extra map[string]interface{}) (*movementsensor.Accuracy, error,
)

Accuracy func or passthrough.

func (*MovementSensor) AngularVelocity added in v0.1.0

func (i *MovementSensor) AngularVelocity(ctx context.Context, extra map[string]interface{}) (spatialmath.AngularVelocity, error)

AngularVelocity func or passthrough.

func (*MovementSensor) Close added in v0.0.6

func (i *MovementSensor) Close(ctx context.Context) error

Close calls the injected Close or the real version.

func (*MovementSensor) CompassHeading added in v0.1.0

func (i *MovementSensor) CompassHeading(ctx context.Context, extra map[string]interface{}) (float64, error)

CompassHeading func or passthrough.

func (*MovementSensor) DoCommand added in v0.1.0

func (i *MovementSensor) DoCommand(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)

DoCommand calls the injected DoCommand or the real version.

func (*MovementSensor) LinearAcceleration added in v0.2.11

func (i *MovementSensor) LinearAcceleration(ctx context.Context, extra map[string]interface{}) (r3.Vector, error)

LinearAcceleration func or passthrough.

func (*MovementSensor) LinearVelocity added in v0.1.0

func (i *MovementSensor) LinearVelocity(ctx context.Context, extra map[string]interface{}) (r3.Vector, error)

LinearVelocity func or passthrough.

func (*MovementSensor) Name added in v0.2.36

func (i *MovementSensor) Name() resource.Name

Name returns the name of the resource.

func (*MovementSensor) Orientation added in v0.1.0

func (i *MovementSensor) Orientation(ctx context.Context, extra map[string]interface{}) (spatialmath.Orientation, error)

Orientation func or passthrough.

func (*MovementSensor) Position added in v0.1.0

func (i *MovementSensor) Position(ctx context.Context, extra map[string]interface{}) (*geo.Point, float64, error)

Position func or passthrough.

func (*MovementSensor) Properties added in v0.2.0

func (i *MovementSensor) Properties(ctx context.Context, extra map[string]interface{}) (*movementsensor.Properties, error)

Properties func or passthrough.

func (*MovementSensor) Readings added in v0.12.0

func (i *MovementSensor) Readings(ctx context.Context, extra map[string]interface{}) (map[string]interface{}, error)

Readings func or passthrough.

type NavigationService struct {
	navigation.Service

	ModeFunc    func(ctx context.Context, extra map[string]interface{}) (navigation.Mode, error)
	SetModeFunc func(ctx context.Context, mode navigation.Mode, extra map[string]interface{}) error

	LocationFunc func(ctx context.Context, extra map[string]interface{}) (*spatialmath.GeoPose, error)

	WaypointsFunc      func(ctx context.Context, extra map[string]interface{}) ([]navigation.Waypoint, error)
	AddWaypointFunc    func(ctx context.Context, point *geo.Point, extra map[string]interface{}) error
	RemoveWaypointFunc func(ctx context.Context, id primitive.ObjectID, extra map[string]interface{}) error

	ObstaclesFunc func(ctx context.Context, extra map[string]interface{}) ([]*spatialmath.GeoGeometry, error)
	PathsFunc     func(ctx context.Context, extra map[string]interface{}) ([]*navigation.Path, error)

	PropertiesFunc func(ctx context.Context) (navigation.Properties, error)

	DoCommandFunc func(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)
	CloseFunc     func(ctx context.Context) error
	// contains filtered or unexported fields
}

NavigationService represents a fake instance of a navigation service.

func NewNavigationService added in v0.2.36

func NewNavigationService(name string) *NavigationService

NewNavigationService returns a new injected navigation service.

func (ns *NavigationService) AddWaypoint(ctx context.Context, point *geo.Point, extra map[string]interface{}) error

AddWaypoint calls the injected AddWaypointFunc or the real version.

func (ns *NavigationService) Close(ctx context.Context) error

Close calls the injected Close or the real version.

func (ns *NavigationService) DoCommand(ctx context.Context,
	cmd map[string]interface{},
) (map[string]interface{}, error)

DoCommand calls the injected DoCommand or the real variant.

func (ns *NavigationService) Location(ctx context.Context, extra map[string]interface{}) (*spatialmath.GeoPose, error)

Location calls the injected LocationFunc or the real version.

func (ns *NavigationService) Mode(ctx context.Context, extra map[string]interface{}) (navigation.Mode, error)

Mode calls the injected ModeFunc or the real version.

func (ns *NavigationService) Name() resource.Name

Name returns the name of the resource.

func (ns *NavigationService) Obstacles(ctx context.Context, extra map[string]interface{}) ([]*spatialmath.GeoGeometry, error)

Obstacles calls the injected Obstacles or the real version.

func (ns *NavigationService) Paths(ctx context.Context, extra map[string]interface{}) ([]*navigation.Path, error)

Paths calls the injected Paths or the real version.

Properties calls the injected Properties or the real variant.

func (ns *NavigationService) RemoveWaypoint(ctx context.Context, id primitive.ObjectID, extra map[string]interface{}) error

RemoveWaypoint calls the injected RemoveWaypointFunc or the real version.

func (ns *NavigationService) SetMode(ctx context.Context, mode navigation.Mode, extra map[string]interface{}) error

SetMode calls the injected SetModeFunc or the real version.

func (ns *NavigationService) Waypoints(ctx context.Context, extra map[string]interface{}) ([]navigation.Waypoint, error)

Waypoints calls the injected WaypointsFunc or the real version.

type PoseTracker

type PoseTracker struct {
	posetracker.PoseTracker

	PosesFunc func(ctx context.Context, bodyNames []string, extra map[string]interface{}) (posetracker.BodyToPoseInFrame, error)
	DoFunc    func(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)
	// contains filtered or unexported fields
}

PoseTracker is an injected pose tracker.

func NewPoseTracker added in v0.2.36

func NewPoseTracker(name string) *PoseTracker

NewPoseTracker returns a new injected pose tracker.

func (*PoseTracker) DoCommand added in v0.1.1

func (pT *PoseTracker) DoCommand(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)

DoCommand calls the injected DoCommand or the real version.

func (*PoseTracker) Name added in v0.2.36

func (pT *PoseTracker) Name() resource.Name

Name returns the name of the resource.

func (*PoseTracker) Poses added in v0.1.1

func (pT *PoseTracker) Poses(
	ctx context.Context, bodyNames []string, extra map[string]interface{},
) (posetracker.BodyToPoseInFrame, error)

Poses calls the injected Poses or the real version.

type PowerSensor added in v0.7.0

type PowerSensor struct {
	powersensor.PowerSensor

	VoltageFunc  func(ctx context.Context, extra map[string]interface{}) (float64, bool, error)
	CurrentFunc  func(ctx context.Context, extra map[string]interface{}) (float64, bool, error)
	PowerFunc    func(ctx context.Context, extra map[string]interface{}) (float64, error)
	ReadingsFunc func(ctx context.Context, extra map[string]interface{}) (map[string]interface{}, error)
	DoFunc       func(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)
	// contains filtered or unexported fields
}

A PowerSensor reports information about voltage, current and power.

func NewPowerSensor added in v0.7.0

func NewPowerSensor(name string) *PowerSensor

NewPowerSensor returns a new injected movement sensor.

func (*PowerSensor) Current added in v0.7.0

func (i *PowerSensor) Current(ctx context.Context, cmd map[string]interface{}) (float64, bool, error)

Current func or passthrough.

func (*PowerSensor) DoCommand added in v0.7.0

func (i *PowerSensor) DoCommand(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)

DoCommand calls the injected DoCommand or the real version.

func (*PowerSensor) Name added in v0.7.0

func (i *PowerSensor) Name() resource.Name

Name returns the name of the resource.

func (*PowerSensor) Power added in v0.7.0

func (i *PowerSensor) Power(ctx context.Context, cmd map[string]interface{}) (float64, error)

Power func or passthrough.

func (*PowerSensor) Readings added in v0.12.0

func (i *PowerSensor) Readings(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)

Readings func or passthrough.

func (*PowerSensor) Voltage added in v0.7.0

func (i *PowerSensor) Voltage(ctx context.Context, cmd map[string]interface{}) (float64, bool, error)

Voltage func or passthrough.

type ProvisioningServiceClient added in v0.53.0

ProvisioningServiceClient represents a fake instance of a provisioning client.

func (*ProvisioningServiceClient) GetNetworkList added in v0.53.0

GetNetworkList calls the injected GetNetworkListFunc or the real version.

func (*ProvisioningServiceClient) GetSmartMachineStatus added in v0.53.0

GetSmartMachineStatus calls the injected GetSmartMachineStatusFunc or the real version.

func (*ProvisioningServiceClient) SetNetworkCredentials added in v0.53.0

SetNetworkCredentials calls the injected SetNetworkCredentialsFunc or the real version.

func (*ProvisioningServiceClient) SetSmartMachineCredentials added in v0.53.0

SetSmartMachineCredentials calls the injected SetSmartMachineCredentialsFunc or the real version.

type ReadWriteCloser

type ReadWriteCloser struct {
	io.ReadWriteCloser
	ReadFunc  func(p []byte) (n int, err error)
	WriteFunc func(p []byte) (n int, err error)
	CloseFunc func() error
}

ReadWriteCloser is an injected read write closer.

func (*ReadWriteCloser) Close

func (rwc *ReadWriteCloser) Close() error

Close calls the injected Close or the real version.

func (*ReadWriteCloser) Read

func (rwc *ReadWriteCloser) Read(p []byte) (n int, err error)

Read calls the injected Read or the real version.

func (*ReadWriteCloser) Write

func (rwc *ReadWriteCloser) Write(p []byte) (n int, err error)

Write calls the injected Write or the real version.

type Robot

type Robot struct {
	robot.LocalRobot
	Mu                     sync.RWMutex // Ugly, has to be manually locked if a test means to swap funcs on an in-use robot.
	DiscoverComponentsFunc func(ctx context.Context, keys []resource.DiscoveryQuery) ([]resource.Discovery, error)
	RemoteByNameFunc       func(name string) (robot.Robot, bool)
	ResourceByNameFunc     func(name resource.Name) (resource.Resource, error)
	RemoteNamesFunc        func() []string
	ResourceNamesFunc      func() []resource.Name
	ResourceRPCAPIsFunc    func() []resource.RPCAPI
	ProcessManagerFunc     func() pexec.ProcessManager
	ConfigFunc             func() *config.Config
	LoggerFunc             func() logging.Logger
	CloseFunc              func(ctx context.Context) error
	StopAllFunc            func(ctx context.Context, extra map[resource.Name]map[string]interface{}) error
	FrameSystemConfigFunc  func(ctx context.Context) (*framesystem.Config, error)
	TransformPoseFunc      func(
		ctx context.Context,
		pose *referenceframe.PoseInFrame,
		dst string,
		additionalTransforms []*referenceframe.LinkInFrame,
	) (*referenceframe.PoseInFrame, error)
	TransformPointCloudFunc func(ctx context.Context, srcpc pointcloud.PointCloud, srcName, dstName string) (pointcloud.PointCloud, error)
	StatusFunc              func(ctx context.Context, resourceNames []resource.Name) ([]robot.Status, error)
	ModuleAddressFunc       func() (string, error)
	CloudMetadataFunc       func(ctx context.Context) (cloud.Metadata, error)
	MachineStatusFunc       func(ctx context.Context) (robot.MachineStatus, error)
	ShutdownFunc            func(ctx context.Context) error

	SessMgr    session.Manager
	PackageMgr packages.Manager
	// contains filtered or unexported fields
}

Robot is an injected robot.

func (*Robot) Close

func (r *Robot) Close(ctx context.Context) error

Close calls the injected Close or the real version.

func (*Robot) CloudMetadata added in v0.23.0

func (r *Robot) CloudMetadata(ctx context.Context) (cloud.Metadata, error)

CloudMetadata calls the injected CloudMetadata or the real one.

func (*Robot) Config

func (r *Robot) Config() *config.Config

Config calls the injected Config or the real version.

func (*Robot) DiscoverComponents

func (r *Robot) DiscoverComponents(ctx context.Context, keys []resource.DiscoveryQuery) ([]resource.Discovery, error)

DiscoverComponents calls the injected DiscoverComponents or the real one.

func (*Robot) FrameSystemConfig

func (r *Robot) FrameSystemConfig(ctx context.Context) (*framesystem.Config, error)

FrameSystemConfig calls the injected FrameSystemConfig or the real version.

func (*Robot) Logger

func (r *Robot) Logger() logging.Logger

Logger calls the injected Logger or the real version.

func (*Robot) MachineStatus added in v0.35.0

func (r *Robot) MachineStatus(ctx context.Context) (robot.MachineStatus, error)

MachineStatus calls the injected MachineStatus or the real one.

func (*Robot) MockResourcesFromMap

func (r *Robot) MockResourcesFromMap(rs map[resource.Name]resource.Resource)

MockResourcesFromMap mocks ResourceNames and ResourceByName based on a resource map.

func (*Robot) ModuleAddress added in v0.2.8

func (r *Robot) ModuleAddress() (string, error)

ModuleAddress calls the injected ModuleAddress or the real one.

func (*Robot) OperationManager

func (r *Robot) OperationManager() *operation.Manager

OperationManager calls the injected OperationManager or the real version.

func (*Robot) PackageManager added in v0.2.15

func (r *Robot) PackageManager() packages.Manager

PackageManager calls the injected PackageManager or the real version.

func (*Robot) ProcessManager

func (r *Robot) ProcessManager() pexec.ProcessManager

ProcessManager calls the injected ProcessManager or the real version.

func (*Robot) RemoteByName

func (r *Robot) RemoteByName(name string) (robot.Robot, bool)

RemoteByName calls the injected RemoteByName or the real version.

func (*Robot) RemoteNames

func (r *Robot) RemoteNames() []string

RemoteNames calls the injected RemoteNames or the real version.

func (*Robot) ResourceByName

func (r *Robot) ResourceByName(name resource.Name) (resource.Resource, error)

ResourceByName calls the injected ResourceByName or the real version.

func (*Robot) ResourceNames

func (r *Robot) ResourceNames() []resource.Name

ResourceNames calls the injected ResourceNames or the real version.

func (*Robot) ResourceRPCAPIs added in v0.2.36

func (r *Robot) ResourceRPCAPIs() []resource.RPCAPI

ResourceRPCAPIs returns a list of all known resource RPC APIs.

func (*Robot) SessionManager added in v0.2.5

func (r *Robot) SessionManager() session.Manager

SessionManager calls the injected SessionManager or the real version.

func (*Robot) Shutdown added in v0.29.0

func (r *Robot) Shutdown(ctx context.Context) error

Shutdown calls the injected Shutdown or the real one.

func (*Robot) Status added in v0.1.0

func (r *Robot) Status(ctx context.Context, resourceNames []resource.Name) ([]robot.Status, error)

Status call the injected Status or the real one.

func (*Robot) StopAll

func (r *Robot) StopAll(ctx context.Context, extra map[resource.Name]map[string]interface{}) error

StopAll calls the injected StopAll or the real version.

func (*Robot) TransformPointCloud added in v0.2.11

func (r *Robot) TransformPointCloud(ctx context.Context, srcpc pointcloud.PointCloud, srcName, dstName string,
) (pointcloud.PointCloud, error)

TransformPointCloud calls the injected TransformPointCloud or the real version.

func (*Robot) TransformPose

func (r *Robot) TransformPose(
	ctx context.Context,
	pose *referenceframe.PoseInFrame,
	dst string,
	additionalTransforms []*referenceframe.LinkInFrame,
) (*referenceframe.PoseInFrame, error)

TransformPose calls the injected TransformPose or the real version.

type SLAMService

type SLAMService struct {
	slam.Service

	PositionFunc      func(ctx context.Context) (spatialmath.Pose, error)
	PointCloudMapFunc func(ctx context.Context, returnEditedMap bool) (func() ([]byte, error), error)
	InternalStateFunc func(ctx context.Context) (func() ([]byte, error), error)
	PropertiesFunc    func(ctx context.Context) (slam.Properties, error)
	DoCommandFunc     func(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)
	CloseFunc         func(ctx context.Context) error
	// contains filtered or unexported fields
}

SLAMService represents a fake instance of a slam service.

func NewSLAMService added in v0.2.36

func NewSLAMService(name string) *SLAMService

NewSLAMService returns a new injected SLAM service.

func (*SLAMService) Close added in v0.2.36

func (slamSvc *SLAMService) Close(ctx context.Context) error

Close calls the injected Close or the real version.

func (*SLAMService) DoCommand added in v0.2.20

func (slamSvc *SLAMService) DoCommand(ctx context.Context,
	cmd map[string]interface{},
) (map[string]interface{}, error)

DoCommand calls the injected DoCommand or the real variant.

func (*SLAMService) InternalState added in v0.8.0

func (slamSvc *SLAMService) InternalState(ctx context.Context) (func() ([]byte, error), error)

InternalState calls the injected InternalState or the real version.

func (*SLAMService) Name added in v0.2.36

func (slamSvc *SLAMService) Name() resource.Name

Name returns the name of the resource.

func (*SLAMService) PointCloudMap added in v0.8.0

func (slamSvc *SLAMService) PointCloudMap(ctx context.Context, returnEditedMap bool) (func() ([]byte, error), error)

PointCloudMap calls the injected PointCloudMap or the real version.

func (*SLAMService) Position added in v0.1.0

func (slamSvc *SLAMService) Position(ctx context.Context) (spatialmath.Pose, error)

Position calls the injected PositionFunc or the real version.

func (*SLAMService) Properties added in v0.18.0

func (slamSvc *SLAMService) Properties(ctx context.Context) (slam.Properties, error)

Properties calls the injected PropertiesFunc or the real version.

type SPI

type SPI struct {
	buses.SPI
	OpenHandleFunc func() (buses.SPIHandle, error)
}

SPI is an injected SPI.

func (*SPI) OpenHandle

func (s *SPI) OpenHandle() (buses.SPIHandle, error)

OpenHandle calls the injected OpenHandle or the real version.

type Sensor

type Sensor struct {
	sensor.Sensor

	DoFunc       func(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)
	CloseFunc    func(ctx context.Context) error
	ReadingsFunc func(ctx context.Context, extra map[string]interface{}) (map[string]interface{}, error)
	// contains filtered or unexported fields
}

Sensor is an injected sensor.

func NewSensor added in v0.2.36

func NewSensor(name string) *Sensor

NewSensor returns a new injected sensor.

func (*Sensor) Close added in v0.47.0

func (s *Sensor) Close(ctx context.Context) error

Close calls the injected Close or the real version.

func (*Sensor) DoCommand added in v0.1.0

func (s *Sensor) DoCommand(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)

DoCommand calls the injected DoCommand or the real version.

func (*Sensor) Name added in v0.2.36

func (s *Sensor) Name() resource.Name

Name returns the name of the resource.

func (*Sensor) Readings added in v0.1.0

func (s *Sensor) Readings(ctx context.Context, extra map[string]interface{}) (map[string]interface{}, error)

Readings calls the injected Readings or the real version.

type SensorsService

type SensorsService struct {
	sensors.Service

	SensorsFunc   func(ctx context.Context, extra map[string]interface{}) ([]resource.Name, error)
	ReadingsFunc  func(ctx context.Context, resources []resource.Name, extra map[string]interface{}) ([]sensors.Readings, error)
	DoCommandFunc func(ctx context.Context,
		cmd map[string]interface{}) (map[string]interface{}, error)
	// contains filtered or unexported fields
}

SensorsService represents a fake instance of a sensors service.

func NewSensorsService added in v0.2.36

func NewSensorsService(name string) *SensorsService

NewSensorsService returns a new injected sensors service.

func (*SensorsService) DoCommand added in v0.2.20

func (s *SensorsService) DoCommand(ctx context.Context,
	cmd map[string]interface{},
) (map[string]interface{}, error)

DoCommand calls the injected DoCommand or the real variant.

func (*SensorsService) Name added in v0.2.36

func (s *SensorsService) Name() resource.Name

Name returns the name of the resource.

func (*SensorsService) Readings added in v0.1.0

func (s *SensorsService) Readings(ctx context.Context, names []resource.Name, extra map[string]interface{}) ([]sensors.Readings, error)

Readings call the injected Readings or the real one.

func (*SensorsService) Sensors added in v0.1.0

func (s *SensorsService) Sensors(ctx context.Context, extra map[string]interface{}) ([]resource.Name, error)

Sensors call the injected Sensors or the real one.

type Servo

type Servo struct {
	servo.Servo

	DoFunc       func(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)
	MoveFunc     func(ctx context.Context, angleDeg uint32, extra map[string]interface{}) error
	PositionFunc func(ctx context.Context, extra map[string]interface{}) (uint32, error)
	StopFunc     func(ctx context.Context, extra map[string]interface{}) error
	IsMovingFunc func(context.Context) (bool, error)
	// contains filtered or unexported fields
}

Servo is an injected servo.

func NewServo added in v0.2.36

func NewServo(name string) *Servo

NewServo returns a new injected servo.

func (*Servo) DoCommand added in v0.1.0

func (s *Servo) DoCommand(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)

DoCommand calls the injected DoCommand or the real version.

func (*Servo) IsMoving

func (s *Servo) IsMoving(ctx context.Context) (bool, error)

IsMoving calls the injected IsMoving or the real version.

func (*Servo) Move

func (s *Servo) Move(ctx context.Context, angleDeg uint32, extra map[string]interface{}) error

Move calls the injected Move or the real version.

func (*Servo) Name added in v0.2.36

func (s *Servo) Name() resource.Name

Name returns the name of the resource.

func (*Servo) Position added in v0.1.0

func (s *Servo) Position(ctx context.Context, extra map[string]interface{}) (uint32, error)

Position calls the injected Current or the real version.

func (*Servo) Stop

func (s *Servo) Stop(ctx context.Context, extra map[string]interface{}) error

Stop calls the injected Stop or the real version.

type ShellService added in v0.2.20

type ShellService struct {
	shell.Service

	DoCommandFunc func(ctx context.Context,
		cmd map[string]interface{}) (map[string]interface{}, error)
	ReconfigureFunc func(ctx context.Context, deps resource.Dependencies, conf resource.Config) error
	CloseFunc       func(ctx context.Context) error
	// contains filtered or unexported fields
}

ShellService represents a fake instance of a shell service.

func NewShellService added in v0.2.36

func NewShellService(name string) *ShellService

NewShellService returns a new injected shell service.

func (*ShellService) Close added in v0.2.36

func (s *ShellService) Close(ctx context.Context) error

Close calls the injected Close or the real version.

func (*ShellService) DoCommand added in v0.2.20

func (s *ShellService) DoCommand(ctx context.Context,
	cmd map[string]interface{},
) (map[string]interface{}, error)

DoCommand calls the injected DoCommand or the real variant.

func (*ShellService) Name added in v0.2.36

func (s *ShellService) Name() resource.Name

Name returns the name of the resource.

func (*ShellService) Reconfigure added in v0.2.36

func (s *ShellService) Reconfigure(ctx context.Context, deps resource.Dependencies, conf resource.Config) error

Reconfigure calls the injected Reconfigure or the real variant.

type TriggerableInputController

type TriggerableInputController struct {
	InputController
	input.Triggerable

	TriggerEventFunc func(ctx context.Context, event input.Event, extra map[string]interface{}) error
}

TriggerableInputController is an injected injectable InputController.

func (*TriggerableInputController) TriggerEvent

func (s *TriggerableInputController) TriggerEvent(ctx context.Context, event input.Event, extra map[string]interface{}) error

TriggerEvent calls the injected function or the real version.

type VisionService

type VisionService struct {
	vision.Service

	DetectionsFromCameraFunc func(
		ctx context.Context, cameraName string, extra map[string]interface{},
	) ([]objectdetection.Detection, error)
	DetectionsFunc func(
		ctx context.Context, img image.Image, extra map[string]interface{},
	) ([]objectdetection.Detection, error)
	// classification functions
	ClassificationsFromCameraFunc func(ctx context.Context, cameraName string,
		n int, extra map[string]interface{}) (classification.Classifications, error)
	ClassificationsFunc func(ctx context.Context, img image.Image,
		n int, extra map[string]interface{}) (classification.Classifications, error)
	// segmentation functions
	GetObjectPointCloudsFunc func(ctx context.Context, cameraName string, extra map[string]interface{}) ([]*viz.Object, error)
	GetPropertiesFunc        func(ctx context.Context, extra map[string]interface{}) (*vision.Properties, error)
	CaptureAllFromCameraFunc func(ctx context.Context,
		cameraName string,
		opts viscapture.CaptureOptions,
		extra map[string]interface{},
	) (viscapture.VisCapture, error)
	DoCommandFunc func(ctx context.Context,
		cmd map[string]interface{}) (map[string]interface{}, error)
	CloseFunc func(ctx context.Context) error
	// contains filtered or unexported fields
}

VisionService represents a fake instance of a vision service.

func NewVisionService added in v0.2.36

func NewVisionService(name string) *VisionService

NewVisionService returns a new injected vision service.

func (*VisionService) CaptureAllFromCamera added in v0.28.0

func (vs *VisionService) CaptureAllFromCamera(ctx context.Context,
	cameraName string,
	opts viscapture.CaptureOptions,
	extra map[string]interface{},
) (viscapture.VisCapture, error)

CaptureAllFromCamera calls the injected CaptureAllFromCamera or the real variant.

func (*VisionService) Classifications added in v0.1.0

func (vs *VisionService) Classifications(ctx context.Context, img image.Image,
	n int, extra map[string]interface{},
) (classification.Classifications, error)

Classifications calls the injected Classifier or the real variant.

func (*VisionService) ClassificationsFromCamera added in v0.1.0

func (vs *VisionService) ClassificationsFromCamera(ctx context.Context,
	cameraName string, n int, extra map[string]interface{},
) (classification.Classifications, error)

ClassificationsFromCamera calls the injected Classifer or the real variant.

func (*VisionService) Close added in v0.2.36

func (vs *VisionService) Close(ctx context.Context) error

Close calls the injected Close or the real version.

func (*VisionService) Detections added in v0.1.0

func (vs *VisionService) Detections(ctx context.Context, img image.Image, extra map[string]interface{},
) ([]objectdetection.Detection, error)

Detections calls the injected Detect or the real variant.

func (*VisionService) DetectionsFromCamera added in v0.1.0

func (vs *VisionService) DetectionsFromCamera(ctx context.Context, cameraName string, extra map[string]interface{},
) ([]objectdetection.Detection, error)

DetectionsFromCamera calls the injected DetectionsFromCamera or the real variant.

func (*VisionService) DoCommand added in v0.2.20

func (vs *VisionService) DoCommand(ctx context.Context,
	cmd map[string]interface{},
) (map[string]interface{}, error)

DoCommand calls the injected DoCommand or the real variant.

func (*VisionService) GetObjectPointClouds

func (vs *VisionService) GetObjectPointClouds(
	ctx context.Context,
	cameraName string, extra map[string]interface{},
) ([]*viz.Object, error)

GetObjectPointClouds calls the injected GetObjectPointClouds or the real variant.

func (*VisionService) GetProperties added in v0.28.0

func (vs *VisionService) GetProperties(
	ctx context.Context,
	extra map[string]interface{},
) (*vision.Properties, error)

GetProperties calls the injected GetProperties or the real variant.

func (*VisionService) Name added in v0.2.36

func (vs *VisionService) Name() resource.Name

Name returns the name of the resource.

Jump to

Keyboard shortcuts

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