dao

package
v0.0.0-...-f9f454f Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: LGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBotNotFound = errors.New("bot not found")

ErrBotNotFound is returned new a bot is not found in database

View Source
var ErrInvalidData = errors.New("invalid data")

ErrInvalidData is returned new a bot is invalid (ex: CurrentSession.StartedAt == 0)

Functions

func CompleteGetBots

func CompleteGetBots(history bool) (bot.Bots, error)

CompleteGetBots returns all data about all bots

func FetchTop

func FetchTop(field string, traderType string, since int64, minimal int64, limit int64, onlyFirstOfArray bool) []bot.Top

func GenerateBotID

func GenerateBotID() (interface{}, error)

GenerateBotID generates a new bot id

func IsAuthorizedUser

func IsAuthorizedUser(apiKey string, accessLevel int8) bool

IsAuthorizedUser returns true if the given user (identified by API-Key) is authorized to get this level of info

func PublicGetCountBots

func PublicGetCountBots(untilTime int64) (int64, error)

PublicGetCountBots returns the number of active bot until time

func RegisterOrUpdate

func RegisterOrUpdate(uploadedBot *bot.Bot) (interface{}, error)

RegisterOrUpdate updates a bot if already in database or registers a new bot called after few minutes a bot is running

func UpdateBotUptimeAndProfitability

func UpdateBotUptimeAndProfitability(uploadedBot *bot.Bot) (interface{}, error)

UpdateBotUptimeAndProfitability updates bot in argument upTime and profitability (using BotID)

Types

This section is empty.

Jump to

Keyboard shortcuts

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