mock

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPool

NewPool creates a network-server client pool which always returns the given client on Get.

Types

type Client

type Client struct {
	CreateServiceProfileChan     chan ns.CreateServiceProfileRequest
	CreateServiceProfileResponse ns.CreateServiceProfileResponse

	GetServiceProfileChan     chan ns.GetServiceProfileRequest
	GetServiceProfileResponse ns.GetServiceProfileResponse

	UpdateServiceProfileChan     chan ns.UpdateServiceProfileRequest
	UpdateServiceProfileResponse empty.Empty

	DeleteServiceProfileChan     chan ns.DeleteServiceProfileRequest
	DeleteServiceProfileResponse empty.Empty

	CreateRoutingProfileChan     chan ns.CreateRoutingProfileRequest
	CreateRoutingProfileResponse ns.CreateRoutingProfileResponse

	GetRoutingProfileChan     chan ns.GetRoutingProfileRequest
	GetRoutingProfileResponse ns.GetRoutingProfileResponse

	UpdateRoutingProfileChan     chan ns.UpdateRoutingProfileRequest
	UpdateRoutingProfileResponse empty.Empty

	DeleteRoutingProfileChan     chan ns.DeleteRoutingProfileRequest
	DeleteRoutingProfileResponse empty.Empty

	CreateDeviceProfileChan     chan ns.CreateDeviceProfileRequest
	CreateDeviceProfileResponse ns.CreateDeviceProfileResponse

	GetDeviceProfileChan     chan ns.GetDeviceProfileRequest
	GetDeviceProfileResponse ns.GetDeviceProfileResponse

	UpdateDeviceProfileChan     chan ns.UpdateDeviceProfileRequest
	UpdateDeviceProfileResponse empty.Empty

	DeleteDeviceProfileChan     chan ns.DeleteDeviceProfileRequest
	DeleteDeviceProfileResponse empty.Empty

	CreateDeviceChan     chan ns.CreateDeviceRequest
	CreateDeviceResponse empty.Empty

	GetDeviceChan     chan ns.GetDeviceRequest
	GetDeviceResponse ns.GetDeviceResponse

	UpdateDeviceChan     chan ns.UpdateDeviceRequest
	UpdateDeviceResponse empty.Empty

	DeleteDeviceChan     chan ns.DeleteDeviceRequest
	DeleteDeviceResponse empty.Empty

	ActivateDeviceChan     chan ns.ActivateDeviceRequest
	ActivateDeviceResponse empty.Empty

	DeactivateDeviceChan     chan ns.DeactivateDeviceRequest
	DeactivateDeviceResponse empty.Empty

	GetDeviceActivationChan     chan ns.GetDeviceActivationRequest
	GetDeviceActivationResponse ns.GetDeviceActivationResponse

	GetRandomDevAddrChan     chan empty.Empty
	GetRandomDevAddrResponse ns.GetRandomDevAddrResponse

	CreateMACCommandQueueItemChan     chan ns.CreateMACCommandQueueItemRequest
	CreateMACCommandQueueItemResponse empty.Empty

	SendProprietaryPayloadChan     chan ns.SendProprietaryPayloadRequest
	SendProprietaryPayloadResponse empty.Empty

	CreateGatewayChan     chan ns.CreateGatewayRequest
	CreateGatewayResponse empty.Empty

	GetGatewayChan     chan ns.GetGatewayRequest
	GetGatewayResponse ns.GetGatewayResponse

	UpdateGatewayChan     chan ns.UpdateGatewayRequest
	UpdateGatewayResponse empty.Empty

	DeleteGatewayChan     chan ns.DeleteGatewayRequest
	DeleteGatewayResponse empty.Empty

	GetGatewayStatsChan     chan ns.GetGatewayStatsRequest
	GetGatewayStatsResponse ns.GetGatewayStatsResponse

	CreateGatewayProfileChan     chan ns.CreateGatewayProfileRequest
	CreateGatewayProfileResponse ns.CreateGatewayProfileResponse

	GetGatewayProfileChan     chan ns.GetGatewayProfileRequest
	GetGatewayProfileResponse ns.GetGatewayProfileResponse

	UpdateGatewayProfileChan     chan ns.UpdateGatewayProfileRequest
	UpdateGatewayProfileResponse empty.Empty

	DeleteGatewayProfileChan     chan ns.DeleteGatewayProfileRequest
	DeleteGatewayProfileResponse empty.Empty

	CreateDeviceQueueItemChan     chan ns.CreateDeviceQueueItemRequest
	CreateDeviceQueueItemResponse empty.Empty

	FlushDeviceQueueForDevEUIChan     chan ns.FlushDeviceQueueForDevEUIRequest
	FlushDeviceQueueForDevEUIResponse empty.Empty

	GetDeviceQueueItemsForDevEUIChan     chan ns.GetDeviceQueueItemsForDevEUIRequest
	GetDeviceQueueItemsForDevEUIResponse ns.GetDeviceQueueItemsForDevEUIResponse

	GetNextDownlinkFCntForDevEUIChan     chan ns.GetNextDownlinkFCntForDevEUIRequest
	GetNextDownlinkFCntForDevEUIResponse ns.GetNextDownlinkFCntForDevEUIResponse

	CreateMulticastGroupChan     chan ns.CreateMulticastGroupRequest
	CreateMulticastGroupResponse ns.CreateMulticastGroupResponse

	GetMulticastGroupChan     chan ns.GetMulticastGroupRequest
	GetMulticastGroupResponse ns.GetMulticastGroupResponse

	UpdateMulticastGroupChan     chan ns.UpdateMulticastGroupRequest
	UpdateMulticastGroupResponse empty.Empty

	DeleteMulticastGroupChan     chan ns.DeleteMulticastGroupRequest
	DeleteMulticastGroupResponse empty.Empty

	AddDeviceToMulticastGroupChan     chan ns.AddDeviceToMulticastGroupRequest
	AddDeviceToMulticastGroupResponse empty.Empty

	RemoveDeviceFromMulticastGroupChan     chan ns.RemoveDeviceFromMulticastGroupRequest
	RemoveDeviceFromMulticastGroupResponse empty.Empty

	EnqueueMulticastQueueItemChan     chan ns.EnqueueMulticastQueueItemRequest
	EnqueueMulticastQueueItemResponse empty.Empty

	FlushMulticastQueueForMulticastGroupChan     chan ns.FlushMulticastQueueForMulticastGroupRequest
	FlushMulticastQueueForMulticastGroupResponse empty.Empty

	GetMulticastQueueItemsForMulticastGroupChan     chan ns.GetMulticastQueueItemsForMulticastGroupRequest
	GetMulticastQueueItemsForMulticastGroupResponse ns.GetMulticastQueueItemsForMulticastGroupResponse

	GenerateGatewayClientCertificateChan     chan ns.GenerateGatewayClientCertificateRequest
	GenerateGatewayClientCertificateResponse ns.GenerateGatewayClientCertificateResponse

	GetVersionResponse ns.GetVersionResponse

	GetADRAlgorithmsResponse ns.GetADRAlgorithmsResponse

	ClearDeviceNoncesChan     chan ns.ClearDeviceNoncesRequest
	ClearDeviceNoncesResponse empty.Empty
}

