types

package
v0.0.0-...-492db17 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2023 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddActionsRequest

type AddActionsRequest struct {
	Actions []AutoAction
}

type AutoAction

type AutoAction struct {
	// Custom type because I can^W^W of marshalling
	After      helpers.Duration       `json:"after" bson:"after"`
	Parameters map[string]execs.Param `json:"params" bson:"params"`
	Executor   execs.ExecutorType     `json:"exec_type" bson:"exec_type"`
	Executed   bool                   `json:"executed" bson:"executed"`
}

AutoAction is used to store actions to execute automaticly

type GetUserResponse

type GetUserResponse struct {
	Error    string                  `json:"error"`
	Message  string                  `json:"msg"`
	UUID     string                  `json:"uid"`
	Login    string                  `json:"login"`
	LastBeat time.Time               `json:"last_beat"`
	Settings GetUserResponseSettings `json:"settings"`
}

type GetUserResponseSettings

type GetUserResponseSettings struct {
	Actions []AutoAction `json:"actions"`
}

type RegisterRequest

type RegisterRequest struct {
	Login       string `json:"login"`
	PasswordB64 string `json:"pass_b64"`
}

Requests

type RegisterResponse

type RegisterResponse struct {
	Error   string `json:"error"`
	Message string `json:"msg"`
	UUID    string `json:"uid"`
}

type User

type User struct {
	UUID         primitive.ObjectID `json:"_id" bson:"_id"`
	Login        string             `json:"login" bson:"login"`
	PasswordHash string             `json:"pass_hash" bson:"pass_hash"`
	LastBeat     time.Time          `json:"last_beat" bson:"last_beat"`
	Actions      []AutoAction       `json:"actions" bson:"actions"`
}

User is used to store User data

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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