manager

package
v0.0.0-...-683b059 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Overview

Package manager contains the go api for interacting the HTTP servers that manages callboxes.

Index

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

type SendSmsRequestBody struct {
	Callbox string
	Message string
}

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.

func (*TestFixture) SetUp

func (tf *TestFixture) SetUp(ctx context.Context, s *testing.FixtState) interface{}

SetUp sets up the test fixture and connects to the CallboxManager.

func (*TestFixture) TearDown

func (tf *TestFixture) TearDown(ctx context.Context, s *testing.FixtState)

TearDown shuts down the tunnel to the CallboxManager if one was created.

Jump to

Keyboard shortcuts

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