Client is a test network-server client.

func NewClient

func NewClient() *Client

NewClient creates a new Client.

func (*Client) ActivateDevice

func (n *Client) ActivateDevice(ctx context.Context, in *ns.ActivateDeviceRequest, opts ...grpc.CallOption) (*empty.Empty, error)

ActivateDevice method.

func (*Client) AddDeviceToMulticastGroup

func (n *Client) AddDeviceToMulticastGroup(ctx context.Context, in *ns.AddDeviceToMulticastGroupRequest, opts ...grpc.CallOption) (*empty.Empty, error)

AddDeviceToMulticastGroup method.

func (*Client) ClearDeviceNonces

func (n *Client) ClearDeviceNonces(ctx context.Context, in *ns.ClearDeviceNoncesRequest, opts ...grpc.CallOption) (*empty.Empty, error)

ClearDeviceNonces method.

func (*Client) CreateDevice

func (n *Client) CreateDevice(ctx context.Context, in *ns.CreateDeviceRequest, opts ...grpc.CallOption) (*empty.Empty, error)

CreateDevice method.

func (*Client) CreateDeviceProfile

func (n *Client) CreateDeviceProfile(ctx context.Context, in *ns.CreateDeviceProfileRequest, opts ...grpc.CallOption) (*ns.CreateDeviceProfileResponse, error)

CreateDeviceProfile method.

func (*Client) CreateDeviceQueueItem

func (n *Client) CreateDeviceQueueItem(ctx context.Context, in *ns.CreateDeviceQueueItemRequest, opts ...grpc.CallOption) (*empty.Empty, error)

CreateDeviceQueueItem method.

func (*Client) CreateGateway

func (n *Client) CreateGateway(ctx context.Context, in *ns.CreateGatewayRequest, opts ...grpc.CallOption) (*empty.Empty, error)

CreateGateway method.

func (*Client) CreateGatewayProfile

CreateGatewayProfile method.

func (*Client) CreateMACCommandQueueItem

