Documentation ¶
Overview ¶
Package solarisapi provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.16.2 DO NOT EDIT.
Index ¶
- func GetSwagger() (swagger *openapi3.T, err error)
- 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 CreateLogJSONRequestBody
- type CreateLogRequest
- type CreateRecordRequest
- type CreateRecordsJSONRequestBody
- type CreateRecordsRequest
- type CreateRecordsResponse
- type DeleteLogsJSONRequestBody
- type DeleteLogsRequest
- type DeleteLogsResponse
- type Desc
- type FromPageId
- type GinServerOptions
- type Limit
- type Log
- type LogId
- type LogIds
- type LogsCondFilter
- type MiddlewareFunc
- type QueryLogsParams
- type QueryLogsResult
- type QueryRecordsParams
- type QueryRecordsResult
- type Record
- type RecordsCondFilter
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) CreateLog(c *gin.Context)
- func (siw *ServerInterfaceWrapper) CreateRecords(c *gin.Context)
- func (siw *ServerInterfaceWrapper) DeleteLogs(c *gin.Context)
- func (siw *ServerInterfaceWrapper) Ping(c *gin.Context)
- func (siw *ServerInterfaceWrapper) QueryLogs(c *gin.Context)
- func (siw *ServerInterfaceWrapper) QueryRecords(c *gin.Context)
- func (siw *ServerInterfaceWrapper) UpdateLog(c *gin.Context)
- type Tags
- type UpdateLogJSONRequestBody
- type UpdateLogRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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 CreateLogJSONRequestBody ¶
type CreateLogJSONRequestBody = CreateLogRequest
CreateLogJSONRequestBody defines body for CreateLog for application/json ContentType.
type CreateLogRequest ¶
type CreateLogRequest struct { // Tags The log tags. Tags Tags `json:"tags"` }
CreateLogRequest The request object to create log.
type CreateRecordRequest ¶
type CreateRecordRequest struct { // Payload The record payload. Payload []byte `json:"payload"` }
CreateRecordRequest The request object to create a record.
type CreateRecordsJSONRequestBody ¶
type CreateRecordsJSONRequestBody = CreateRecordsRequest
CreateRecordsJSONRequestBody defines body for CreateRecords for application/json ContentType.
type CreateRecordsRequest ¶
type CreateRecordsRequest struct { // Records The list of records to be created. Records []CreateRecordRequest `json:"records"` }
CreateRecordsRequest The request object to create records.
type CreateRecordsResponse ¶
type CreateRecordsResponse struct { // Added The number of records added. Added int `json:"added"` }
CreateRecordsResponse The response object to the create records request.
type DeleteLogsJSONRequestBody ¶
type DeleteLogsJSONRequestBody = DeleteLogsRequest
DeleteLogsJSONRequestBody defines body for DeleteLogs for application/json ContentType.
type DeleteLogsRequest ¶
type DeleteLogsRequest struct { // FilterCondition The filter condition. FilterCondition string `json:"filterCondition"` }
DeleteLogsRequest The request object to delete logs.
type DeleteLogsResponse ¶
type DeleteLogsResponse struct { // Deleted The number of logs deleted. Deleted int `json:"deleted"` }
DeleteLogsResponse The response object to the delete logs request.
type GinServerOptions ¶
type GinServerOptions struct { BaseURL string Middlewares []MiddlewareFunc ErrorHandler func(*gin.Context, error, int) }
GinServerOptions provides options for the Gin server.
type Log ¶
type Log struct { // CreatedAt The timestamp when the log was created. CreatedAt time.Time `json:"createdAt"` // Id The log identifier. Id string `json:"id"` // Tags The log tags. Tags Tags `json:"tags"` // UpdatedAt The timestamp when the log was updated (new records added or tags are applied). UpdatedAt time.Time `json:"updatedAt"` }
Log The log object.
type MiddlewareFunc ¶
type QueryLogsParams ¶
type QueryLogsParams struct { // LogsCondFilter The condition for filtering the logs. LogsCondFilter *LogsCondFilter `form:"logsCondFilter,omitempty" json:"logsCondFilter,omitempty"` // FromPageId The id of the page to start returning the results from. FromPageId *FromPageId `form:"fromPageId,omitempty" json:"fromPageId,omitempty"` // Limit The max number of objects to return per page. Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` }
QueryLogsParams defines parameters for QueryLogs.
type QueryLogsResult ¶
type QueryLogsResult struct { // Items The list of found logs. Items []Log `json:"items"` // NextPageId The id of the next page. NextPageId *string `json:"nextPageId,omitempty"` // Total The total number of found logs. Total int `json:"total"` }
QueryLogsResult The response object to the query logs request.
type QueryRecordsParams ¶
type QueryRecordsParams struct { // LogsCondFilter The condition for filtering the logs. LogsCondFilter *LogsCondFilter `form:"logsCondFilter,omitempty" json:"logsCondFilter,omitempty"` // RecordsCondFilter The condition for filtering the records. RecordsCondFilter *RecordsCondFilter `form:"recordsCondFilter,omitempty" json:"recordsCondFilter,omitempty"` // LogIds The ids of the logs to consider. If specified, the `logsCondFilter` is ignored. LogIds *LogIds `form:"logIds,omitempty" json:"logIds,omitempty"` // Desc The flag specifies the descending order for pagination. Desc *Desc `form:"desc,omitempty" json:"desc,omitempty"` // FromPageId The id of the page to start returning the results from. FromPageId *FromPageId `form:"fromPageId,omitempty" json:"fromPageId,omitempty"` // Limit The max number of objects to return per page. Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` }
QueryRecordsParams defines parameters for QueryRecords.
type QueryRecordsResult ¶
type QueryRecordsResult struct { // Items The list of found records. Items []Record `json:"items"` // NextPageId The id of the next page. NextPageId *string `json:"nextPageId,omitempty"` // Total The total number of found records. Total int `json:"total"` }
QueryRecordsResult The response object to the query records request.
type Record ¶
type Record struct { // CreatedAt The timestamp when the record was created. CreatedAt time.Time `json:"createdAt"` // Id The record identifier. Id string `json:"id"` // LogId The log identifier. LogId string `json:"logId"` // Payload The record payload. Payload []byte `json:"payload"` }
Record The record object.
type RecordsCondFilter ¶
type RecordsCondFilter = string
RecordsCondFilter defines model for RecordsCondFilter.
type ServerInterface ¶
type ServerInterface interface { // Delete logs // (DELETE /logs) DeleteLogs(c *gin.Context) // Query logs // (GET /logs) QueryLogs(c *gin.Context, params QueryLogsParams) // Create log // (POST /logs) CreateLog(c *gin.Context) // Update log // (PUT /logs/{logId}) UpdateLog(c *gin.Context, logId LogId) // Create records // (POST /logs/{logId}/records) CreateRecords(c *gin.Context, logId LogId) // Health check // (GET /ping) Ping(c *gin.Context) // Query records // (GET /records) QueryRecords(c *gin.Context, params QueryRecordsParams) }
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) CreateLog ¶
func (siw *ServerInterfaceWrapper) CreateLog(c *gin.Context)
CreateLog operation middleware
func (*ServerInterfaceWrapper) CreateRecords ¶
func (siw *ServerInterfaceWrapper) CreateRecords(c *gin.Context)
CreateRecords operation middleware
func (*ServerInterfaceWrapper) DeleteLogs ¶
func (siw *ServerInterfaceWrapper) DeleteLogs(c *gin.Context)
DeleteLogs operation middleware
func (*ServerInterfaceWrapper) Ping ¶
func (siw *ServerInterfaceWrapper) Ping(c *gin.Context)
Ping operation middleware
func (*ServerInterfaceWrapper) QueryLogs ¶
func (siw *ServerInterfaceWrapper) QueryLogs(c *gin.Context)
QueryLogs operation middleware
func (*ServerInterfaceWrapper) QueryRecords ¶
func (siw *ServerInterfaceWrapper) QueryRecords(c *gin.Context)
QueryRecords operation middleware
func (*ServerInterfaceWrapper) UpdateLog ¶
func (siw *ServerInterfaceWrapper) UpdateLog(c *gin.Context)
UpdateLog operation middleware
type UpdateLogJSONRequestBody ¶
type UpdateLogJSONRequestBody = UpdateLogRequest
UpdateLogJSONRequestBody defines body for UpdateLog for application/json ContentType.
type UpdateLogRequest ¶
type UpdateLogRequest struct { // Tags The log tags. Tags Tags `json:"tags"` }
UpdateLogRequest The request object to update log.