handler

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SymbolParam     = "symbol"
	ResolutionParam = "res"
	FromParam       = "from"
	ToParam         = "to"
	NameParam       = "name"
	DeltaParam      = "delta"
)
View Source
const (
	QuoteRoute             = "/quote/"
	QuoteRouteWithParams   = QuoteRoute + ":" + SymbolParam
	CandlesRoute           = "/candles/"
	CandlesRouteWithParams = CandlesRoute + ":" +
		SymbolParam + "/:" +
		ResolutionParam + "/:" +
		FromParam + "/:" +
		ToParam
	DeltaCandlesRoute           = "/delta/candles/"
	DeltaCandlesRouteWithParams = DeltaCandlesRoute + ":" +
		SymbolParam + "/:" +
		ResolutionParam + "/:" +
		DeltaParam
)
View Source
const (
	WSRoute  = "/ws"
	APIRoute = "/api"
)
View Source
const (
	QuoteWSRoute = "/quote"
)

Variables

This section is empty.

Functions

func New added in v0.0.9

func New(store *store.Store) *gin.Engine

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func (*Handler) Candles

func (h *Handler) Candles(ctx *gin.Context)

func (*Handler) DeltaCandles

func (h *Handler) DeltaCandles(ctx *gin.Context)

func (*Handler) Quote

func (h *Handler) Quote(ctx *gin.Context)

func (*Handler) QuoteWS added in v0.0.9

func (h *Handler) QuoteWS(ctx *gin.Context)

type QuoteWSReq added in v0.0.9

type QuoteWSReq struct {
	Symbol string `json:"symbol"`
}

type Status added in v0.0.9

type Status struct {
	Succeed bool   `json:"succeed"`
	Error   string `json:"error"`
}

Jump to

Keyboard shortcuts

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