Documentation ¶
Overview ¶
Package v1 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 ¶
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
- func Use(router chi.Router, server ServerInterface)
- func WriteProblem(w http.ResponseWriter, err error)
- type Catalog
- type Catalogs
- type ChiServerOptions
- type Cluster
- type Column
- type InvalidParamFormatError
- type MiddlewareFunc
- type Namespace
- type Namespaces
- type NewCatalogJSONRequestBody
- type NewNamespace
- type NewNamespaceJSONRequestBody
- type NewNamespaceServiceAccountJSONRequestBody
- type NewServiceAccount
- type NewSource
- type NewSourceJSONRequestBody
- type NewUser
- type NewUserJSONRequestBody
- type Node
- type Problem
- type QueryParams
- type RequiredHeaderError
- type RequiredParamError
- type Rows
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) DeleteCatalog(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteNamespace(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteNamespaceServiceAccount(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteSource(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteUser(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) FetchSource(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetAllNamespaces(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetCatalog(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetCatalogs(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetCluster(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetNamespaceServiceAccount(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetNamespaceServiceAccounts(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetSource(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetSourceOptions(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetSources(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetUser(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) NewCatalog(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) NewNamespace(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) NewNamespaceServiceAccount(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) NewSource(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) NewUser(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) Query(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdateCatalog(w http.ResponseWriter, r *http.Request)
- type ServiceAccount
- type ServiceAccounts
- type Source
- type SourceOptions
- type Sources
- type Table
- type Tables
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type UnmarshallingParamError
- type UpdateCatalogJSONRequestBody
- type UpsertCatalog
- type UpsertTable
- type User
Constants ¶
This section is empty.
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 Use ¶
func Use(router chi.Router, server ServerInterface)
Use set's up the v1 OpenAPI endpoints server handler within the given router.
func WriteProblem ¶
func WriteProblem(w http.ResponseWriter, err error)
WriteProblem writes a JSON v1 problem message to the given response writer. The problem status, description, and other properties are unwrapped from the given error.
Types ¶
type Catalog ¶
type Catalog struct { Description string `json:"description"` Id uint64 `json:"id"` Labels *[]string `json:"labels"` Name string `json:"name"` Tables Tables `json:"tables"` }
Catalog defines model for Catalog.
type ChiServerOptions ¶
type ChiServerOptions struct { BaseURL string BaseRouter chi.Router Middlewares []MiddlewareFunc ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
type Cluster ¶
type Cluster struct { Healthy bool `json:"healthy"` Leader uint64 `json:"leader"` Nodes []Node `json:"nodes"` }
Cluster defines model for Cluster.
type Column ¶
type Column struct { Cap uint64 `json:"cap"` Id uint64 `json:"id"` Name string `json:"name"` Nullable bool `json:"nullable"` Type string `json:"type"` }
Column defines model for Column.
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type Namespace ¶
type Namespace struct {
Name string `json:"name"`
}
Namespace defines model for Namespace.
type NewCatalogJSONRequestBody ¶
type NewCatalogJSONRequestBody = UpsertCatalog
NewCatalogJSONRequestBody defines body for NewCatalog for application/json ContentType.
type NewNamespace ¶
type NewNamespace struct {
Name string `json:"name"`
}
NewNamespace defines model for NewNamespace.
type NewNamespaceJSONRequestBody ¶
type NewNamespaceJSONRequestBody = NewNamespace
NewNamespaceJSONRequestBody defines body for NewNamespace for application/json ContentType.
type NewNamespaceServiceAccountJSONRequestBody ¶
type NewNamespaceServiceAccountJSONRequestBody = NewServiceAccount
NewNamespaceServiceAccountJSONRequestBody defines body for NewNamespaceServiceAccount for application/json ContentType.
type NewServiceAccount ¶
type NewServiceAccount struct { Description string `json:"description"` Labels []string `json:"labels"` Name string `json:"name"` Principal *string `json:"principal,omitempty"` }
NewServiceAccount defines model for NewServiceAccount.
type NewSource ¶
type NewSource struct { // Connector represents the connector name used to connect with the given source Connector string `json:"connector"` 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 NewUser ¶
type NewUser struct { Email string `json:"email"` FullName string `json:"full_name"` Password string `json:"password"` Username string `json:"username"` }
NewUser defines model for NewUser.
type NewUserJSONRequestBody ¶
type NewUserJSONRequestBody = NewUser
NewUserJSONRequestBody defines body for NewUser for application/json ContentType.
type Node ¶
type Node struct { Address string `json:"address"` Healthy bool `json:"healthy"` Id uint64 `json:"id"` Ready bool `json:"ready"` }
Node defines model for Node.
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"` }
QueryParams defines parameters for Query.
type RequiredHeaderError ¶
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"` Rows [][]interface{} `json:"rows"` }
Rows defines model for Rows.
type ServerInterface ¶
type ServerInterface interface { // Get information about the current cluster // (GET /v1/cluster) GetCluster(w http.ResponseWriter, r *http.Request) // Create a new namespace // (POST /v1/namespace) NewNamespace(w http.ResponseWriter, r *http.Request) // Delete a single namespace // (DELETE /v1/namespace/{namespace}) DeleteNamespace(w http.ResponseWriter, r *http.Request, namespace string) // Post a new catalog // (POST /v1/namespace/{namespace}/catalog) NewCatalog(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) // Interact with the data catalogs through SQL // (GET /v1/namespace/{namespace}/query) Query(w http.ResponseWriter, r *http.Request, namespace string, params QueryParams) // Add a new service account to the given namespace // (POST /v1/namespace/{namespace}/service_account) NewNamespaceServiceAccount(w http.ResponseWriter, r *http.Request, namespace string) // Delete a single service account within a namespace // (DELETE /v1/namespace/{namespace}/service_account/{service_id}) DeleteNamespaceServiceAccount(w http.ResponseWriter, r *http.Request, namespace string, serviceId uint64) // Get a single service account within a namespace // (GET /v1/namespace/{namespace}/service_account/{service_id}) GetNamespaceServiceAccount(w http.ResponseWriter, r *http.Request, namespace string, serviceId uint64) // Retreive all service accounts of a given namespace // (GET /v1/namespace/{namespace}/service_accounts) GetNamespaceServiceAccounts(w http.ResponseWriter, r *http.Request, namespace string) // Create a new source // (POST /v1/namespace/{namespace}/source) NewSource(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) // 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) // Retreive all namespaces // (GET /v1/namespaces) GetAllNamespaces(w http.ResponseWriter, r *http.Request) // Create a user // (POST /v1/user) NewUser(w http.ResponseWriter, r *http.Request) // Delete a single user // (DELETE /v1/user/{id}) DeleteUser(w http.ResponseWriter, r *http.Request, id uint64) // Get a user matching the given id // (GET /v1/user/{id}) GetUser(w http.ResponseWriter, r *http.Request, id uint64) }
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) DeleteNamespace ¶
func (siw *ServerInterfaceWrapper) DeleteNamespace(w http.ResponseWriter, r *http.Request)
DeleteNamespace operation middleware
func (*ServerInterfaceWrapper) DeleteNamespaceServiceAccount ¶
func (siw *ServerInterfaceWrapper) DeleteNamespaceServiceAccount(w http.ResponseWriter, r *http.Request)
DeleteNamespaceServiceAccount operation middleware
func (*ServerInterfaceWrapper) DeleteSource ¶
func (siw *ServerInterfaceWrapper) DeleteSource(w http.ResponseWriter, r *http.Request)
DeleteSource operation middleware
func (*ServerInterfaceWrapper) DeleteUser ¶
func (siw *ServerInterfaceWrapper) DeleteUser(w http.ResponseWriter, r *http.Request)
DeleteUser operation middleware
func (*ServerInterfaceWrapper) FetchSource ¶
func (siw *ServerInterfaceWrapper) FetchSource(w http.ResponseWriter, r *http.Request)
FetchSource operation middleware
func (*ServerInterfaceWrapper) GetAllNamespaces ¶
func (siw *ServerInterfaceWrapper) GetAllNamespaces(w http.ResponseWriter, r *http.Request)
GetAllNamespaces 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) GetCluster ¶
func (siw *ServerInterfaceWrapper) GetCluster(w http.ResponseWriter, r *http.Request)
GetCluster operation middleware
func (*ServerInterfaceWrapper) GetNamespaceServiceAccount ¶
func (siw *ServerInterfaceWrapper) GetNamespaceServiceAccount(w http.ResponseWriter, r *http.Request)
GetNamespaceServiceAccount operation middleware
func (*ServerInterfaceWrapper) GetNamespaceServiceAccounts ¶
func (siw *ServerInterfaceWrapper) GetNamespaceServiceAccounts(w http.ResponseWriter, r *http.Request)
GetNamespaceServiceAccounts 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) GetUser ¶
func (siw *ServerInterfaceWrapper) GetUser(w http.ResponseWriter, r *http.Request)
GetUser operation middleware
func (*ServerInterfaceWrapper) NewCatalog ¶
func (siw *ServerInterfaceWrapper) NewCatalog(w http.ResponseWriter, r *http.Request)
NewCatalog operation middleware
func (*ServerInterfaceWrapper) NewNamespace ¶
func (siw *ServerInterfaceWrapper) NewNamespace(w http.ResponseWriter, r *http.Request)
NewNamespace operation middleware
func (*ServerInterfaceWrapper) NewNamespaceServiceAccount ¶
func (siw *ServerInterfaceWrapper) NewNamespaceServiceAccount(w http.ResponseWriter, r *http.Request)
NewNamespaceServiceAccount operation middleware
func (*ServerInterfaceWrapper) NewSource ¶
func (siw *ServerInterfaceWrapper) NewSource(w http.ResponseWriter, r *http.Request)
NewSource operation middleware
func (*ServerInterfaceWrapper) NewUser ¶
func (siw *ServerInterfaceWrapper) NewUser(w http.ResponseWriter, r *http.Request)
NewUser operation middleware
func (*ServerInterfaceWrapper) Query ¶
func (siw *ServerInterfaceWrapper) Query(w http.ResponseWriter, r *http.Request)
Query operation middleware
func (*ServerInterfaceWrapper) UpdateCatalog ¶
func (siw *ServerInterfaceWrapper) UpdateCatalog(w http.ResponseWriter, r *http.Request)
UpdateCatalog operation middleware
type ServiceAccount ¶
type ServiceAccount struct { Description string `json:"description"` Labels []string `json:"labels"` Name string `json:"name"` Principal openapi_types.Email `json:"principal"` }
ServiceAccount defines model for ServiceAccount.
type ServiceAccounts ¶
type ServiceAccounts = []ServiceAccount
ServiceAccounts defines model for ServiceAccounts.
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"` Id uint64 `json:"id"` Name string `json:"name"` Tables Tables `json:"tables"` }
Source defines model for Source.
type SourceOptions ¶
SourceOptions defines model for SourceOptions.
type Table ¶
type Table struct { Columns []Column `json:"columns"` Id uint64 `json:"id"` Name string `json:"name"` Schema string `json:"schema"` Schemaless bool `json:"schemaless"` }
Table defines model for Table.
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type UnmarshallingParamError ¶
func (*UnmarshallingParamError) Error ¶
func (e *UnmarshallingParamError) Error() string
func (*UnmarshallingParamError) Unwrap ¶
func (e *UnmarshallingParamError) Unwrap() error
type UpdateCatalogJSONRequestBody ¶
type UpdateCatalogJSONRequestBody = UpsertCatalog
UpdateCatalogJSONRequestBody defines body for UpdateCatalog for application/json ContentType.
type UpsertCatalog ¶
type UpsertCatalog struct { Description string `json:"description"` Labels []string `json:"labels"` // Name the catalog name referenced within SQL queries Name string `json:"name"` Tables []UpsertTable `json:"tables"` }
UpsertCatalog defines model for UpsertCatalog.
type UpsertTable ¶
type UpsertTable struct { Id uint64 `json:"id"` // Name the table name referenced within SQL queries Name string `json:"name"` // Schema the table schema referenced within SQL queries Schema string `json:"schema"` }
UpsertTable defines model for UpsertTable.