api

package
v0.0.0-...-b259709 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package api for KMD HTTP API

API for KMD (Key Management Daemon)

Schemes: http
Host: localhost
BasePath: /
Version: 0.0.1
License:
Contact: contact@algorand.com

Consumes:
- application/json

Produces:
- application/json

Security:
- api_key:

SecurityDefinitions:
api_key:
  type: apiKey
  name: X-KMD-API-Token
  in: header
  description: >-
    Generated header parameter. This value can be found in `/kmd/data/dir/kmd.token`. Example value:
    '330b2e4fc9b20f4f89812cf87f1dabeb716d23e3f11aec97a61ff5f750563b78'
  required: true
  x-example: 330b2e4fc9b20f4f89812cf87f1dabeb716d23e3f11aec97a61ff5f750563b78

swagger:meta --- IF YOU MODIFY SUBPACKAGES: IMPORTANT MAKE SURE YOU REGENERATE THE SWAGGER SPEC (using go:generate) MAKE SURE IT VALIDATES

Currently, server implementation annotations serve as the API ground truth. From that, we use go-swagger to generate a swagger spec.

Autogenerate the swagger json. Base path must be a fully specified package name (else, it seems that swagger feeds a relative path to loader.Config.Import(), and that breaks the vendor directory if the source is symlinked from elsewhere)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(sm *session.Manager, log logging.Logger, allowedOrigins []string, apiToken string, reqCB func()) *mux.Router

Handler returns the root mux router for the kmd API. It sets up handlers on subrouters specific to each API version.

func SwaggerHandler

func SwaggerHandler(w http.ResponseWriter, r *http.Request)

SwaggerHandler is an httpHandler for route GET /swagger.json, and at this point is not versioned.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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