Documentation ¶
Index ¶
Constants ¶
View Source
const ( MockDataSourceWorkspacesBasic = `` /* 327-byte string literal not displayed */ MockResourceWorkspaceBasicCreate = `` /* 261-byte string literal not displayed */ MockResourceWorkspaceBasicGet = `` /* 327-byte string literal not displayed */ MockResourceWorkspaceBasicDelete = `{ "success": true, "message": "resource deleted successfully", "revision": 1 }` MockResourceWorkspaceWithSourceUpdate = `{ "success": true, "message": "OK", "revision": 1 }` MockResourceWorkspaceWithSourceGet = `` /* 339-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
func AssertMockEndpointsCalls ¶
func AssertMockEndpointsCalls(endpoints []*MockEndpoint) error
AssertMockEndpointsCalls asserts that the number of calls an endpoint got
func NewMockServer ¶
NewMockServer establishes a httptest server to simulate behaviour of Structurizr Server
Types ¶
type MockEndpoint ¶
type MockEndpoint struct { Request *MockRequest Response *MockResponse Calls int // contains filtered or unexported fields }
MockEndpoint represents a basic request and response that can be used for creating simple httptest server routes.
type MockRequest ¶
MockRequest represents a basic HTTP request
type MockResponse ¶
MockResponse represents a basic HTTP response.
Click to show internal directories.
Click to hide internal directories.