Documentation ¶
Index ¶
Constants ¶
const CreateRequest = `` /* 158-byte string literal not displayed */
CreateRequest provides the input to a Create request.
const GetResponse = `` /* 583-byte string literal not displayed */
GetResponse provides a Get result.
const ListResponse = `` /* 1347-byte string literal not displayed */
ListResponse provides a single page of RESOURCE results.
Variables ¶
var ExpectedOrdersSlice = []orders.Order{FirstOrder, SecondOrder}
ExpectedOrdersSlice is the slice of orders expected to be returned from ListResponse.
var FirstOrder = orders.Order{ Created: time.Date(2018, 6, 22, 5, 5, 43, 0, time.UTC), CreatorID: "5c70d99f4a8641c38f8084b32b5e5c0e", Meta: orders.Meta{ Algorithm: "aes", BitLength: 256, Mode: "cbc", PayloadContentType: "application/octet-stream", }, OrderRef: "http://barbican:9311/v1/orders/46f73695-82bb-447a-bf96-6635f0fb0ce7", SecretRef: "http://barbican:9311/v1/secrets/22dfef44-1046-4549-a86d-95af462e8fa0", Status: "ACTIVE", SubStatus: "Unknown", SubStatusMessage: "Unknown", Type: "key", Updated: time.Date(2018, 6, 22, 5, 5, 43, 0, time.UTC), }
FirstOrder is the first resource in the List request.
var SecondOrder = orders.Order{ Created: time.Date(2018, 6, 22, 5, 8, 15, 0, time.UTC), CreatorID: "5c70d99f4a8641c38f8084b32b5e5c0e", Meta: orders.Meta{ Algorithm: "aes", BitLength: 256, Mode: "cbc", PayloadContentType: "application/octet-stream", }, OrderRef: "http://barbican:9311/v1/orders/07fba88b-3dcf-44e3-a4a3-0bad7f56f01c", SecretRef: "http://barbican:9311/v1/secrets/a31ad551-1aa5-4ba0-810e-0865163e0fa9", Status: "ACTIVE", SubStatus: "Unknown", SubStatusMessage: "Unknown", Type: "key", Updated: time.Date(2018, 6, 22, 5, 8, 15, 0, time.UTC), }
SecondOrder is the second resource in the List request.
Functions ¶
func HandleCreateOrderSuccessfully ¶
HandleCreateOrderSuccessfully creates an HTTP handler at `/orders` on the test handler mux that tests resource creation.
func HandleDeleteOrderSuccessfully ¶
HandleDeleteOrderSuccessfully creates an HTTP handler at `/orders` on the test handler mux that tests resource deletion.
func HandleGetOrderSuccessfully ¶
HandleGetOrderSuccessfully creates an HTTP handler at `/orders` on the test handler mux that responds with a single resource.
func HandleListOrdersSuccessfully ¶
HandleListOrdersSuccessfully creates an HTTP handler at `/orders` on the test handler mux that responds with a list of two orders.
Types ¶
This section is empty.