server

package
v0.0.0-...-a5c581d Latest Latest
Warning

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

Go to latest
Published: May 19, 2021 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJWTMiddleware

func NewJWTMiddleware() *jwt.GinJWTMiddleware

Types

type ID

type ID string

func NewWatchdogID

func NewWatchdogID(symbol string, interval string) ID

func (ID) GetInterval

func (id ID) GetInterval() string

func (ID) GetSymbol

func (id ID) GetSymbol() string

type Server

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

func NewServer

func NewServer() *Server

func (*Server) AllPositions

func (s *Server) AllPositions(c *gin.Context)

func (*Server) CreateWatchdog

func (s *Server) CreateWatchdog(c *gin.Context)

func (*Server) GetPosition

func (s *Server) GetPosition(c *gin.Context)

func (*Server) GetTotalAnalysis

func (s *Server) GetTotalAnalysis(c *gin.Context)

func (*Server) GetWatchdog

func (s *Server) GetWatchdog(c *gin.Context)

func (*Server) GetWatchdogAnalysis

func (s *Server) GetWatchdogAnalysis(c *gin.Context)

func (*Server) InitAPI

func (s *Server) InitAPI()

func (*Server) Register

func (s *Server) Register(c *gin.Context)

func (*Server) Run

func (s *Server) Run()

func (*Server) StopWatchdog

func (s *Server) StopWatchdog(c *gin.Context)

type User

type User struct {
	Client    *binance.Client
	Watchdogs map[ID]*internal.Watchdog
	APIKey    string
	APISecret string
}

func (*User) DeleteWatchdog

func (u *User) DeleteWatchdog(symbol string, interval string) (bool, error)

func (*User) GetWatchdog

func (u *User) GetWatchdog(symbol string, interval string) (*internal.Watchdog, bool)

Jump to

Keyboard shortcuts

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