responses

package
v0.0.0-...-c28e91b Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: Apache-2.0 Imports: 0 Imported by: 9

Documentation

Index

Constants

View Source
const (
	TypeSetAgentStatus = "AgentStatus"
	TypeUploadTestData = "TestData"
)

Response type constants.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	AgentUUID string `json:"agent_uuid"`
	Type      string `json:"type"`
}

Base is a struct that is intended to be embedded by specific response structs. Both of these in conjunction are used primarily to house the JSON message for passing responses over the comms package (i.e. message queue), but may also contain important dependencies of the response, such as an HTTP handler.

type Response

type Response interface{}

Response is an interface to define Response behavior

type SetAgentStatus

type SetAgentStatus struct {
	Base
	TestUUID string `json:"test_uuid"`
	Status   string `json:"status"`
}

SetAgentStatus defines this particular response.

func NewSetAgentStatus

func NewSetAgentStatus(agentUUID, testUUID, status string) SetAgentStatus

NewSetAgentStatus returns a new SetAgentStatus response.

type UploadTestData

type UploadTestData struct {
	Base
	TestUUID string `json:"test_uuid"`
	TestData string `json:"test_data"`
}

UploadTestData defines this particular response.

func NewUploadTestData

func NewUploadTestData(agentUUID, testUUID, testData string) UploadTestData

NewUploadTestData returns a new UploadTestData response.

Jump to

Keyboard shortcuts

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