api

package
v0.1.0-beta.202311030524 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2023 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package api provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

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

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

func RegisterHandlers

func RegisterHandlers(router *gin.Engine, si ServerInterface) *gin.Engine

RegisterHandlers creates http.Handler with routing matching OpenAPI spec.

func RegisterHandlersWithOptions

func RegisterHandlersWithOptions(router *gin.Engine, si ServerInterface, options GinServerOptions) *gin.Engine

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 ListPipelinesResponse

type ListPipelinesResponse struct {
	Items     *[]Pipeline `json:"items,omitempty"`
	NextToken *string     `json:"next_token,omitempty"`
}

ListPipelinesResponse defines model for ListPipelinesResponse.

type MiddlewareFunc

type MiddlewareFunc func(c *gin.Context)

type Pipeline

type Pipeline struct {
	Id       *int64  `json:"id,omitempty"`
	Username *string `json:"username,omitempty"`
}

Pipeline defines model for Pipeline.

type PipelineListParams

type PipelineListParams struct {
	// Limit The max number of items to fetch per page of data, subject to a min and max of 1 and 100 respectively. If not specified will default to 25.
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// NextToken When list results are truncated, next_token will be returned, which is a cursor to fetch the next page of data. Pass next_token to the subsequent list request to fetch the next page of data.
	NextToken *string `form:"next_token,omitempty" json:"next_token,omitempty"`
}

PipelineListParams defines parameters for PipelineList.

type ServerInterface

type ServerInterface interface {
	// List Pipelines
	// (GET /pipeline)
	PipelineList(c *gin.Context, params PipelineListParams)
}

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) PipelineList

func (siw *ServerInterfaceWrapper) PipelineList(c *gin.Context)

PipelineList operation middleware

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL