Documentation ¶
Overview ¶
Package openapi provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.13.0 DO NOT EDIT.
Package openapi provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.13.0 DO NOT EDIT.
Package openapi provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.13.0 DO NOT EDIT.
Index ¶
- Variables
- func GetSwagger() (swagger *openapi3.T, err error)
- func GptToken() (token string)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- func RegisterHandlers(router gin.IRouter, si ServerInterface)
- func RegisterHandlersWithOptions(router gin.IRouter, si ServerInterface, options GinServerOptions)
- type GinServerOptions
- type Message
- type MiddlewareFunc
- type ScottyChatInput
- type ScottyChatJSONRequestBody
- type ScottyChatOutput
- type ServerInterface
- type ServerInterfaceWrapper
Constants ¶
This section is empty.
Variables ¶
var GptClient *oapi.Client
Functions ¶
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.
func PathToRawSpec ¶
Constructs a synthetic filesystem for resolving external references when loading openapi specifications.
func RegisterHandlers ¶
func RegisterHandlers(router gin.IRouter, si ServerInterface)
RegisterHandlers creates http.Handler with routing matching OpenAPI spec.
func RegisterHandlersWithOptions ¶
func RegisterHandlersWithOptions(router gin.IRouter, si ServerInterface, options GinServerOptions)
RegisterHandlersWithOptions creates http.Handler with additional options
Types ¶
type GinServerOptions ¶
type GinServerOptions struct { BaseURL string Middlewares []MiddlewareFunc ErrorHandler func(*gin.Context, error, int) }
GinServerOptions provides options for the Gin server.
type Message ¶
type Message struct {
Message string `json:"message"`
}
Message defines model for Message.
type MiddlewareFunc ¶
type ScottyChatInput ¶
type ScottyChatInput struct { Message string `json:"message"` Stream *bool `json:"stream,omitempty"` User *string `json:"user,omitempty"` }
ScottyChatInput defines model for ScottyChatInput.
type ScottyChatJSONRequestBody ¶
type ScottyChatJSONRequestBody = ScottyChatInput
ScottyChatJSONRequestBody defines body for ScottyChat for application/json ContentType.
type ScottyChatOutput ¶
type ScottyChatOutput struct {
Messages []Message `json:"messages"`
}
ScottyChatOutput defines model for ScottyChatOutput.
type ServerInterface ¶
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct { Handler ServerInterface HandlerMiddlewares []MiddlewareFunc ErrorHandler func(*gin.Context, error, int) }
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) ScottyChat ¶
func (siw *ServerInterfaceWrapper) ScottyChat(c *gin.Context)
ScottyChat operation middleware