Documentation
¶
Index ¶
- func MakeConfig(t require.TestingT) service.Config
- func New(t require.TestingT, cfg service.Config, makeHandler service.MakeServiceHandler, ...) func()
- func SetUp(t require.TestingT, makeHandler service.MakeServiceHandler, ...) (tearDown func())
- type DefaultObserverHandler
- func (h *DefaultObserverHandler) CloseOnError() bool
- func (h *DefaultObserverHandler) GetDeviceID() string
- func (h *DefaultObserverHandler) OnGetResourceContent(_ context.Context, deviceID, resourceHref string, notification *pool.Message) error
- func (h *DefaultObserverHandler) OnObserveResource(_ context.Context, deviceID, resourceHref string, notification *pool.Message) error
- func (h *DefaultObserverHandler) PublishResources(req coapgwTestService.PublishRequest) error
- func (h *DefaultObserverHandler) RefreshToken(req coapgwService.CoapRefreshTokenReq) (coapgwService.CoapRefreshTokenResp, error)
- func (h *DefaultObserverHandler) SetAccessToken(accessToken string)
- func (h *DefaultObserverHandler) SetDeviceID(deviceID string)
- func (h *DefaultObserverHandler) SetRefreshToken(refreshToken string)
- func (h *DefaultObserverHandler) SignIn(req coapgwService.CoapSignInReq) (coapgwService.CoapSignInResp, error)
- func (h *DefaultObserverHandler) SignOff() error
- func (h *DefaultObserverHandler) SignOut(req coapgwService.CoapSignInReq) error
- func (h *DefaultObserverHandler) SignUp(req coapgwService.CoapSignUpRequest) (coapgwService.CoapSignUpResponse, error)
- func (h *DefaultObserverHandler) UnpublishResources(req coapgwTestService.UnpublishRequest) error
- func (h *DefaultObserverHandler) UpdateTwinSynchronization(_ context.Context, deviceID string, status commands.TwinSynchronization_State, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(t require.TestingT, cfg service.Config, makeHandler service.MakeServiceHandler, verifyOnClose service.VerifyServiceHandler) func()
func SetUp ¶
func SetUp(t require.TestingT, makeHandler service.MakeServiceHandler, verifyOnClose service.VerifyServiceHandler) (tearDown func())
Types ¶
type DefaultObserverHandler ¶
type DefaultObserverHandler struct {
// contains filtered or unexported fields
}
Default test observer handler
It implements ServiceHandler interface by just logging the called method and returning default response and no error (if required).
func MakeDefaultObserverHandler ¶
func MakeDefaultObserverHandler(accessTokenLifetime int64) DefaultObserverHandler
func (*DefaultObserverHandler) CloseOnError ¶ added in v2.7.8
func (h *DefaultObserverHandler) CloseOnError() bool
func (*DefaultObserverHandler) GetDeviceID ¶
func (h *DefaultObserverHandler) GetDeviceID() string
func (*DefaultObserverHandler) OnGetResourceContent ¶
func (*DefaultObserverHandler) OnObserveResource ¶
func (*DefaultObserverHandler) PublishResources ¶
func (h *DefaultObserverHandler) PublishResources(req coapgwTestService.PublishRequest) error
func (*DefaultObserverHandler) RefreshToken ¶
func (h *DefaultObserverHandler) RefreshToken(req coapgwService.CoapRefreshTokenReq) (coapgwService.CoapRefreshTokenResp, error)
func (*DefaultObserverHandler) SetAccessToken ¶ added in v2.7.8
func (h *DefaultObserverHandler) SetAccessToken(accessToken string)
func (*DefaultObserverHandler) SetDeviceID ¶
func (h *DefaultObserverHandler) SetDeviceID(deviceID string)
func (*DefaultObserverHandler) SetRefreshToken ¶ added in v2.7.8
func (h *DefaultObserverHandler) SetRefreshToken(refreshToken string)
func (*DefaultObserverHandler) SignIn ¶
func (h *DefaultObserverHandler) SignIn(req coapgwService.CoapSignInReq) (coapgwService.CoapSignInResp, error)
func (*DefaultObserverHandler) SignOff ¶
func (h *DefaultObserverHandler) SignOff() error
func (*DefaultObserverHandler) SignOut ¶
func (h *DefaultObserverHandler) SignOut(req coapgwService.CoapSignInReq) error
func (*DefaultObserverHandler) SignUp ¶
func (h *DefaultObserverHandler) SignUp(req coapgwService.CoapSignUpRequest) (coapgwService.CoapSignUpResponse, error)
func (*DefaultObserverHandler) UnpublishResources ¶
func (h *DefaultObserverHandler) UnpublishResources(req coapgwTestService.UnpublishRequest) error
func (*DefaultObserverHandler) UpdateTwinSynchronization ¶ added in v2.6.0
func (h *DefaultObserverHandler) UpdateTwinSynchronization(_ context.Context, deviceID string, status commands.TwinSynchronization_State, t time.Time) error
Click to show internal directories.
Click to hide internal directories.