oapi

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

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

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

Index

Constants

View Source
const (
	BearerAuthScopes = "bearerAuth.Scopes"
)

Variables

This section is empty.

Functions

func Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler

HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.

func HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

func NewDeleteCatalogRequest

func NewDeleteCatalogRequest(server string, namespace string, catalog string) (*http.Request, error)

NewDeleteCatalogRequest generates requests for DeleteCatalog

func NewDeleteKeyRequest

func NewDeleteKeyRequest(server string, namespace string, id string) (*http.Request, error)

NewDeleteKeyRequest generates requests for DeleteKey

func NewDeleteSourceRequest

func NewDeleteSourceRequest(server string, namespace string, source string) (*http.Request, error)

NewDeleteSourceRequest generates requests for DeleteSource

func NewFetchSourceRequest

func NewFetchSourceRequest(server string, namespace string, source string, params *FetchSourceParams) (*http.Request, error)

NewFetchSourceRequest generates requests for FetchSource

func NewGetCatalogRequest

func NewGetCatalogRequest(server string, namespace string, catalog string) (*http.Request, error)

NewGetCatalogRequest generates requests for GetCatalog

func NewGetCatalogsRequest

func NewGetCatalogsRequest(server string, namespace string) (*http.Request, error)

NewGetCatalogsRequest generates requests for GetCatalogs

func NewGetConnectorsRequest

func NewGetConnectorsRequest(server string) (*http.Request, error)

NewGetConnectorsRequest generates requests for GetConnectors

func NewGetKeysRequest added in v0.2.0

func NewGetKeysRequest(server string, namespace string) (*http.Request, error)

NewGetKeysRequest generates requests for GetKeys

func NewGetSourceOptionsRequest

func NewGetSourceOptionsRequest(server string, namespace string, source string) (*http.Request, error)

NewGetSourceOptionsRequest generates requests for GetSourceOptions

func NewGetSourceRequest

func NewGetSourceRequest(server string, namespace string, source string) (*http.Request, error)

NewGetSourceRequest generates requests for GetSource

func NewGetSourcesRequest

func NewGetSourcesRequest(server string, namespace string) (*http.Request, error)

NewGetSourcesRequest generates requests for GetSources

func NewNewConnectorRequest

func NewNewConnectorRequest(server string, namespace string, body NewConnectorJSONRequestBody) (*http.Request, error)

NewNewConnectorRequest calls the generic NewConnector builder with application/json body

func NewNewConnectorRequestWithBody

func NewNewConnectorRequestWithBody(server string, namespace string, contentType string, body io.Reader) (*http.Request, error)

NewNewConnectorRequestWithBody generates requests for NewConnector with any type of body

func NewNewKeyRequest

func NewNewKeyRequest(server string, namespace string, body NewKeyJSONRequestBody) (*http.Request, error)

NewNewKeyRequest calls the generic NewKey builder with application/json body

func NewNewKeyRequestWithBody

func NewNewKeyRequestWithBody(server string, namespace string, contentType string, body io.Reader) (*http.Request, error)

NewNewKeyRequestWithBody generates requests for NewKey with any type of body

func NewNewSourceRequest

func NewNewSourceRequest(server string, namespace string, body NewSourceJSONRequestBody) (*http.Request, error)

NewNewSourceRequest calls the generic NewSource builder with application/json body

func NewNewSourceRequestWithBody

func NewNewSourceRequestWithBody(server string, namespace string, contentType string, body io.Reader) (*http.Request, error)

NewNewSourceRequestWithBody generates requests for NewSource with any type of body

func NewQueryRequest

func NewQueryRequest(server string, namespace string, params *QueryParams) (*http.Request, error)

NewQueryRequest generates requests for Query

func NewSetCatalogRequest

func NewSetCatalogRequest(server string, namespace string, body SetCatalogJSONRequestBody) (*http.Request, error)

NewSetCatalogRequest calls the generic SetCatalog builder with application/json body

func NewSetCatalogRequestWithBody

func NewSetCatalogRequestWithBody(server string, namespace string, contentType string, body io.Reader) (*http.Request, error)

NewSetCatalogRequestWithBody generates requests for SetCatalog with any type of body

func NewTestSourceConnectionRequest

func NewTestSourceConnectionRequest(server string, namespace string, body TestSourceConnectionJSONRequestBody) (*http.Request, error)

NewTestSourceConnectionRequest calls the generic TestSourceConnection builder with application/json body

func NewTestSourceConnectionRequestWithBody

func NewTestSourceConnectionRequestWithBody(server string, namespace string, contentType string, body io.Reader) (*http.Request, error)

NewTestSourceConnectionRequestWithBody generates requests for TestSourceConnection with any type of body

func NewUpdateCatalogRequest

func NewUpdateCatalogRequest(server string, namespace string, catalog string, body UpdateCatalogJSONRequestBody) (*http.Request, error)

NewUpdateCatalogRequest calls the generic UpdateCatalog builder with application/json body

func NewUpdateCatalogRequestWithBody

func NewUpdateCatalogRequestWithBody(server string, namespace string, catalog string, contentType string, body io.Reader) (*http.Request, error)

NewUpdateCatalogRequestWithBody generates requests for UpdateCatalog with any type of body

Types

type Catalog

type Catalog struct {
	Description string    `json:"description"`
	Labels      *[]string `json:"labels"`
	Name        string    `json:"name"`
	Tables      Tables    `json:"tables"`
	Uid         string    `json:"uid"`
}

Catalog defines model for Catalog.

type CatalogTable

type CatalogTable struct {
	// Name the table name referenced within SQL queries
	Name string    `json:"name"`
	Ref  SourceRef `json:"ref"`

	// Schema the table schema referenced within SQL queries
	Schema string `json:"schema"`
}

CatalogTable defines model for CatalogTable.

type Catalogs

type Catalogs = []Catalog

Catalogs defines model for Catalogs.

type ChiServerOptions

type ChiServerOptions struct {
	BaseURL          string
	BaseRouter       chi.Router
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) DeleteCatalog

