Documentation
¶
Index ¶
- func LoadConfig(path string)
- func RootHandler(w http.ResponseWriter, r *http.Request)
- type OpenApe
- func (oape *OpenApe) APIAuthHandler(next http.Handler) http.Handler
- func (oape *OpenApe) AddRoute(path string, method string, model string)
- func (oape *OpenApe) GetModelFromPath(path string) string
- func (oape *OpenApe) MapModels(models map[string]*openapi3.SchemaRef)
- func (oape *OpenApe) MapRoutes(paths map[string]*openapi3.PathItem)
- func (oape *OpenApe) RunServer()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RootHandler ¶
func RootHandler(w http.ResponseWriter, r *http.Request)
RootHandler responds to / request
Types ¶
type OpenApe ¶
type OpenApe struct {
// contains filtered or unexported fields
}
OpenApe object to hold objects related to the server
func (*OpenApe) APIAuthHandler ¶
APIAuthHandler matches API key with user details stored
func (*OpenApe) AddRoute ¶
AddRoute takes a path and a method to create a route handler for a Mux router instance
func (*OpenApe) GetModelFromPath ¶
GetModelFromPath identifies which routes maps to which models identified in the Schemas of the spec
func (*OpenApe) MapModels ¶
MapModels reads the models from the provided swagger file and creates the correspdonding tables in Postgres
Click to show internal directories.
Click to hide internal directories.