Documentation ¶
Index ¶
- func InitBotNameRegex() (e error)
- func SetRoutes(r *chi.Mux, s *APIServer)
- func SetVersionString(guiVersion string, cliVersion string)
- type APIServer
- type ErrorResponse
- type KelpError
- type KelpErrorListResponseWrapper
- type KelpErrorResponseWrapper
- type RemoveKelpErrorRequest
- type RemoveKelpErrorResponse
- type ServerMetadataResponse
- type UserData
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 SetVersionString ¶
SetVersionString sets the version string to be displayed in the GUI
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, disablePubnet bool, enableKaas bool, noHeaders bool, quitFn func(), metricsTracker *plugins.MetricsTracker, ) (*APIServer, error)
MakeAPIServer is a factory method
func (*APIServer) InitBackend ¶
InitBackend initializes anything required to get the backend ready to serve
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
}
ErrorResponse represents an error (deprecated)
type KelpError ¶
type KelpError struct { UUID string `json:"uuid"` 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
type KelpErrorListResponseWrapper ¶
type KelpErrorListResponseWrapper struct {
KelpErrorList []KelpError `json:"kelp_error_list"`
}
KelpErrorListResponseWrapper is the outer object that contains the Kelp Errors
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
type RemoveKelpErrorRequest ¶
type RemoveKelpErrorRequest struct { UserData UserData `json:"user_data"` KelpErrorIDs []string `json:"kelp_error_ids"` }
RemoveKelpErrorRequest is the outer object that contains the Kelp Error
type RemoveKelpErrorResponse ¶
RemoveKelpErrorResponse is the outer object that contains the Kelp Error
type ServerMetadataResponse ¶
type ServerMetadataResponse struct { DisablePubnet bool `json:"disable_pubnet"` EnableKaas bool `json:"enable_kaas"` }
ServerMetadataResponse is the response from the /serverMetadata endpoint
Source Files ¶
- api_server.go
- autogenerate_bot.go
- delete_bot.go
- error_constants.go
- fetch_kelp_errors.go
- fetch_price.go
- generate_bot_name.go
- get_bot_config.go
- get_bot_info.go
- get_bot_state.go
- get_new_bot_config.go
- list_bots.go
- new_secret_key.go
- options_metadata.go
- ping.go
- quit.go
- remove_kelp_errors.go
- routes.go
- send_metric_event.go
- serverMetadata.go
- start_bot.go
- stop_bot.go
- upsert_bot_config.go
- version.go