apikey

package
v0.0.0-...-aec784a Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package apikey provides primitives to interact the openapi HTTP API.

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (*openapi3.Swagger, error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file.

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

Types

type APIKey

type APIKey struct {

	// API key (must be kept secret).
	Key string `json:"key"`
}

APIKey defines model for APIKey.

type BBc1Domain

type BBc1Domain struct {

	// BBc-1 domain ID in hexadecimal string.
	Domain string `json:"domain"`
}

BBc1Domain defines model for BBc1Domain.

type BadRequest

type BadRequest Error

BadRequest defines model for BadRequest.

type ChiServerOptions

type ChiServerOptions struct {
	BaseURL     string
	BaseRouter  chi.Router
	Middlewares []MiddlewareFunc
}

type Error

type Error struct {

	// Error code with prefix `btcgw::`.
	Error string `json:"error"`

	// Message to the user.
	ErrorDescription *string `json:"error_description,omitempty"`
}

Error defines model for Error.

type InternalServerError

type InternalServerError Error

InternalServerError defines model for InternalServerError.

type MiddlewareFunc

type MiddlewareFunc func(http.HandlerFunc) http.HandlerFunc

type PostApikeysCreateJSONBody

type PostApikeysCreateJSONBody BBc1Domain

PostApikeysCreateJSONBody defines parameters for PostApikeysCreate.

type PostApikeysCreateJSONRequestBody

type PostApikeysCreateJSONRequestBody PostApikeysCreateJSONBody

PostApikeysCreateJSONRequestBody defines body for PostApikeysCreate for application/json ContentType.

type PostApikeysDeleteJSONBody

type PostApikeysDeleteJSONBody APIKey

PostApikeysDeleteJSONBody defines parameters for PostApikeysDelete.

type PostApikeysDeleteJSONRequestBody

type PostApikeysDeleteJSONRequestBody PostApikeysDeleteJSONBody

PostApikeysDeleteJSONRequestBody defines body for PostApikeysDelete for application/json ContentType.

type ServerInterface

type ServerInterface interface {
	// Creates an API Key associated with the BBc-1 domain specified by ID.
	// (POST /apikeys/create)
	PostApikeysCreate(w http.ResponseWriter, r *http.Request)
	// Deletes the specified API Key.
	// (POST /apikeys/delete)
	PostApikeysDelete(w http.ResponseWriter, r *http.Request)
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) PostApikeysCreate

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

PostApikeysCreate operation middleware

func (*ServerInterfaceWrapper) PostApikeysDelete

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

PostApikeysDelete operation middleware

Jump to

Keyboard shortcuts

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