rpc

package
v0.0.66 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: GPL-3.0 Imports: 3 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	// User's IP address, in a common textual format.
	// This field must always be set for all requests.
	UserIPA simple.IPAS `json:"userIPA"`

	// Parsed IP address of a user.	B = Byte array.
	// This field is used only in internal communications.
	UserIPAB net.IP `json:"-"`

	// Authorisation token.
	// This field is set for all requests of a logged user.
	Token simple.WebTokenString `json:"token"`
}

Auth is authorisation data. This field must always be set for all requests except 'Ping'.

type AuthChallengeData added in v0.0.54

type AuthChallengeData []byte

func (AuthChallengeData) Bytes added in v0.0.54

func (acd AuthChallengeData) Bytes() []byte

type CommonParams

type CommonParams struct {
	// Authorisation data.
	Auth *Auth `json:"auth"`
}

type CommonResult

type CommonResult struct {
	// Time taken to perform the request, in milliseconds.
	TimeSpent int64 `json:"timeSpent,omitempty"`
}

func (CommonResult) Clear

func (cr CommonResult) Clear()

Clear sets values to zeroed state so that it is removed from JSON output.

type CommonResultWithSuccess added in v0.0.54

type CommonResultWithSuccess struct {
	CommonResult
	Success
}

type DKeyParams added in v0.0.41

type DKeyParams struct {
	DKey cmb.Text `json:"dKey"`
}

type PageData added in v0.0.54

type PageData struct {
	// Number of current page of items.
	PageNumber cmb.Count `json:"pageNumber"`

	// Number of all available pages.
	TotalPages cmb.Count `json:"totalPages"`

	// Number of items on a full page.
	PageSize cmb.Count `json:"pageSize"`

	// Number of items on the current page.
	ItemsOnPage cmb.Count `json:"itemsOnPage"`

	// Total number of all items.
	TotalItems cmb.Count `json:"totalItems"`
}

type PingParams

type PingParams struct{}

type PingResult

type PingResult struct {
	Success
}

type RequestId added in v0.0.54

type RequestId = uint

type RequestsCount

type RequestsCount struct {
	TotalRequestsCount      cmb.Text `json:"totalRequestsCount"`
	SuccessfulRequestsCount cmb.Text `json:"successfulRequestsCount"`
}

type Success added in v0.0.54

type Success struct {
	OK cmb.Flag `json:"ok"`
}

Jump to

Keyboard shortcuts

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