Documentation ¶
Index ¶
- Constants
- func JSON(w http.ResponseWriter, status int, data interface{})
- func JSONError(w http.ResponseWriter, status int, err string)
- func RunAPIServerContainer(ctx context.Context, port, label string, timeout time.Duration) error
- type CreateDBRequest
- type CreateDBResponse
- type RemoveDBRequest
- type Server
Constants ¶
View Source
const DefaultPort = "1988"
DefaultPort is the default port for the testing server
Variables ¶
This section is empty.
Functions ¶
func JSON ¶
func JSON(w http.ResponseWriter, status int, data interface{})
JSON writes the given status code and data to the ResponseWriter.
Types ¶
type CreateDBRequest ¶
type CreateDBRequest struct { Type string `json:"type"` Migrations string `json:"migrations"` Fixtures string `json:"fixtures"` // postgres instance information InstanceHost string `json:"instance_host"` InstancePort uint32 `json:"instance_port"` InstanceUser string `json:"instance_user"` InstancePass string `json:"instance_pass"` InstanceName string `json:"instance_name"` }
CreateDBRequest is the request body for creating a database
type CreateDBResponse ¶
type CreateDBResponse struct {
URI string `json:"uri"`
}
CreateDBResponse is the response body for creating a database
type RemoveDBRequest ¶
RemoveDBRequest is the request body for removing a database
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the testing server
func (*Server) CreateDB ¶
func (s *Server) CreateDB(w http.ResponseWriter, r *http.Request)
CreateDB creates a new database
Click to show internal directories.
Click to hide internal directories.