backend

package
v0.0.0-...-9578ce4 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2020 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitBotNameRegex

func InitBotNameRegex() (e error)

InitBotNameRegex initializes the regex for bot names.

func SetRoutes

func SetRoutes(r *chi.Mux, s *APIServer)

SetRoutes

Types

type APIServer

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

APIServer is an instance of the API service

func MakeAPIServer

func MakeAPIServer(
	kos *kelpos.KelpOS,
	botConfigsPath *kelpos.OSPath,
	botLogsPath *kelpos.OSPath,
	horizonTestnetURI string,
	apiTestNet *horizonclient.Client,
	horizonPubnetURI string,
	apiPubNet *horizonclient.Client,
	ccxtRestUrl string,
	noHeaders bool,
	quitFn func(),
	metricsTracker *plugins.MetricsTracker,
) (*APIServer, error)

MakeAPIServer is a factory method

type ErrorResponse

type ErrorResponse struct {
	Error string `json:"error"`
}

ErrorResponse represents an error (deprecated)

type KelpError

type KelpError struct {
	ObjectType errorType  `json:"object_type"`
	ObjectName string     `json:"object_name"`
	Date       time.Time  `json:"date"`
	Level      errorLevel `json:"level"`
	Message    string     `json:"message"`
}

KelpError represents an error

func (*KelpError) String

func (ke *KelpError) String() string

String is the Stringer method

type KelpErrorResponseWrapper

type KelpErrorResponseWrapper struct {
	KelpError KelpError `json:"kelp_error"`
}

KelpErrorResponseWrapper is the outer object that contains the Kelp Error

func (*KelpErrorResponseWrapper) String

func (kerw *KelpErrorResponseWrapper) String() string

String is the Stringer method

Jump to

Keyboard shortcuts

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