Documentation ¶
Index ¶
- type MysqlUserController
- func (c *MysqlUserController) CreateUser(w http.ResponseWriter, r *http.Request)
- func (c *MysqlUserController) DeleteUser(w http.ResponseWriter, r *http.Request)
- func (c *MysqlUserController) GetUserByName(w http.ResponseWriter, r *http.Request)
- func (c *MysqlUserController) GetUsers(w http.ResponseWriter, r *http.Request)
- func (c *MysqlUserController) Routes() openapi.Routes
- type MysqlUserRouter
- type MysqlUserService
- func (s *MysqlUserService) CreateUser(user openapi.User, apiKey string) (interface{}, error)
- func (s *MysqlUserService) DeleteUser(user string, apiKey string) (interface{}, error)
- func (s *MysqlUserService) GetUserByName(user string, apiKey string) (interface{}, error)
- func (s *MysqlUserService) GetUsers(apiKey string) (interface{}, error)
- type MysqlUserServicer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MysqlUserController ¶
type MysqlUserController struct {
// contains filtered or unexported fields
}
A MysqlUserController binds http requests to an api service and writes the service results to the http response
func (*MysqlUserController) CreateUser ¶
func (c *MysqlUserController) CreateUser(w http.ResponseWriter, r *http.Request)
CreateUser - create an on-demand user
func (*MysqlUserController) DeleteUser ¶
func (c *MysqlUserController) DeleteUser(w http.ResponseWriter, r *http.Request)
DeleteUser - Deletes a user
func (*MysqlUserController) GetUserByName ¶
func (c *MysqlUserController) GetUserByName(w http.ResponseWriter, r *http.Request)
GetUserByName - Get user properties
func (*MysqlUserController) GetUsers ¶
func (c *MysqlUserController) GetUsers(w http.ResponseWriter, r *http.Request)
GetUsers - list all users
func (*MysqlUserController) Routes ¶
func (c *MysqlUserController) Routes() openapi.Routes
Routes returns all of the api route for the MysqlUserController
type MysqlUserRouter ¶
type MysqlUserRouter interface { Routes() openapi.Routes CreateUser(http.ResponseWriter, *http.Request) DeleteUser(http.ResponseWriter, *http.Request) GetUserByName(http.ResponseWriter, *http.Request) GetUsers(http.ResponseWriter, *http.Request) }
MysqlUserRouter defines the required methods for binding the api requests to a responses for the MysqlApi The MysqlApiRouter implementation should parse necessary information from the http request, pass the data to a MysqlApiServicer to perform the required actions, then write the service results to the http response.
func NewMysqlUserController ¶
func NewMysqlUserController(s MysqlUserServicer) MysqlUserRouter
NewMysqlUserController creates a default api controller
type MysqlUserService ¶
MysqlUserService is a service that implents the logic for the MysqlUserServicer This service should implement the business logic for every endpoint for the MysqlUser API. Include any external packages or services that will be required by this service.
func (*MysqlUserService) CreateUser ¶
func (s *MysqlUserService) CreateUser(user openapi.User, apiKey string) (interface{}, error)
CreateUser - create an on-demand user
func (*MysqlUserService) DeleteUser ¶
func (s *MysqlUserService) DeleteUser(user string, apiKey string) (interface{}, error)
DeleteUser - Deletes a user
func (*MysqlUserService) GetUserByName ¶
func (s *MysqlUserService) GetUserByName(user string, apiKey string) (interface{}, error)
GetUserByName - Get user properties
func (*MysqlUserService) GetUsers ¶
func (s *MysqlUserService) GetUsers(apiKey string) (interface{}, error)
GetUsers - list all users
type MysqlUserServicer ¶
type MysqlUserServicer interface { CreateUser(openapi.User, string) (interface{}, error) DeleteUser(string, string) (interface{}, error) GetUserByName(string, string) (interface{}, error) GetUsers(string) (interface{}, error) }
MysqlUserServicer defines the api actions for the MysqlApi 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 NewMysqlUserService ¶
func NewMysqlUserService(db *sql.DB) MysqlUserServicer
NewMysqlUserService creates a default api service