Documentation ¶
Overview ¶
Package manager contains the go api for interacting the HTTP servers that manages callboxes.
Index ¶
- type BeginSimulationRequestBody
- type CallboxManagerClient
- func (s CallboxManagerClient) BeginSimulation(ctx context.Context, requestBody *BeginSimulationRequestBody) error
- func (s CallboxManagerClient) ConfigureCallbox(ctx context.Context, requestBody *ConfigureCallboxRequestBody) error
- func (s CallboxManagerClient) SendSms(ctx context.Context, requestBody *SendSmsRequestBody) error
- type ConfigureCallboxRequestBody
- type RequestBody
- type SendSmsRequestBody
- type TestFixture
- func (tf TestFixture) PostTest(ctx context.Context, s *testing.FixtTestState)
- func (tf *TestFixture) PreTest(ctx context.Context, s *testing.FixtTestState)
- func (tf *TestFixture) Reset(ctx context.Context) error
- func (tf *TestFixture) SetUp(ctx context.Context, s *testing.FixtState) interface{}
- func (tf *TestFixture) TearDown(ctx context.Context, s *testing.FixtState)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BeginSimulationRequestBody ¶
type BeginSimulationRequestBody struct {
Callbox string
}
BeginSimulationRequestBody is the request body for BeginSimulation requests.
func (*BeginSimulationRequestBody) Marshall ¶
func (r *BeginSimulationRequestBody) Marshall() ([]byte, error)
Marshall marshals this object into a byte array.
type CallboxManagerClient ¶
type CallboxManagerClient struct {
// contains filtered or unexported fields
}
CallboxManagerClient is an HTTP client wrapper for making requests to a Callbox Manager service.
func (CallboxManagerClient) BeginSimulation ¶
func (s CallboxManagerClient) BeginSimulation(ctx context.Context, requestBody *BeginSimulationRequestBody) error
BeginSimulation instructs the server's configured callbox to begin the simulation.
Before calling this method, configure the callbox with ConfigureCallbox.
func (CallboxManagerClient) ConfigureCallbox ¶
func (s CallboxManagerClient) ConfigureCallbox(ctx context.Context, requestBody *ConfigureCallboxRequestBody) error
ConfigureCallbox configures a callbox using the settings specified in the requestBody.
Note: With the current prototype version of the server, only one callbox may be configured at a time. If there is any error with this configuration, you must view the server logs directly as no useful information will be returned here aside from raising an error if the config fails.
func (CallboxManagerClient) SendSms ¶
func (s CallboxManagerClient) SendSms(ctx context.Context, requestBody *SendSmsRequestBody) error
SendSms instructs the server's configured callbox to send an sms message.
Before calling this method, configure the callbox with ConfigureCallbox.
type ConfigureCallboxRequestBody ¶
type ConfigureCallboxRequestBody struct { Callbox string Hardware string CellularType string ParameterList []string }
ConfigureCallboxRequestBody is the request body for ConfigureCallbox requests.
func (*ConfigureCallboxRequestBody) Marshall ¶
func (r *ConfigureCallboxRequestBody) Marshall() ([]byte, error)
Marshall marshals this object into a byte array.
type RequestBody ¶
type RequestBody interface { // Marshall marshals this object into a byte array. Marshall() ([]byte, error) }
RequestBody is a request object that can be marshalled into a byte array.
type SendSmsRequestBody ¶
SendSmsRequestBody is the request body for SendSms requests.
func (*SendSmsRequestBody) Marshall ¶
func (r *SendSmsRequestBody) Marshall() ([]byte, error)
Marshall marshals this object into a byte array.
type TestFixture ¶
type TestFixture struct { CallboxManagerClient *CallboxManagerClient Vars fixtureVars // contains filtered or unexported fields }
TestFixture is the test fixture used for callboxManagedFixture fixtures.
func (TestFixture) PostTest ¶
func (tf TestFixture) PostTest(ctx context.Context, s *testing.FixtTestState)
PostTest does nothing currently, but is required for the test fixture.
func (*TestFixture) PreTest ¶
func (tf *TestFixture) PreTest(ctx context.Context, s *testing.FixtTestState)
PreTest does nothing currently, but is required for the test fixture.
func (*TestFixture) Reset ¶
func (tf *TestFixture) Reset(ctx context.Context) error
Reset does nothing currently, but is required for the test fixture.