mongo

package
v0.0.0-...-6214e1c Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

type Bot struct {
	Uuid        string   `json:"Uuid" bson:"Uuid"`
	Status      string   `json:"Status" bson:"Status"`
	Started     string   `json:"Started" bson:"Started"`
	Finished    string   `json:"Finished" bson:"Finished"`
	Strategy    string   `json:"Strategy" bson:"Strategy"`
	Market      string   `json:"Market" bson:"Market"`
	Config      string   `json:"Config" bson:"Config"`
	Performance string   `json:"Performance" bson:"Performance"`
	Actions     []string `json:"Actions" bson:"Actions"`
}

type MongoStateStorage

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

func NewMongoStateStorage

func NewMongoStateStorage(mongoConn string, debug bool) *MongoStateStorage

func (*MongoStateStorage) Bots

func (s *MongoStateStorage) Bots() []Bot

func (*MongoStateStorage) FindUser

func (s *MongoStateStorage) FindUser(login string) User

func (*MongoStateStorage) GetJSONToken

func (s *MongoStateStorage) GetJSONToken(user User) string

GetJSONToken create a JSON token string

func (*MongoStateStorage) GetToken

func (s *MongoStateStorage) GetToken(user User) string

GetToken create a jwt token with user claims

func (*MongoStateStorage) NewUserFromJson

func (s *MongoStateStorage) NewUserFromJson(dataStream io.Reader) User

func (*MongoStateStorage) SaveSupertestResult

func (s *MongoStateStorage) SaveSupertestResult(results []map[string]string)

type User

type User struct {
	Uuid     string `json:"Uuid" bson:"Uuid"`
	Login    string `json:"Login" bson:"Login"`
	Password string `json:"Password" bson:"Password"`
}

UserJSON - json data expected for login/signup

Jump to

Keyboard shortcuts

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