Documentation ¶
Overview ¶
Package mocks offers dedicated mocking interface / structures for testing
Index ¶
- type AppClient
- type AuthBrokerClient
- func (m *AuthBrokerClient) DeleteDevice(ctx context.Context, in *core.DeleteDeviceBrokerReq, opts ...grpc.CallOption) (*core.DeleteDeviceBrokerRes, error)
- func (m *AuthBrokerClient) HandleData(ctx context.Context, in *core.DataBrokerReq, opts ...grpc.CallOption) (*core.DataBrokerRes, error)
- func (m *AuthBrokerClient) HandleJoin(ctx context.Context, in *core.JoinBrokerReq, opts ...grpc.CallOption) (*core.JoinBrokerRes, error)
- func (m *AuthBrokerClient) UpsertABP(ctx context.Context, in *core.UpsertABPBrokerReq, opts ...grpc.CallOption) (*core.UpsertABPBrokerRes, error)
- func (m *AuthBrokerClient) ValidateOTAA(ctx context.Context, in *core.ValidateOTAABrokerReq, opts ...grpc.CallOption) (*core.ValidateOTAABrokerRes, error)
- func (m *AuthBrokerClient) ValidateToken(ctx context.Context, in *core.ValidateTokenBrokerReq, opts ...grpc.CallOption) (*core.ValidateTokenBrokerRes, error)
- type DutyManager
- type HandlerClient
- func (m *HandlerClient) HandleDataDown(ctx context.Context, in *core.DataDownHandlerReq, opts ...grpc.CallOption) (*core.DataDownHandlerRes, error)
- func (m *HandlerClient) HandleDataUp(ctx context.Context, in *core.DataUpHandlerReq, opts ...grpc.CallOption) (*core.DataUpHandlerRes, error)
- func (m *HandlerClient) HandleJoin(ctx context.Context, in *core.JoinHandlerReq, opts ...grpc.CallOption) (*core.JoinHandlerRes, error)
- type HandlerServer
- func (m *HandlerServer) HandleDataDown(ctx context.Context, in *core.DataDownHandlerReq) (*core.DataDownHandlerRes, error)
- func (m *HandlerServer) HandleDataUp(ctx context.Context, in *core.DataUpHandlerReq) (*core.DataUpHandlerRes, error)
- func (m *HandlerServer) HandleJoin(ctx context.Context, in *core.JoinHandlerReq) (*core.JoinHandlerRes, error)
- type RouterServer
- func (m *RouterServer) HandleData(ctx context.Context, in *core.DataRouterReq) (*core.DataRouterRes, error)
- func (m *RouterServer) HandleJoin(ctx context.Context, in *core.JoinRouterReq) (*core.JoinRouterRes, error)
- func (m *RouterServer) HandleStats(ctx context.Context, in *core.StatsReq) (*core.StatsRes, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppClient ¶
type AppClient struct { Failures map[string]error InHandleData struct { Ctx context.Context Req *core.DataAppReq Opts []grpc.CallOption } OutHandleData struct { Res *core.DataAppRes } InHandleJoin struct { Ctx context.Context Req *core.JoinAppReq Opts []grpc.CallOption } OutHandleJoin struct { Res *core.JoinAppRes } }
AppClient mocks the core.AppClient interface
func (*AppClient) HandleData ¶
func (m *AppClient) HandleData(ctx context.Context, in *core.DataAppReq, opts ...grpc.CallOption) (*core.DataAppRes, error)
HandleData implements the core.AppClient interface
func (*AppClient) HandleJoin ¶
func (m *AppClient) HandleJoin(ctx context.Context, in *core.JoinAppReq, opts ...grpc.CallOption) (*core.JoinAppRes, error)
HandleJoin implements the core.AppClient interface
type AuthBrokerClient ¶
type AuthBrokerClient struct { Failures map[string]error InHandleData struct { Ctx context.Context Req *core.DataBrokerReq Opts []grpc.CallOption } OutHandleData struct { Res *core.DataBrokerRes } InHandleJoin struct { Ctx context.Context Req *core.JoinBrokerReq Opts []grpc.CallOption } OutHandleJoin struct { Res *core.JoinBrokerRes } InUpsertABP struct { Ctx context.Context Req *core.UpsertABPBrokerReq Opts []grpc.CallOption } OutUpsertABP struct { Res *core.UpsertABPBrokerRes } InValidateOTAA struct { Ctx context.Context Req *core.ValidateOTAABrokerReq Opts []grpc.CallOption } OutValidateOTAA struct { Res *core.ValidateOTAABrokerRes } InValidateToken struct { Ctx context.Context Req *core.ValidateTokenBrokerReq Opts []grpc.CallOption } OutValidateToken struct { Res *core.ValidateTokenBrokerRes } }
AuthBrokerClient mocks the core.AuthBrokerClient interface
func NewAuthBrokerClient ¶
func NewAuthBrokerClient() *AuthBrokerClient
NewAuthBrokerClient creates a new mock AuthBrokerClient
func (*AuthBrokerClient) DeleteDevice ¶
func (m *AuthBrokerClient) DeleteDevice(ctx context.Context, in *core.DeleteDeviceBrokerReq, opts ...grpc.CallOption) (*core.DeleteDeviceBrokerRes, error)
DeleteDevice implements the core.Broker interface
func (*AuthBrokerClient) HandleData ¶
func (m *AuthBrokerClient) HandleData(ctx context.Context, in *core.DataBrokerReq, opts ...grpc.CallOption) (*core.DataBrokerRes, error)
HandleData implements the core.Broker interface
func (*AuthBrokerClient) HandleJoin ¶
func (m *AuthBrokerClient) HandleJoin(ctx context.Context, in *core.JoinBrokerReq, opts ...grpc.CallOption) (*core.JoinBrokerRes, error)
HandleJoin implements the core.Broker interface
func (*AuthBrokerClient) UpsertABP ¶
func (m *AuthBrokerClient) UpsertABP(ctx context.Context, in *core.UpsertABPBrokerReq, opts ...grpc.CallOption) (*core.UpsertABPBrokerRes, error)
UpsertABP implements the core.Broker interface
func (*AuthBrokerClient) ValidateOTAA ¶
func (m *AuthBrokerClient) ValidateOTAA(ctx context.Context, in *core.ValidateOTAABrokerReq, opts ...grpc.CallOption) (*core.ValidateOTAABrokerRes, error)
ValidateOTAA implements the core.Broker interface
func (*AuthBrokerClient) ValidateToken ¶
func (m *AuthBrokerClient) ValidateToken(ctx context.Context, in *core.ValidateTokenBrokerReq, opts ...grpc.CallOption) (*core.ValidateTokenBrokerRes, error)
ValidateToken implements the core.Broker interface
type DutyManager ¶
type DutyManager struct { Failures map[string]error InUpdate struct { ID []byte Freq float32 Size uint32 Datr string Codr string } InLookup struct { ID []byte } OutLookup struct { Cycles dutycycle.Cycles } InClose struct { Called bool } }
DutyManager mocks the dutycycle.DutyManager interface
func NewDutyManager ¶
func NewDutyManager() *DutyManager
NewDutyManager creates a new mock DutyManager
func (*DutyManager) Close ¶
func (m *DutyManager) Close() error
Close implements the dutycycle.DutyManager interface
type HandlerClient ¶
type HandlerClient struct { Failures map[string]error InHandleJoin struct { Ctx context.Context Req *core.JoinHandlerReq Opts []grpc.CallOption } OutHandleJoin struct { Res *core.JoinHandlerRes } InHandleDataUp struct { Ctx context.Context Req *core.DataUpHandlerReq Opts []grpc.CallOption } OutHandleDataUp struct { Res *core.DataUpHandlerRes } InHandleDataDown struct { Ctx context.Context Req *core.DataDownHandlerReq Opts []grpc.CallOption } OutHandleDataDown struct { Res *core.DataDownHandlerRes } }
HandlerClient mocks the core.HandlerClient interface
func NewHandlerClient ¶
func NewHandlerClient() *HandlerClient
NewHandlerClient creates a new mock HandlerClient
func (*HandlerClient) HandleDataDown ¶
func (m *HandlerClient) HandleDataDown(ctx context.Context, in *core.DataDownHandlerReq, opts ...grpc.CallOption) (*core.DataDownHandlerRes, error)
HandleDataDown implements the core.HandlerClient interface
func (*HandlerClient) HandleDataUp ¶
func (m *HandlerClient) HandleDataUp(ctx context.Context, in *core.DataUpHandlerReq, opts ...grpc.CallOption) (*core.DataUpHandlerRes, error)
HandleDataUp implements the core.HandlerClient interface
func (*HandlerClient) HandleJoin ¶
func (m *HandlerClient) HandleJoin(ctx context.Context, in *core.JoinHandlerReq, opts ...grpc.CallOption) (*core.JoinHandlerRes, error)
HandleJoin implements the core.HandlerClient interface
type HandlerServer ¶
type HandlerServer struct { Failures map[string]error InHandleDataUp struct { Ctx context.Context Req *core.DataUpHandlerReq } OutHandleDataUp struct { Res *core.DataUpHandlerRes } InHandleDataDown struct { Ctx context.Context Req *core.DataDownHandlerReq } OutHandleDataDown struct { Res *core.DataDownHandlerRes } InHandleJoin struct { Ctx context.Context Req *core.JoinHandlerReq } OutHandleJoin struct { Res *core.JoinHandlerRes } }
HandlerServer mocks the core.HandlerServer interface
func NewHandlerServer ¶
func NewHandlerServer() *HandlerServer
NewHandlerServer creates a new mock HandlerServer
func (*HandlerServer) HandleDataDown ¶
func (m *HandlerServer) HandleDataDown(ctx context.Context, in *core.DataDownHandlerReq) (*core.DataDownHandlerRes, error)
HandleDataDown implements the core.HandlerServer interface
func (*HandlerServer) HandleDataUp ¶
func (m *HandlerServer) HandleDataUp(ctx context.Context, in *core.DataUpHandlerReq) (*core.DataUpHandlerRes, error)
HandleDataUp implements the core.HandlerServer interface
func (*HandlerServer) HandleJoin ¶
func (m *HandlerServer) HandleJoin(ctx context.Context, in *core.JoinHandlerReq) (*core.JoinHandlerRes, error)
HandleJoin implements the core.HandlerServer interface
type RouterServer ¶
type RouterServer struct { Failures map[string]error InHandleData struct { Ctx context.Context Req *core.DataRouterReq } OutHandleData struct { Res *core.DataRouterRes } InHandleStats struct { Ctx context.Context Req *core.StatsReq } OutHandleStats struct { Res *core.StatsRes } InHandleJoin struct { Ctx context.Context Req *core.JoinRouterReq } OutHandleJoin struct { Res *core.JoinRouterRes } }
RouterServer mocks the core.RouterServer interface
func NewRouterServer ¶
func NewRouterServer() *RouterServer
NewRouterServer creates a new mock RouterServer
func (*RouterServer) HandleData ¶
func (m *RouterServer) HandleData(ctx context.Context, in *core.DataRouterReq) (*core.DataRouterRes, error)
HandleData implements the core.RouterServer interface
func (*RouterServer) HandleJoin ¶
func (m *RouterServer) HandleJoin(ctx context.Context, in *core.JoinRouterReq) (*core.JoinRouterRes, error)
HandleJoin implements the core.RouterServer interface
func (*RouterServer) HandleStats ¶
HandleStats implements the core.RouterServer interface