func (n *Client) CreateMACCommandQueueItem(ctx context.Context, in *ns.CreateMACCommandQueueItemRequest, opts ...grpc.CallOption) (*empty.Empty, error)

CreateMACCommandQueueItem method.

func (*Client) CreateMulticastGroup

CreateMulticastGroup method.

func (*Client) CreateRoutingProfile

CreateRoutingProfile method.

func (*Client) CreateServiceProfile

CreateServiceProfile method.

func (*Client) DeactivateDevice

func (n *Client) DeactivateDevice(ctx context.Context, in *ns.DeactivateDeviceRequest, opts ...grpc.CallOption) (*empty.Empty, error)

DeactivateDevice method.

func (*Client) DeleteDevice

func (n *Client) DeleteDevice(ctx context.Context, in *ns.DeleteDeviceRequest, opts ...grpc.CallOption) (*empty.Empty, error)

DeleteDevice method.

func (*Client) DeleteDeviceProfile

func (n *Client) DeleteDeviceProfile(ctx context.Context, in *ns.DeleteDeviceProfileRequest, opts ...grpc.CallOption) (*empty.Empty, error)

DeleteDeviceProfile method.

func (*Client) DeleteGateway

func (n *Client) DeleteGateway(ctx context.Context, in *ns.DeleteGatewayRequest, opts ...grpc.CallOption) (*empty.Empty, error)

DeleteGateway method.

func (*Client) DeleteGatewayProfile

func (n *Client) DeleteGatewayProfile(ctx context.Context, in *ns.DeleteGatewayProfileRequest, opts ...grpc.CallOption) (*empty.Empty, error)

DeleteGatewayProfile method.

func (*Client) DeleteMulticastGroup

func (n *Client) DeleteMulticastGroup(ctx context.Context, in *ns.DeleteMulticastGroupRequest, opts ...grpc.CallOption) (*empty.Empty, error)

DeleteMulticastGroup method.

func (*Client) DeleteRoutingProfile

func (n *Client) DeleteRoutingProfile(ctx context.Context, in *ns.DeleteRoutingProfileRequest, opts ...grpc.CallOption) (*empty.Empty, error)

DeleteRoutingProfile method.

func (*Client) DeleteServiceProfile

func (n *Client) DeleteServiceProfile(ctx context.Context, in *ns.DeleteServiceProfileRequest, opts ...grpc.CallOption) (*empty.Empty, error)

DeleteServiceProfile method.

func (*Client) EnqueueMulticastQueueItem

func (n *Client) EnqueueMulticastQueueItem(ctx context.Context, in *ns.EnqueueMulticastQueueItemRequest, opts ...grpc.CallOption) (*empty.Empty, error)

EnqueueMulticastQueueItem method.

func (*Client) FlushDeviceQueueForDevEUI

func (n *Client) FlushDeviceQueueForDevEUI(ctx context.Context, in *ns.FlushDeviceQueueForDevEUIRequest, opts ...grpc.CallOption) (*empty.Empty, error)

FlushDeviceQueueForDevEUI method.

func (*Client) FlushMulticastQueueForMulticastGroup

func (n *Client) FlushMulticastQueueForMulticastGroup(ctx context.Context, in *ns.FlushMulticastQueueForMulticastGroupRequest, opts ...grpc.CallOption) (*empty.Empty, error)

FlushMulticastQueueForMulticastGroup method.

func (*Client) GenerateGatewayClientCertificate

GenerateGatewayClientCertificate method.

func (*Client) GetADRAlgorithms

func (n *Client) GetADRAlgorithms(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ns.GetADRAlgorithmsResponse, error)

GetADRAlgorithms method.

func (*Client) GetDevice

func (n *Client) GetDevice(ctx context.Context, in *ns.GetDeviceRequest, opts ...grpc.CallOption) (*ns.GetDeviceResponse, error)

GetDevice method.

func (*Client) GetDeviceActivation

func (n *Client) GetDeviceActivation(ctx context.Context, in *ns.GetDeviceActivationRequest, opts ...grpc.CallOption) (*ns.GetDeviceActivationResponse, error)

GetDeviceActivation method.

func (*Client) GetDeviceProfile

func (n *Client) GetDeviceProfile(ctx context.Context, in *ns.GetDeviceProfileRequest, opts ...grpc.CallOption) (*ns.GetDeviceProfileResponse, error)

GetDeviceProfile method.

func (*Client) GetDeviceQueueItemsForDevEUI

GetDeviceQueueItemsForDevEUI method.

func (*Client) GetGateway

func (n *Client) GetGateway(ctx context.Context, in *ns.GetGatewayRequest, opts ...grpc.CallOption) (*ns.GetGatewayResponse, error)

GetGateway method.

func (*Client) GetGatewayProfile

