restapi

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: May 29, 2025 License: Apache-2.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientAuthenticationRequest

type ClientAuthenticationRequest struct {
	RegistrationId int64                        `json:"registrationId" validate:"required,min=1"`
	RegHash        types.ClientRegistrationHash `json:"regHash" validate:"required"`
}

Client Authenticate handling via /temelemtry/authenticate

func (*ClientAuthenticationRequest) String

func (c *ClientAuthenticationRequest) String() string

func (*ClientAuthenticationRequest) Validate added in v0.1.5

func (c *ClientAuthenticationRequest) Validate() (err error)

type ClientAuthenticationResponse

type ClientAuthenticationResponse = ClientRegistrationResponse

for now the /authenticate response is the same as the /register response

type ClientRegistrationRequest

type ClientRegistrationRequest struct {
	ClientRegistration types.ClientRegistration `json:"clientRegistration" validate:"required"`
}

ClientRegistrationRequest is the request payload body POST'd to the server

func (*ClientRegistrationRequest) String

func (c *ClientRegistrationRequest) String() string

func (*ClientRegistrationRequest) Validate added in v0.1.5

func (c *ClientRegistrationRequest) Validate() (err error)

type ClientRegistrationResponse

type ClientRegistrationResponse struct {
	RegistrationId   int64  `json:"registrationId" validate:"required,min=1"`
	AuthToken        string `json:"authToken" validate:"required,jwt"`
	RegistrationDate string `json:"registrationDate" validate:"required,datetime=2006-01-02T15:04:05.999999999Z07:00"`
}

ClientRegistrationResponse is the response payload body from the server

func (*ClientRegistrationResponse) String

func (c *ClientRegistrationResponse) String() string

func (*ClientRegistrationResponse) Validate added in v0.1.2

func (c *ClientRegistrationResponse) Validate() (err error)

type TelemetryReportRequest

type TelemetryReportRequest struct {
	telemetrylib.TelemetryReport
}

TelemetryReportRequest is the request payload body POST'd to the server

func (*TelemetryReportRequest) String

func (t *TelemetryReportRequest) String() string

type TelemetryReportResponse

type TelemetryReportResponse struct {
	ProcessingId int64                    `json:"processingId" validate:"min=0"`
	ProcessedAt  types.TelemetryTimeStamp `json:"processedAt" validate:"required"`
}

TelemetryReportResponse is the response payload body from the server

func NewTelemetryReportResponse

func NewTelemetryReportResponse(procId int64, procAt types.TelemetryTimeStamp) *TelemetryReportResponse

func (*TelemetryReportResponse) ProcessingInfo

func (t *TelemetryReportResponse) ProcessingInfo() string

func (*TelemetryReportResponse) String

func (t *TelemetryReportResponse) String() string

func (*TelemetryReportResponse) Validate added in v0.1.5

func (t *TelemetryReportResponse) Validate() (err error)

Jump to

Keyboard shortcuts

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