Documentation ¶
Index ¶
- type MysqlDatabaseController
- func (c *MysqlDatabaseController) CreateDatabase(w http.ResponseWriter, r *http.Request)
- func (c *MysqlDatabaseController) DeleteDatabase(w http.ResponseWriter, r *http.Request)
- func (c *MysqlDatabaseController) GetDatabaseByName(w http.ResponseWriter, r *http.Request)
- func (c *MysqlDatabaseController) GetDatabases(w http.ResponseWriter, r *http.Request)
- func (c *MysqlDatabaseController) Routes() openapi.Routes
- type MysqlDatabaseRouter
- type MysqlDatabaseService
- func (s *MysqlDatabaseService) CreateDatabase(database openapi.Database, apiKey string) (interface{}, error)
- func (s *MysqlDatabaseService) DeleteDatabase(database string, apiKey string) (interface{}, error)
- func (s *MysqlDatabaseService) GetDatabaseByName(database string, apiKey string) (interface{}, error)
- func (s *MysqlDatabaseService) GetDatabases(apiKey string) (interface{}, error)
- type MysqlDatabaseServicer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MysqlDatabaseController ¶
type MysqlDatabaseController struct {
// contains filtered or unexported fields
}
A MysqlDatabaseController binds http requests to an api service and writes the service results to the http response
func (*MysqlDatabaseController) CreateDatabase ¶
func (c *MysqlDatabaseController) CreateDatabase(w http.ResponseWriter, r *http.Request)
CreateDatabase - create an on-demand database
func (*MysqlDatabaseController) DeleteDatabase ¶
func (c *MysqlDatabaseController) DeleteDatabase(w http.ResponseWriter, r *http.Request)
DeleteDatabase - Deletes a database
func (*MysqlDatabaseController) GetDatabaseByName ¶
func (c *MysqlDatabaseController) GetDatabaseByName(w http.ResponseWriter, r *http.Request)
GetDatabaseByName - Get Database properties
func (*MysqlDatabaseController) GetDatabases ¶
func (c *MysqlDatabaseController) GetDatabases(w http.ResponseWriter, r *http.Request)
GetDatabases - list all databases
func (*MysqlDatabaseController) Routes ¶
func (c *MysqlDatabaseController) Routes() openapi.Routes
Routes returns all of the api route for the MysqlDatabaseController
type MysqlDatabaseRouter ¶
type MysqlDatabaseRouter interface { Routes() openapi.Routes CreateDatabase(http.ResponseWriter, *http.Request) DeleteDatabase(http.ResponseWriter, *http.Request) GetDatabaseByName(http.ResponseWriter, *http.Request) GetDatabases(http.ResponseWriter, *http.Request) }
MysqlDatabaseRouter defines the required methods for binding the api requests to a responses for the MysqlDatabase The MysqlDatabaseRouter implementation should parse necessary information from the http request, pass the data to a MysqlDatabaseServicer to perform the required actions, then write the service results to the http response.
func NewMysqlDatabaseController ¶
func NewMysqlDatabaseController(s MysqlDatabaseServicer) MysqlDatabaseRouter
NewMysqlDatabaseController creates a default api controller
type MysqlDatabaseService ¶
MysqlDatabaseService is a service that implents the logic for the MysqlDatabaseServicer This service should implement the business logic for every endpoint for the MysqlDatabase API. Include any external packages or services that will be required by this service.
func (*MysqlDatabaseService) CreateDatabase ¶
func (s *MysqlDatabaseService) CreateDatabase(database openapi.Database, apiKey string) (interface{}, error)
CreateDatabase - create an on-demand database
func (*MysqlDatabaseService) DeleteDatabase ¶
func (s *MysqlDatabaseService) DeleteDatabase(database string, apiKey string) (interface{}, error)
DeleteDatabase - Deletes a database
func (*MysqlDatabaseService) GetDatabaseByName ¶
func (s *MysqlDatabaseService) GetDatabaseByName(database string, apiKey string) (interface{}, error)
GetDatabaseByName - Get Database properties
func (*MysqlDatabaseService) GetDatabases ¶
func (s *MysqlDatabaseService) GetDatabases(apiKey string) (interface{}, error)
GetDatabases - list all databases
type MysqlDatabaseServicer ¶
type MysqlDatabaseServicer interface { CreateDatabase(openapi.Database, string) (interface{}, error) DeleteDatabase(string, string) (interface{}, error) GetDatabaseByName(string, string) (interface{}, error) GetDatabases(string) (interface{}, error) }
MysqlDatabaseServicer defines the api actions for the MysqlDatabase service This interface intended to stay up to date with the openapi yaml used to generate it, while the service implementation can ignored with the .openapi-generator-ignore file and updated with the logic required for the API.
func NewMysqlDatabaseService ¶
func NewMysqlDatabaseService(db *sql.DB) MysqlDatabaseServicer
NewMysqlDatabaseService creates a default api service