func (c *Client) DeleteCatalog(ctx context.Context, namespace string, catalog string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteKey

func (c *Client) DeleteKey(ctx context.Context, namespace string, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteSource

func (c *Client) DeleteSource(ctx context.Context, namespace string, source string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) FetchSource

func (c *Client) FetchSource(ctx context.Context, namespace string, source string, params *FetchSourceParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetCatalog

func (c *Client) GetCatalog(ctx context.Context, namespace string, catalog string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetCatalogs

func (c *Client) GetCatalogs(ctx context.Context, namespace string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetConnectors

func (c *Client) GetConnectors(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetKeys added in v0.2.0

func (c *Client) GetKeys(ctx context.Context, namespace string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetSource

func (c *Client) GetSource(ctx context.Context, namespace string, source string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetSourceOptions

func (c *Client) GetSourceOptions(ctx context.Context, namespace string, source string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetSources

func (c *Client) GetSources(ctx context.Context, namespace string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) NewConnector

func (c *Client) NewConnector(ctx context.Context, namespace string, body NewConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) NewConnectorWithBody

func (c *Client) NewConnectorWithBody(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) NewKey

func (c *Client) NewKey(ctx context.Context, namespace string, body NewKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) NewKeyWithBody

func (c *Client) NewKeyWithBody(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) NewSource

func (c *Client) NewSource(ctx context.Context, namespace string, body NewSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) NewSourceWithBody

func (c *Client) NewSourceWithBody(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) Query

func (c *Client) Query(ctx context.Context, namespace string, params *QueryParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SetCatalog

func (c *Client) SetCatalog(ctx context.Context, namespace string, body SetCatalogJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SetCatalogWithBody

func (c *Client) SetCatalogWithBody(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) TestSourceConnection

func (c *Client) TestSourceConnection(ctx context.Context, namespace string, body TestSourceConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) TestSourceConnectionWithBody

func (c *Client) TestSourceConnectionWithBody(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateCatalog

func (c *Client) UpdateCatalog(ctx context.Context, namespace string, catalog string, body UpdateCatalogJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateCatalogWithBody

func (c *Client) UpdateCatalogWithBody(ctx context.Context, namespace string, catalog string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// GetConnectors request
	GetConnectors(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SetCatalogWithBody request with any body
	SetCatalogWithBody(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	SetCatalog(ctx context.Context, namespace string, body SetCatalogJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteCatalog request
	DeleteCatalog(ctx context.Context, namespace string, catalog string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetCatalog request
	GetCatalog(ctx context.Context, namespace string, catalog string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateCatalogWithBody request with any body
	UpdateCatalogWithBody(ctx context.Context, namespace string, catalog string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UpdateCatalog(ctx context.Context, namespace string, catalog string, body UpdateCatalogJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetCatalogs request
	GetCatalogs(ctx context.Context, namespace string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// NewConnectorWithBody request with any body
	NewConnectorWithBody(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	NewConnector(ctx context.Context, namespace string, body NewConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteKey request
	DeleteKey(ctx context.Context, namespace string, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetKeys request
	GetKeys(ctx context.Context, namespace string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// NewKeyWithBody request with any body
	NewKeyWithBody(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	NewKey(ctx context.Context, namespace string, body NewKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// Query request
	Query(ctx context.Context, namespace string, params *QueryParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// NewSourceWithBody request with any body
	NewSourceWithBody(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	NewSource(ctx context.Context, namespace string, body NewSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// TestSourceConnectionWithBody request with any body
	TestSourceConnectionWithBody(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	TestSourceConnection(ctx context.Context, namespace string, body TestSourceConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteSource request
	DeleteSource(ctx context.Context, namespace string, source string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetSource request
	GetSource(ctx context.Context, namespace string, source string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// FetchSource request
	FetchSource(ctx context.Context, namespace string, source string, params *FetchSourceParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetSourceOptions request
	GetSourceOptions(ctx context.Context, namespace string, source string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetSources request
	GetSources(ctx context.Context, namespace string, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) DeleteCatalogWithResponse

func (c *ClientWithResponses) DeleteCatalogWithResponse(ctx context.Context, namespace string, catalog string, reqEditors ...RequestEditorFn) (*DeleteCatalogResponse, error)

DeleteCatalogWithResponse request returning *DeleteCatalogResponse

func (*ClientWithResponses) DeleteKeyWithResponse

func (c *ClientWithResponses) DeleteKeyWithResponse(ctx context.Context, namespace string, id string, reqEditors ...RequestEditorFn) (*DeleteKeyResponse, error)

DeleteKeyWithResponse request returning *DeleteKeyResponse

func (*ClientWithResponses) DeleteSourceWithResponse

func (c *ClientWithResponses) DeleteSourceWithResponse(ctx context.Context, namespace string, source string, reqEditors ...RequestEditorFn) (*DeleteSourceResponse, error)

DeleteSourceWithResponse request returning *DeleteSourceResponse

func (*ClientWithResponses) FetchSourceWithResponse

func (c *ClientWithResponses) FetchSourceWithResponse(ctx context.Context, namespace string, source string, params *FetchSourceParams, reqEditors ...RequestEditorFn) (*FetchSourceResponse, error)

FetchSourceWithResponse request returning *FetchSourceResponse

func (*ClientWithResponses) GetCatalogWithResponse

func (c *ClientWithResponses) GetCatalogWithResponse(ctx context.Context, namespace string, catalog string, reqEditors ...RequestEditorFn) (*GetCatalogResponse, error)

GetCatalogWithResponse request returning *GetCatalogResponse

func (*ClientWithResponses) GetCatalogsWithResponse

func (c *ClientWithResponses) GetCatalogsWithResponse(ctx context.Context, namespace string, reqEditors ...RequestEditorFn) (*GetCatalogsResponse, error)

GetCatalogsWithResponse request returning *GetCatalogsResponse

func (*ClientWithResponses) GetConnectorsWithResponse

func (c *ClientWithResponses) GetConnectorsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetConnectorsResponse, error)

GetConnectorsWithResponse request returning *GetConnectorsResponse

func (*ClientWithResponses) GetKeysWithResponse added in v0.2.0

func (c *ClientWithResponses) GetKeysWithResponse(ctx context.Context, namespace string, reqEditors ...RequestEditorFn) (*GetKeysResponse, error)

GetKeysWithResponse request returning *GetKeysResponse

func (*ClientWithResponses) GetSourceOptionsWithResponse

func (c *ClientWithResponses) GetSourceOptionsWithResponse(ctx context.Context, namespace string, source string, reqEditors ...RequestEditorFn) (*GetSourceOptionsResponse, error)

GetSourceOptionsWithResponse request returning *GetSourceOptionsResponse

func (*ClientWithResponses) GetSourceWithResponse

func (c *ClientWithResponses) GetSourceWithResponse(ctx context.Context, namespace string, source string, reqEditors ...RequestEditorFn) (*GetSourceResponse, error)

GetSourceWithResponse request returning *GetSourceResponse

func (*ClientWithResponses) GetSourcesWithResponse

func (c *ClientWithResponses) GetSourcesWithResponse(ctx context.Context, namespace string, reqEditors ...RequestEditorFn) (*GetSourcesResponse, error)

GetSourcesWithResponse request returning *GetSourcesResponse

func (*ClientWithResponses) NewConnectorWithBodyWithResponse

func (c *ClientWithResponses) NewConnectorWithBodyWithResponse(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*NewConnectorResponse, error)

NewConnectorWithBodyWithResponse request with arbitrary body returning *NewConnectorResponse

func (*ClientWithResponses) NewConnectorWithResponse

func (c *ClientWithResponses) NewConnectorWithResponse(ctx context.Context, namespace string, body NewConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*NewConnectorResponse, error)

func (*ClientWithResponses) NewKeyWithBodyWithResponse

func (c *ClientWithResponses) NewKeyWithBodyWithResponse(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*NewKeyResponse, error)

NewKeyWithBodyWithResponse request with arbitrary body returning *NewKeyResponse

func (*ClientWithResponses) NewKeyWithResponse

func (c *ClientWithResponses) NewKeyWithResponse(ctx context.Context, namespace string, body NewKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*NewKeyResponse, error)

func (*ClientWithResponses) NewSourceWithBodyWithResponse

func (c *ClientWithResponses) NewSourceWithBodyWithResponse(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*NewSourceResponse, error)

NewSourceWithBodyWithResponse request with arbitrary body returning *NewSourceResponse

func (*ClientWithResponses) NewSourceWithResponse

func (c *ClientWithResponses) NewSourceWithResponse(ctx context.Context, namespace string, body NewSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*NewSourceResponse, error)

func (*ClientWithResponses) QueryWithResponse

func (c *ClientWithResponses) QueryWithResponse(ctx context.Context, namespace string, params *QueryParams, reqEditors ...RequestEditorFn) (*QueryResponse, error)

QueryWithResponse request returning *QueryResponse

func (*ClientWithResponses) SetCatalogWithBodyWithResponse

func (c *ClientWithResponses) SetCatalogWithBodyWithResponse(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetCatalogResponse, error)

SetCatalogWithBodyWithResponse request with arbitrary body returning *SetCatalogResponse

func (*ClientWithResponses) SetCatalogWithResponse

func (c *ClientWithResponses) SetCatalogWithResponse(ctx context.Context, namespace string, body SetCatalogJSONRequestBody, reqEditors ...RequestEditorFn) (*SetCatalogResponse, error)

func (*ClientWithResponses) TestSourceConnectionWithBodyWithResponse

func (c *ClientWithResponses) TestSourceConnectionWithBodyWithResponse(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TestSourceConnectionResponse, error)

TestSourceConnectionWithBodyWithResponse request with arbitrary body returning *TestSourceConnectionResponse

func (*ClientWithResponses) TestSourceConnectionWithResponse

func (c *ClientWithResponses) TestSourceConnectionWithResponse(ctx context.Context, namespace string, body TestSourceConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*TestSourceConnectionResponse, error)

func (*ClientWithResponses) UpdateCatalogWithBodyWithResponse

func (c *ClientWithResponses) UpdateCatalogWithBodyWithResponse(ctx context.Context, namespace string, catalog string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCatalogResponse, error)

UpdateCatalogWithBodyWithResponse request with arbitrary body returning *UpdateCatalogResponse

func (*ClientWithResponses) UpdateCatalogWithResponse

func (c *ClientWithResponses) UpdateCatalogWithResponse(ctx context.Context, namespace string, catalog string, body UpdateCatalogJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCatalogResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetConnectorsWithResponse request
	GetConnectorsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetConnectorsResponse, error)

	// SetCatalogWithBodyWithResponse request with any body
	SetCatalogWithBodyWithResponse(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetCatalogResponse, error)

	SetCatalogWithResponse(ctx context.Context, namespace string, body SetCatalogJSONRequestBody, reqEditors ...RequestEditorFn) (*SetCatalogResponse, error)

	// DeleteCatalogWithResponse request
	DeleteCatalogWithResponse(ctx context.Context, namespace string, catalog string, reqEditors ...RequestEditorFn) (*DeleteCatalogResponse, error)

	// GetCatalogWithResponse request
	GetCatalogWithResponse(ctx context.Context, namespace string, catalog string, reqEditors ...RequestEditorFn) (*GetCatalogResponse, error)

	// UpdateCatalogWithBodyWithResponse request with any body
	UpdateCatalogWithBodyWithResponse(ctx context.Context, namespace string, catalog string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCatalogResponse, error)

	UpdateCatalogWithResponse(ctx context.Context, namespace string, catalog string, body UpdateCatalogJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCatalogResponse, error)

	// GetCatalogsWithResponse request
	GetCatalogsWithResponse(ctx context.Context, namespace string, reqEditors ...RequestEditorFn) (*GetCatalogsResponse, error)

	// NewConnectorWithBodyWithResponse request with any body
	NewConnectorWithBodyWithResponse(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*NewConnectorResponse, error)

	NewConnectorWithResponse(ctx context.Context, namespace string, body NewConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*NewConnectorResponse, error)

	// DeleteKeyWithResponse request
	DeleteKeyWithResponse(ctx context.Context, namespace string, id string, reqEditors ...RequestEditorFn) (*DeleteKeyResponse, error)

	// GetKeysWithResponse request
	GetKeysWithResponse(ctx context.Context, namespace string, reqEditors ...RequestEditorFn) (*GetKeysResponse, error)

	// NewKeyWithBodyWithResponse request with any body
	NewKeyWithBodyWithResponse(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*NewKeyResponse, error)

	NewKeyWithResponse(ctx context.Context, namespace string, body NewKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*NewKeyResponse, error)

	// QueryWithResponse request
	QueryWithResponse(ctx context.Context, namespace string, params *QueryParams, reqEditors ...RequestEditorFn) (*QueryResponse, error)

	// NewSourceWithBodyWithResponse request with any body
	NewSourceWithBodyWithResponse(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*NewSourceResponse, error)

	NewSourceWithResponse(ctx context.Context, namespace string, body NewSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*NewSourceResponse, error)

	// TestSourceConnectionWithBodyWithResponse request with any body
	TestSourceConnectionWithBodyWithResponse(ctx context.Context, namespace string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TestSourceConnectionResponse, error)

	TestSourceConnectionWithResponse(ctx context.Context, namespace string, body TestSourceConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*TestSourceConnectionResponse, error)

	// DeleteSourceWithResponse request
	DeleteSourceWithResponse(ctx context.Context, namespace string, source string, reqEditors ...RequestEditorFn) (*DeleteSourceResponse, error)

	// GetSourceWithResponse request
	GetSourceWithResponse(ctx context.Context, namespace string, source string, reqEditors ...RequestEditorFn) (*GetSourceResponse, error)

	// FetchSourceWithResponse request
	FetchSourceWithResponse(ctx context.Context, namespace string, source string, params *FetchSourceParams, reqEditors ...RequestEditorFn) (*FetchSourceResponse, error)

	// GetSourceOptionsWithResponse request
	GetSourceOptionsWithResponse(ctx context.Context, namespace string, source string, reqEditors ...RequestEditorFn) (*GetSourceOptionsResponse, error)

	// GetSourcesWithResponse request
	GetSourcesWithResponse(ctx context.Context, namespace string, reqEditors ...RequestEditorFn) (*GetSourcesResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type Column

type Column struct {
	Name     string `json:"name"`
	Nullable bool   `json:"nullable"`
	Type     string `json:"type"`
}

Column defines model for Column.

type Connector

type Connector struct {
	Description string              `json:"description"`
	Id          string              `json:"id"`
	Name        string              `json:"name"`
	Options     [][]ConnectorOption `json:"options"`
}

Connector defines model for Connector.

type ConnectorOption

type ConnectorOption struct {
	Default     string              `json:"default"`
	Description string              `json:"description"`
	Key         string              `json:"key"`
	Name        string              `json:"name"`
	Placeholder string              `json:"placeholder"`
	Required    bool                `json:"required"`
	Type        ConnectorOptionType `json:"type"`
}

ConnectorOption defines model for ConnectorOption.

type ConnectorOptionType

type ConnectorOptionType string

ConnectorOptionType defines model for ConnectorOption.Type.

const (
	Boolean  ConnectorOptionType = "boolean"
	Integer  ConnectorOptionType = "integer"
	Password ConnectorOptionType = "password"
	String   ConnectorOptionType = "string"
)

Defines values for ConnectorOptionType.

type Connectors

type Connectors = []Connector

Connectors defines model for Connectors.

type CustomConnector

type CustomConnector struct {
	Description string `json:"description"`
	Name        string `json:"name"`
}

CustomConnector defines model for CustomConnector.

type DeleteCatalogResponse

type DeleteCatalogResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON401      *Problem
}

func ParseDeleteCatalogResponse

func ParseDeleteCatalogResponse(rsp *http.Response) (*DeleteCatalogResponse, error)

ParseDeleteCatalogResponse parses an HTTP response from a DeleteCatalogWithResponse call

func (DeleteCatalogResponse) Status

func (r DeleteCatalogResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteCatalogResponse) StatusCode

func (r DeleteCatalogResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteKeyResponse

type DeleteKeyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON401      *Problem
}

func ParseDeleteKeyResponse

func ParseDeleteKeyResponse(rsp *http.Response) (*DeleteKeyResponse, error)

ParseDeleteKeyResponse parses an HTTP response from a DeleteKeyWithResponse call

func (DeleteKeyResponse) Status

func (r DeleteKeyResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteKeyResponse) StatusCode

func (r DeleteKeyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteSourceResponse

type DeleteSourceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON401      *Problem
}

func ParseDeleteSourceResponse

func ParseDeleteSourceResponse(rsp *http.Response) (*DeleteSourceResponse, error)

ParseDeleteSourceResponse parses an HTTP response from a DeleteSourceWithResponse call

func (DeleteSourceResponse) Status

func (r DeleteSourceResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteSourceResponse) StatusCode

func (r DeleteSourceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Empty

type Empty = string

Empty defines model for Empty.

type Explain

type Explain struct {
	// Execution response time in ms
	Execution int `json:"execution"`

	// Planning response time in ms
	Planning int `json:"planning"`
}

Explain explain the executed query

type FetchSourceParams

type FetchSourceParams struct {
	// ExposeGlobal Update the globally exposed tables from the given source
	ExposeGlobal bool `form:"expose_global" json:"expose_global"`
}

FetchSourceParams defines parameters for FetchSource.

type FetchSourceResponse

type FetchSourceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Source
	JSON401      *Problem
}

func ParseFetchSourceResponse

func ParseFetchSourceResponse(rsp *http.Response) (*FetchSourceResponse, error)

ParseFetchSourceResponse parses an HTTP response from a FetchSourceWithResponse call

func (FetchSourceResponse) Status

func (r FetchSourceResponse) Status() string

Status returns HTTPResponse.Status

func (FetchSourceResponse) StatusCode

func (r FetchSourceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetCatalogResponse

type GetCatalogResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Catalog
	JSON401      *Problem
}

func ParseGetCatalogResponse

func ParseGetCatalogResponse(rsp *http.Response) (*GetCatalogResponse, error)

ParseGetCatalogResponse parses an HTTP response from a GetCatalogWithResponse call

func (GetCatalogResponse) Status

func (r GetCatalogResponse) Status() string

Status returns HTTPResponse.Status

func (GetCatalogResponse) StatusCode

func (r GetCatalogResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetCatalogsResponse

type GetCatalogsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Catalogs
	JSON401      *Problem
}

func ParseGetCatalogsResponse

func ParseGetCatalogsResponse(rsp *http.Response) (*GetCatalogsResponse, error)

ParseGetCatalogsResponse parses an HTTP response from a GetCatalogsWithResponse call

func (GetCatalogsResponse) Status

func (r GetCatalogsResponse) Status() string

Status returns HTTPResponse.Status

func (GetCatalogsResponse) StatusCode

func (r GetCatalogsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetConnectorsResponse

type GetConnectorsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Connectors
	JSON401      *Problem
}

func ParseGetConnectorsResponse

func ParseGetConnectorsResponse(rsp *http.Response) (*GetConnectorsResponse, error)

ParseGetConnectorsResponse parses an HTTP response from a GetConnectorsWithResponse call

func (GetConnectorsResponse) Status

func (r GetConnectorsResponse) Status() string

Status returns HTTPResponse.Status

func (GetConnectorsResponse) StatusCode

func (r GetConnectorsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetKeysResponse added in v0.2.0

type GetKeysResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Keys
	JSON401      *Problem
}

func ParseGetKeysResponse added in v0.2.0

func ParseGetKeysResponse(rsp *http.Response) (*GetKeysResponse, error)

ParseGetKeysResponse parses an HTTP response from a GetKeysWithResponse call

func (GetKeysResponse) Status added in v0.2.0

func (r GetKeysResponse) Status() string

Status returns HTTPResponse.Status

func (GetKeysResponse) StatusCode added in v0.2.0

func (r GetKeysResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetSourceOptionsResponse

type GetSourceOptionsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *SourceOptions
	JSON401      *Problem
}

func ParseGetSourceOptionsResponse

func ParseGetSourceOptionsResponse(rsp *http.Response) (*GetSourceOptionsResponse, error)

ParseGetSourceOptionsResponse parses an HTTP response from a GetSourceOptionsWithResponse call

func (GetSourceOptionsResponse) Status

func (r GetSourceOptionsResponse) Status() string

Status returns HTTPResponse.Status

func (GetSourceOptionsResponse) StatusCode

func (r GetSourceOptionsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetSourceResponse

type GetSourceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Source
	JSON401      *Problem
	JSON404      *Problem
}

func ParseGetSourceResponse

func ParseGetSourceResponse(rsp *http.Response) (*GetSourceResponse, error)

ParseGetSourceResponse parses an HTTP response from a GetSourceWithResponse call

func (GetSourceResponse) Status

func (r GetSourceResponse) Status() string

Status returns HTTPResponse.Status

func (GetSourceResponse) StatusCode

func (r GetSourceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetSourcesResponse

type GetSourcesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Sources
	JSON401      *Problem
}

func ParseGetSourcesResponse

func ParseGetSourcesResponse(rsp *http.Response) (*GetSourcesResponse, error)

ParseGetSourcesResponse parses an HTTP response from a GetSourcesWithResponse call

func (GetSourcesResponse) Status

func (r GetSourcesResponse) Status() string

Status returns HTTPResponse.Status

func (GetSourcesResponse) StatusCode

func (r GetSourcesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type Key

type Key struct {
	CreatedAt time.Time          `json:"created_at"`
	CreatedBy openapi_types.UUID `json:"created_by"`

	// Description Human-readable description
	Description string `json:"description"`

	// ExpiresAt Optional expiration timestamp
	ExpiresAt *time.Time `json:"expires_at"`

	// Id Unique identifier of the key
	Id       string   `json:"id"`
	Policies []Policy `json:"policies"`

	// Secret The API secret (only returned at creation time)
	Secret *string `json:"secret,omitempty"`
}

Key defines model for Key.

type Keys

type Keys = []Key

Keys defines model for Keys.

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type NewConnectorJSONRequestBody

type NewConnectorJSONRequestBody = CustomConnector

NewConnectorJSONRequestBody defines body for NewConnector for application/json ContentType.

type NewConnectorResponse

type NewConnectorResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *Source
	JSON401      *Problem
}

func ParseNewConnectorResponse

func ParseNewConnectorResponse(rsp *http.Response) (*NewConnectorResponse, error)

ParseNewConnectorResponse parses an HTTP response from a NewConnectorWithResponse call

func (NewConnectorResponse) Status

func (r NewConnectorResponse) Status() string

Status returns HTTPResponse.Status

func (NewConnectorResponse) StatusCode

func (r NewConnectorResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type NewKeyJSONRequestBody

type NewKeyJSONRequestBody = Key

NewKeyJSONRequestBody defines body for NewKey for application/json ContentType.

type NewKeyResponse

type NewKeyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *Key
	JSON401      *Problem
}

func ParseNewKeyResponse

func ParseNewKeyResponse(rsp *http.Response) (*NewKeyResponse, error)

ParseNewKeyResponse parses an HTTP response from a NewKeyWithResponse call

func (NewKeyResponse) Status

func (r NewKeyResponse) Status() string

Status returns HTTPResponse.Status

func (NewKeyResponse) StatusCode

func (r NewKeyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type NewSource

type NewSource struct {
	// Connector represents the connector name used to connect with the given source
	Connector    string        `json:"connector"`
	Description  string        `json:"description"`
	ExposeGlobal bool          `json:"expose_global"`
	Labels       []string      `json:"labels"`
	Name         string        `json:"name"`
	Options      SourceOptions `json:"options"`
}

NewSource defines model for NewSource.

type NewSourceJSONRequestBody

type NewSourceJSONRequestBody = NewSource

NewSourceJSONRequestBody defines body for NewSource for application/json ContentType.

type NewSourceResponse

type NewSourceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *Source
	JSON401      *Problem
}

func ParseNewSourceResponse

func ParseNewSourceResponse(rsp *http.Response) (*NewSourceResponse, error)

ParseNewSourceResponse parses an HTTP response from a NewSourceWithResponse call

func (NewSourceResponse) Status

func (r NewSourceResponse) Status() string

Status returns HTTPResponse.Status

func (NewSourceResponse) StatusCode

func (r NewSourceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Policy

type Policy struct {
	Permissions []string `json:"permissions"`
	Resources   []string `json:"resources"`
}

Policy defines model for Policy.

type Problem

type Problem struct {
	// Detail A human readable explanation specific to this occurrence of the problem that is helpful to locate the problem and give advice on how to proceed. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized.
	Detail string `json:"detail"`

	// Title A short summary of the problem type. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized.
	Title string `json:"title"`
}

Problem defines model for Problem.

type QueryParams

type QueryParams struct {
	// Statements SQL query statements to be executed
	Statements string `form:"statements" json:"statements"`

	// Catalog Currently selected catalog
	Catalog string `form:"catalog" json:"catalog"`

	// Limit The total amount of rows to be returned
	Limit *QueryParamsLimit `form:"limit,omitempty" json:"limit,omitempty"`

	// Stream If true, the server will stream results using Server-Sent Events.
	Stream *bool `form:"stream,omitempty" json:"stream,omitempty"`
}

QueryParams defines parameters for Query.

type QueryParamsLimit

type QueryParamsLimit float32

QueryParamsLimit defines parameters for Query.

const (
	N0    QueryParamsLimit = 0
	N100  QueryParamsLimit = 100
	N1000 QueryParamsLimit = 1000
	N500  QueryParamsLimit = 500
)

Defines values for QueryParamsLimit.

type QueryResponse

type QueryResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Rows
	JSON400      *Problem
	JSON401      *Problem
}

func ParseQueryResponse

func ParseQueryResponse(rsp *http.Response) (*QueryResponse, error)

ParseQueryResponse parses an HTTP response from a QueryWithResponse call

func (QueryResponse) Status

func (r QueryResponse) Status() string

Status returns HTTPResponse.Status

func (QueryResponse) StatusCode

func (r QueryResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type RequiredHeaderError

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

func (*RequiredHeaderError) Error

func (e *RequiredHeaderError) Error() string

func (*RequiredHeaderError) Unwrap

func (e *RequiredHeaderError) Unwrap() error

type RequiredParamError

type RequiredParamError struct {
	ParamName string
}

func (*RequiredParamError) Error

func (e *RequiredParamError) Error() string

type Rows

type Rows struct {
	Columns []Column `json:"columns"`

	// Explain explain the executed query
	Explain Explain    `json:"explain"`
	Rows    [][]string `json:"rows"`
	Scope   []Scope    `json:"scope"`
}

Rows defines model for Rows.

type Scope

type Scope struct {
	Source ScopeRef   `json:"source"`
	Table  ScopeTable `json:"table"`
}

Scope defines model for Scope.

type ScopeRef

type ScopeRef struct {
	Connector string `json:"connector"`
	Name      string `json:"name"`
	Schema    string `json:"schema"`
	Table     string `json:"table"`
}

ScopeRef defines model for ScopeRef.

type ScopeTable

type ScopeTable struct {
	Name   string `json:"name"`
	Schema string `json:"schema"`
}

ScopeTable defines model for ScopeTable.

type ServerInterface

type ServerInterface interface {
	// Fetch all available connectors
	// (GET /v1/connectors)
	GetConnectors(w http.ResponseWriter, r *http.Request)
	// Set a new catalog
	// (POST /v1/namespace/{namespace}/catalog)
	SetCatalog(w http.ResponseWriter, r *http.Request, namespace string)
	// Delete a single catalog
	// (DELETE /v1/namespace/{namespace}/catalog/{catalog})
	DeleteCatalog(w http.ResponseWriter, r *http.Request, namespace string, catalog string)
	// Fetch all data sets within the given catalog
	// (GET /v1/namespace/{namespace}/catalog/{catalog})
	GetCatalog(w http.ResponseWriter, r *http.Request, namespace string, catalog string)
	// Add a table to a catalog
	// (PUT /v1/namespace/{namespace}/catalog/{catalog})
	UpdateCatalog(w http.ResponseWriter, r *http.Request, namespace string, catalog string)
	// Fetch all data catalogs
	// (GET /v1/namespace/{namespace}/catalogs)
	GetCatalogs(w http.ResponseWriter, r *http.Request, namespace string)
	// Register a new connector
	// (POST /v1/namespace/{namespace}/connectors)
	NewConnector(w http.ResponseWriter, r *http.Request, namespace string)
	// Revoke the given key
	// (DELETE /v1/namespace/{namespace}/key/{id}/revoke)
	DeleteKey(w http.ResponseWriter, r *http.Request, namespace string, id string)
	// Fetch all API keys
	// (GET /v1/namespace/{namespace}/keys)
	GetKeys(w http.ResponseWriter, r *http.Request, namespace string)
	// Register a new API key
	// (POST /v1/namespace/{namespace}/keys)
	NewKey(w http.ResponseWriter, r *http.Request, namespace string)
	// Interact with the data catalogs through SQL
	// (GET /v1/namespace/{namespace}/query)
	Query(w http.ResponseWriter, r *http.Request, namespace string, params QueryParams)
	// Create a new source
	// (POST /v1/namespace/{namespace}/source)
	NewSource(w http.ResponseWriter, r *http.Request, namespace string)
	// Test the source connection
	// (POST /v1/namespace/{namespace}/source/test_connection)
	TestSourceConnection(w http.ResponseWriter, r *http.Request, namespace string)
	// Delete a single catalog source
	// (DELETE /v1/namespace/{namespace}/source/{source})
	DeleteSource(w http.ResponseWriter, r *http.Request, namespace string, source string)
	// Fetch the source details within the given catalog
	// (GET /v1/namespace/{namespace}/source/{source})
	GetSource(w http.ResponseWriter, r *http.Request, namespace string, source string)
	// Fetch the latest source tables and schemas
	// (GET /v1/namespace/{namespace}/source/{source}/fetch)
	FetchSource(w http.ResponseWriter, r *http.Request, namespace string, source string, params FetchSourceParams)
	// Fetch the source options within the given catalog
	// (GET /v1/namespace/{namespace}/source/{source}/options)
	GetSourceOptions(w http.ResponseWriter, r *http.Request, namespace string, source string)
	// Fetch all sources
	// (GET /v1/namespace/{namespace}/sources)
	GetSources(w http.ResponseWriter, r *http.Request, namespace string)
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
	ErrorHandlerFunc   func(w http.ResponseWriter, r *http.Request, err error)
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) DeleteCatalog

func (siw *ServerInterfaceWrapper) DeleteCatalog(w http.ResponseWriter, r *http.Request)

DeleteCatalog operation middleware

func (*ServerInterfaceWrapper) DeleteKey

func (siw *ServerInterfaceWrapper) DeleteKey(w http.ResponseWriter, r *http.Request)

DeleteKey operation middleware

func (*ServerInterfaceWrapper) DeleteSource

func (siw *ServerInterfaceWrapper) DeleteSource(w http.ResponseWriter, r *http.Request)

DeleteSource operation middleware

func (*ServerInterfaceWrapper) FetchSource

func (siw *ServerInterfaceWrapper) FetchSource(w http.ResponseWriter, r *http.Request)

FetchSource operation middleware

func (*ServerInterfaceWrapper) GetCatalog

func (siw *ServerInterfaceWrapper) GetCatalog(w http.ResponseWriter, r *http.Request)

GetCatalog operation middleware

func (*ServerInterfaceWrapper) GetCatalogs

func (siw *ServerInterfaceWrapper) GetCatalogs(w http.ResponseWriter, r *http.Request)

GetCatalogs operation middleware

func (*ServerInterfaceWrapper) GetConnectors

func (siw *ServerInterfaceWrapper) GetConnectors(w http.ResponseWriter, r *http.Request)

GetConnectors operation middleware

func (*ServerInterfaceWrapper) GetKeys added in v0.2.0

GetKeys operation middleware

func (*ServerInterfaceWrapper) GetSource

func (siw *ServerInterfaceWrapper) GetSource(w http.ResponseWriter, r *http.Request)

GetSource operation middleware

func (*ServerInterfaceWrapper) GetSourceOptions

func (siw *ServerInterfaceWrapper) GetSourceOptions(w http.ResponseWriter, r *http.Request)

GetSourceOptions operation middleware

func (*ServerInterfaceWrapper) GetSources

func (siw *ServerInterfaceWrapper) GetSources(w http.ResponseWriter, r *http.Request)

GetSources operation middleware

func (*ServerInterfaceWrapper) NewConnector

func (siw *ServerInterfaceWrapper) NewConnector(w http.ResponseWriter, r *http.Request)

NewConnector operation middleware

func (*ServerInterfaceWrapper) NewKey

NewKey operation middleware

func (*ServerInterfaceWrapper) NewSource

func (siw *ServerInterfaceWrapper) NewSource(w http.ResponseWriter, r *http.Request)

NewSource operation middleware

func (*ServerInterfaceWrapper) Query

Query operation middleware

func (*ServerInterfaceWrapper) SetCatalog

func (siw *ServerInterfaceWrapper) SetCatalog(w http.ResponseWriter, r *http.Request)

SetCatalog operation middleware

func (*ServerInterfaceWrapper) TestSourceConnection

func (siw *ServerInterfaceWrapper) TestSourceConnection(w http.ResponseWriter, r *http.Request)

TestSourceConnection operation middleware

func (*ServerInterfaceWrapper) UpdateCatalog

func (siw *ServerInterfaceWrapper) UpdateCatalog(w http.ResponseWriter, r *http.Request)

UpdateCatalog operation middleware

type SetCatalog

type SetCatalog struct {
	Description string   `json:"description"`
	Labels      []string `json:"labels"`

	// Name the catalog name referenced within SQL queries
	Name   string         `json:"name"`
	Tables []CatalogTable `json:"tables"`
	Uid    string         `json:"uid"`
}

SetCatalog defines model for SetCatalog.

type SetCatalogJSONRequestBody

type SetCatalogJSONRequestBody = SetCatalog

SetCatalogJSONRequestBody defines body for SetCatalog for application/json ContentType.

type SetCatalogResponse

type SetCatalogResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *Catalog
	JSON401      *Problem
}

func ParseSetCatalogResponse

func ParseSetCatalogResponse(rsp *http.Response) (*SetCatalogResponse, error)

ParseSetCatalogResponse parses an HTTP response from a SetCatalogWithResponse call

func (SetCatalogResponse) Status

func (r SetCatalogResponse) Status() string

Status returns HTTPResponse.Status

func (SetCatalogResponse) StatusCode

func (r SetCatalogResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Source

type Source struct {
	// Connector represents the connector name used to connect with the given source
	Connector string `json:"connector"`
	Healthy   bool   `json:"healthy"`
	Name      string `json:"name"`
	Tables    Tables `json:"tables"`
	Uid       string `json:"uid"`
}

Source defines model for Source.

type SourceOptions

type SourceOptions map[string]string

SourceOptions defines model for SourceOptions.

type SourceRef

type SourceRef struct {
	Name  string   `json:"name"`
	Table TableRef `json:"table"`
}

SourceRef defines model for SourceRef.

type Sources

type Sources = []Source

Sources defines model for Sources.

type Table

type Table struct {
	Columns    []Column `json:"columns"`
	Connector  string   `json:"connector"`
	Name       string   `json:"name"`
	Schema     string   `json:"schema"`
	Schemaless bool     `json:"schemaless"`
}

Table defines model for Table.

type TableRef

type TableRef struct {
	// Name the table name referenced within SQL queries
	Name string `json:"name"`

	// Schema the table schema referenced within SQL queries
	Schema string `json:"schema"`
}

TableRef defines model for TableRef.

type Tables

type Tables = []Table

Tables defines model for Tables.

type TestSourceConnectionJSONRequestBody

type TestSourceConnectionJSONRequestBody = NewSource

TestSourceConnectionJSONRequestBody defines body for TestSourceConnection for application/json ContentType.

type TestSourceConnectionResponse

type TestSourceConnectionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Empty
	JSON400      *Problem
	JSON401      *Problem
}

func ParseTestSourceConnectionResponse

func ParseTestSourceConnectionResponse(rsp *http.Response) (*TestSourceConnectionResponse, error)

ParseTestSourceConnectionResponse parses an HTTP response from a TestSourceConnectionWithResponse call

func (TestSourceConnectionResponse) Status

Status returns HTTPResponse.Status

func (TestSourceConnectionResponse) StatusCode

func (r TestSourceConnectionResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type Unimplemented

type Unimplemented struct{}

func (Unimplemented) DeleteCatalog

func (_ Unimplemented) DeleteCatalog(w http.ResponseWriter, r *http.Request, namespace string, catalog string)

Delete a single catalog (DELETE /v1/namespace/{namespace}/catalog/{catalog})

func (Unimplemented) DeleteKey

func (_ Unimplemented) DeleteKey(w http.ResponseWriter, r *http.Request, namespace string, id string)

Revoke the given key (DELETE /v1/namespace/{namespace}/key/{id}/revoke)

func (Unimplemented) DeleteSource

func (_ Unimplemented) DeleteSource(w http.ResponseWriter, r *http.Request, namespace string, source string)

Delete a single catalog source (DELETE /v1/namespace/{namespace}/source/{source})

func (Unimplemented) FetchSource

func (_ Unimplemented) FetchSource(w http.ResponseWriter, r *http.Request, namespace string, source string, params FetchSourceParams)

Fetch the latest source tables and schemas (GET /v1/namespace/{namespace}/source/{source}/fetch)

func (Unimplemented) GetCatalog

func (_ Unimplemented) GetCatalog(w http.ResponseWriter, r *http.Request, namespace string, catalog string)

Fetch all data sets within the given catalog (GET /v1/namespace/{namespace}/catalog/{catalog})

func (Unimplemented) GetCatalogs

func (_ Unimplemented) GetCatalogs(w http.ResponseWriter, r *http.Request, namespace string)

Fetch all data catalogs (GET /v1/namespace/{namespace}/catalogs)

func (Unimplemented) GetConnectors

func (_ Unimplemented) GetConnectors(w http.ResponseWriter, r *http.Request)

Fetch all available connectors (GET /v1/connectors)

func (Unimplemented) GetKeys added in v0.2.0

func (_ Unimplemented) GetKeys(w http.ResponseWriter, r *http.Request, namespace string)

Fetch all API keys (GET /v1/namespace/{namespace}/keys)

func (Unimplemented) GetSource

func (_ Unimplemented) GetSource(w http.ResponseWriter, r *http.Request, namespace string, source string)

Fetch the source details within the given catalog (GET /v1/namespace/{namespace}/source/{source})

func (Unimplemented) GetSourceOptions

func (_ Unimplemented) GetSourceOptions(w http.ResponseWriter, r *http.Request, namespace string, source string)

Fetch the source options within the given catalog (GET /v1/namespace/{namespace}/source/{source}/options)

func (Unimplemented) GetSources

func (_ Unimplemented) GetSources(w http.ResponseWriter, r *http.Request, namespace string)

Fetch all sources (GET /v1/namespace/{namespace}/sources)

func (Unimplemented) NewConnector

func (_ Unimplemented) NewConnector(w http.ResponseWriter, r *http.Request, namespace string)

Register a new connector (POST /v1/namespace/{namespace}/connectors)

func (Unimplemented) NewKey

func (_ Unimplemented) NewKey(w http.ResponseWriter, r *http.Request, namespace string)

Register a new API key (POST /v1/namespace/{namespace}/keys)

func (Unimplemented) NewSource

func (_ Unimplemented) NewSource(w http.ResponseWriter, r *http.Request, namespace string)

Create a new source (POST /v1/namespace/{namespace}/source)

func (Unimplemented) Query

func (_ Unimplemented) Query(w http.ResponseWriter, r *http.Request, namespace string, params QueryParams)

Interact with the data catalogs through SQL (GET /v1/namespace/{namespace}/query)

func (Unimplemented) SetCatalog

func (_ Unimplemented) SetCatalog(w http.ResponseWriter, r *http.Request, namespace string)

Set a new catalog (POST /v1/namespace/{namespace}/catalog)

func (Unimplemented) TestSourceConnection

func (_ Unimplemented) TestSourceConnection(w http.ResponseWriter, r *http.Request, namespace string)

Test the source connection (POST /v1/namespace/{namespace}/source/test_connection)

func (Unimplemented) UpdateCatalog

func (_ Unimplemented) UpdateCatalog(w http.ResponseWriter, r *http.Request, namespace string, catalog string)

Add a table to a catalog (PUT /v1/namespace/{namespace}/catalog/{catalog})

type UnmarshalingParamError

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

type UpdateCatalogJSONRequestBody

type UpdateCatalogJSONRequestBody = SetCatalog

UpdateCatalogJSONRequestBody defines body for UpdateCatalog for application/json ContentType.

type UpdateCatalogResponse

type UpdateCatalogResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *Catalog
	JSON401      *Problem
}

func ParseUpdateCatalogResponse

func ParseUpdateCatalogResponse(rsp *http.Response) (*UpdateCatalogResponse, error)

ParseUpdateCatalogResponse parses an HTTP response from a UpdateCatalogWithResponse call

func (UpdateCatalogResponse) Status

func (r UpdateCatalogResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateCatalogResponse) StatusCode

func (r UpdateCatalogResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Jump to

Keyboard shortcuts

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