rpctypes

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: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ErrorCodeEmpty int = iota
	ErrorCodeOther
	ErrorCodeEmptyArgs
	ErrorCodeInvalidArgs
	ErrorCodeWrongAuth

	ErrorCodeInternal int = -32603
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionsAddArgs

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

	NewActions []types.AutoAction `json:"new_actions"`
}

type ActionsAddErrData

type ActionsAddErrData struct {
	ActionIdx      int    `json:"act_idx"`
	ParamErrorText string `json:"param_err_txt"`
}

type ActionsAddReply

type ActionsAddReply struct {
	ActionsAdded int `json:"added"`
}

type ActionsDeleteArgs

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

	Indexes []int `json:"indexes"`
}

type ActionsDeleteErrData

type ActionsDeleteErrData struct {
	InvalidIdxIdx int `json:"invalid_idx_idx"`
}

type ActionsDeleteReply

type ActionsDeleteReply struct {
	ActionsDeleted int `json:"deleted"`
}

type ActionsEditArgs

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

	ChangedActions map[int]types.AutoAction `json:"changed_actions"`
}

type ActionsEditErrData

type ActionsEditErrData struct {
	ActionIdx      int    `json:"changed_action_idx"`
	ParamErrorText string `json:"param_err_txt"`
}

type ActionsEditReply

type ActionsEditReply struct {
	ActionsEdited int `json:"edited"`
}

type ActionsGetTypesReply

type ActionsGetTypesReply struct {
	Types []execs.ExecutorType `json:"types"`
}

type Error

type Error struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

Error type with some additions

func (Error) Error

func (e Error) Error() string

Error implements `error` interface. Returns `Code` + `Message` fields

func (Error) ErrorCode

func (e Error) ErrorCode() int

ErrorCode implements eth-jsonrpc's custom Error interface

func (Error) ErrorData

func (e Error) ErrorData() interface{}

ErrorCode implements eth-jsonrpc's custom DataError interface

type ServerPingArgs

type ServerPingArgs struct {
	Message string `json:"msg"`
}

type ServerPingReply

type ServerPingReply struct {
	Message string    `json:"msg"`
	Time    time.Time `json:"time"`
	IsPing  bool      `json:"is_ping"`
}

type ServerSettingsGetReply

type ServerSettingsGetReply struct {
	RegistrationClosed bool `json:"register_closed"`
}

type UsersGetArgs

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

type UsersGetReply

type UsersGetReply struct {
	UUID        string             `json:"uid"`
	Login       string             `json:"login"`
	PasswordB64 string             `json:"pass_b64"`
	LastBeat    time.Time          `json:"last_beat"`
	Actions     []types.AutoAction `json:"actions"`
}

type UsersMarkAliveArgs

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

type UsersMarkAliveReply

type UsersMarkAliveReply struct {
	SetTime time.Time `json:"set_time"`
}

type UsersRegisterArgs

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

type UsersRegisterReply

type UsersRegisterReply struct {
	UID string
}

Jump to

Keyboard shortcuts

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