func (n *Client) GetGatewayProfile(ctx context.Context, in *ns.GetGatewayProfileRequest, opts ...grpc.CallOption) (*ns.GetGatewayProfileResponse, error)

GetGatewayProfile method.

func (*Client) GetGatewayStats

func (n *Client) GetGatewayStats(ctx context.Context, in *ns.GetGatewayStatsRequest, opts ...grpc.CallOption) (*ns.GetGatewayStatsResponse, error)

GetGatewayStats method.

func (*Client) GetMulticastGroup

func (n *Client) GetMulticastGroup(ctx context.Context, in *ns.GetMulticastGroupRequest, opts ...grpc.CallOption) (*ns.GetMulticastGroupResponse, error)

GetMulticastGroup method.

func (*Client) GetMulticastQueueItemsForMulticastGroup

GetMulticastQueueItemsForMulticastGroup method.

func (*Client) GetNextDownlinkFCntForDevEUI

GetNextDownlinkFCntForDevEUI method.

func (*Client) GetRandomDevAddr

func (n *Client) GetRandomDevAddr(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ns.GetRandomDevAddrResponse, error)

GetRandomDevAddr method.

func (*Client) GetRoutingProfile

func (n *Client) GetRoutingProfile(ctx context.Context, in *ns.GetRoutingProfileRequest, opts ...grpc.CallOption) (*ns.GetRoutingProfileResponse, error)

GetRoutingProfile method.

func (*Client) GetServiceProfile

func (n *Client) GetServiceProfile(ctx context.Context, in *ns.GetServiceProfileRequest, opts ...grpc.CallOption) (*ns.GetServiceProfileResponse, error)

GetServiceProfile method.

func (*Client) GetVersion

func (n *Client) GetVersion(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ns.GetVersionResponse, error)

GetVersion method.

func (*Client) RemoveDeviceFromMulticastGroup

func (n *Client) RemoveDeviceFromMulticastGroup(ctx context.Context, in *ns.RemoveDeviceFromMulticastGroupRequest, opts ...grpc.CallOption) (*empty.Empty, error)

RemoveDeviceFromMulticastGroup method.

func (*Client) SendProprietaryPayload

func (n *Client) SendProprietaryPayload(ctx context.Context, in *ns.SendProprietaryPayloadRequest, opts ...grpc.CallOption) (*empty.Empty, error)

SendProprietaryPayload method.

func (*Client) StreamFrameLogsForDevice

StreamFrameLogsForDevice method.

func (*Client) StreamFrameLogsForGateway

StreamFrameLogsForGateway method.

func (*Client) UpdateDevice

func (n *Client) UpdateDevice(ctx context.Context, in *ns.UpdateDeviceRequest, opts ...grpc.CallOption) (*empty.Empty, error)

UpdateDevice method.

func (*Client) UpdateDeviceProfile

func (n *Client) UpdateDeviceProfile(ctx context.Context, in *ns.UpdateDeviceProfileRequest, opts ...grpc.CallOption) (*empty.Empty, error)

UpdateDeviceProfile method.

func (*Client) UpdateGateway

func (n *Client) UpdateGateway(ctx context.Context, in *ns.UpdateGatewayRequest, opts ...grpc.CallOption) (*empty.Empty, error)

UpdateGateway method.

func (*Client) UpdateGatewayProfile

func (n *Client) UpdateGatewayProfile(ctx context.Context, in *ns.UpdateGatewayProfileRequest, opts ...grpc.CallOption) (*empty.Empty, error)

UpdateGatewayProfile method.

func (*Client) UpdateMulticastGroup

func (n *Client) UpdateMulticastGroup(ctx context.Context, in *ns.UpdateMulticastGroupRequest, opts ...grpc.CallOption) (*empty.Empty, error)

UpdateMulticastGroup method.

func (*Client) UpdateRoutingProfile

func (n *Client) UpdateRoutingProfile(ctx context.Context, in *ns.UpdateRoutingProfileRequest, opts ...grpc.CallOption) (*empty.Empty, error)

UpdateRoutingProfile method.

func (*Client) UpdateServiceProfile

func (n *Client) UpdateServiceProfile(ctx context.Context, in *ns.UpdateServiceProfileRequest, opts ...grpc.CallOption) (*empty.Empty, error)

UpdateServiceProfile method.

type Pool

type Pool struct {
	Client      ns.NetworkServerServiceClient
	GetHostname string
}

Pool is a network-server pool for testing.

func (*Pool) Get

func (p *Pool) Get(hostname string, caCert, tlsCert, tlsKey []byte) (ns.NetworkServerServiceClient, error)

Get returns the Client.

Jump to

Keyboard shortcuts

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