Documentation
¶
Index ¶
- type ConfigResponse
- type EndpointMetricsResponse
- type OTP
- type OTPCodeVerifyData
- type OTPCodeVerifyDataResponse
- type RegisterReturnData
- type RegisteredUsersResponse
- type RegistrationPayload
- type SecurityModeNoExpire
- type SignMessage
- type SignMessageResponse
- type SignMultipleTransactions
- type SignMultipleTransactionsResponse
- type SignTransaction
- type SignTransactionResponse
- type VerificationPayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigResponse ¶
type ConfigResponse struct {
// the minimum delay allowed between registration requests for the same guardian, in seconds
RegistrationDelay uint32 `json:"registration-delay"`
// the total time a user gets banned for failing too many verify code requests, in seconds
BackoffWrongCode uint32 `json:"backoff-wrong-code"`
}
ConfigResponse is the service response to the tcs config request
type EndpointMetricsResponse ¶
type EndpointMetricsResponse struct {
NumRequests uint64 `json:"num_requests"`
NumTotalErrors uint64 `json:"num_total_errors"`
ErrorsCount map[int]uint64 `json:"errors_count"`
TotalResponseTime time.Duration `json:"total_response_time"`
}
EndpointMetricsResponse defines the response for status metrics endpoint
type OTP ¶
type OTP struct {
Scheme string `json:"scheme,omitempty"`
Host string `json:"host,omitempty"`
Issuer string `json:"issuer,omitempty"`
Account string `json:"account,omitempty"`
Algorithm string `json:"algorithm,omitempty"`
Counter uint32 `json:"counter,omitempty"`
Digits uint32 `json:"digits,omitempty"`
Period uint32 `json:"period,omitempty"`
Secret string `json:"secret,omitempty"`
TimeSinceGeneration int64 `json:"seconds_since_generation,omitempty"`
}
OTP defines the one time password details
type OTPCodeVerifyData ¶
type OTPCodeVerifyData struct {
RemainingTrials int `json:"remaining-trials"`
ResetAfter int `json:"reset-after"`
SecurityModeRemainingTrials int `json:"security-mode-remaining-trials"`
SecurityModeResetAfter int `json:"security-mode-reset-after"`
}
OTPCodeVerifyData defines the data provided for otp code info
type OTPCodeVerifyDataResponse ¶
type OTPCodeVerifyDataResponse struct {
VerifyData *OTPCodeVerifyData `json:"verification-retry-info"`
}
OTPCodeVerifyDataResponse defines the reponse data for otp code verify info
type RegisterReturnData ¶
type RegisterReturnData struct {
OTP *OTP `json:"otp"`
GuardianAddress string `json:"guardian-address"`
}
RegisterReturnData represents the returned data for a registration request
type RegisteredUsersResponse ¶
type RegisteredUsersResponse struct {
Count uint32 `json:"count"`
}
RegisteredUsersResponse is the service response to the registered users request
type RegistrationPayload ¶
type RegistrationPayload struct {
Tag string `json:"tag"`
}
RegistrationPayload represents the JSON requests a user uses to require a new provider registration
type SecurityModeNoExpire ¶ added in v1.0.16
type SecurityModeNoExpire struct {
Code string `json:"code"`
SecondCode string `json:"second-code"`
UserAddr string `json:"user"`
}
SecurityModeNoExpire is the JSON request the service is receiving when a user wants to set/unset the security mode
type SignMessage ¶ added in v1.0.15
type SignMessage struct {
Code string `json:"code"`
SecondCode string `json:"second-code"`
Message string `json:"message"`
UserAddr string `json:"user"`
GuardianAddr string `json:"guardian"`
}
SignMessage is the JSON request the service is receiving when a user sends a new message to be signed by the guardian
type SignMessageResponse ¶ added in v1.0.15
type SignMessageResponse struct {
Message string `json:"message"`
Signature string `json:"signature"`
}
SignMessageResponse is the service response to the sign message request
type SignMultipleTransactions ¶
type SignMultipleTransactions struct {
Code string `json:"code"`
SecondCode string `json:"second-code"`
Txs []transaction.FrontendTransaction `json:"transactions"`
}
SignMultipleTransactions is the JSON request the service is receiving when a user sends multiple transactions to be signed by the guardian
type SignMultipleTransactionsResponse ¶
type SignMultipleTransactionsResponse struct {
Txs []transaction.FrontendTransaction `json:"transactions"`
}
SignMultipleTransactionsResponse is the service response to the sign multiple transactions request
type SignTransaction ¶
type SignTransaction struct {
Code string `json:"code"`
SecondCode string `json:"second-code"`
Tx transaction.FrontendTransaction `json:"transaction"`
}
SignTransaction is the JSON request the service is receiving when a user sends a new transaction to be signed by the guardian
type SignTransactionResponse ¶
type SignTransactionResponse struct {
Tx transaction.FrontendTransaction `json:"transaction"`
}
SignTransactionResponse is the service response to the sign transaction request
type VerificationPayload ¶
type VerificationPayload struct {
Code string `json:"code"`
SecondCode string `json:"second-code"`
Guardian string `json:"guardian"`
}
VerificationPayload represents the JSON requests a user uses to validate the authentication code