rest

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package rest API.

the purpose of this application is to provide an application that is using plain go code to define an API

This should demonstrate all the possible comment annotations that are available to turn go code into a fully compliant swagger 2.0 spec

Terms Of Service:

there are no TOS at this moment, use at your own risk we take no responsibility

Schemes: http, https
Version: 0.0.1
License: MIT http://opensource.org/licenses/MIT

Security:
- api_key:

SecurityDefinitions:
api_key:
     type: apiKey
     name: KEY
     in: header

swagger:meta

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRoutes

func RegisterRoutes(cliCtx context.CLIContext, r *mux.Router, storeName string)

RegisterRoutes, a central function to define routes which is called by the rest module in main application

func RegisterRoutesV2

func RegisterRoutesV2(cliCtx context.CLIContext, r *mux.Router, storeName string)

RegisterRoutesV2, a central function to define routes which is called by the rest module in main application

Types

type CoinInfos

type CoinInfos struct {
	// The coin infos
	// in: body
	Body []types.CoinInfo
}

A CoinInfos is the info of the coins. swagger:response CoinInfos

type ResponseError

type ResponseError struct {
	// The error message
	// in: body
	Body struct {
		// The validation message
		//
		// Example: Expected type int
		Code string
		// An optional field name to which this validation applies
		Message string
		// An optional field name to which this validation applies
		Data string
	}
}

A ResponseError is an error that is used when the required input fails validation. swagger:response ResponseError

type TokenInfo

type TokenInfo struct {
	// The market message
	// in: body
	Body types.Token
}

A TokenInfo is the info of the market. swagger:response TokenInfo

type TokenInfos

type TokenInfos struct {
	// The market message
	// in: body
	Body []types.Token
}

A TokenInfos is the info of the market. swagger:response TokenInfos

Jump to

Keyboard shortcuts

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