Documentation
¶
Overview ¶
Package gen provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.6.0 DO NOT EDIT.
Index ¶
- Constants
- type Action
- type BadRequest
- type ChallengeCreated
- type ChallengeRequest
- type ChallengeResponse
- type ChallengeResponseDecision
- type ChallengeStatus
- type ChallengeStatusDecision
- type ChallengeStatusStatus
- type ChallengeVerified
- type ConfigureWebhookJSONRequestBody
- type CreateChallengeJSONRequestBody
- type CreateMPARequestJSONRequestBody
- type DecryptCreated
- type DecryptRequest
- type DecryptResponse
- type DecryptResult
- type DecryptResultStatus
- type DecryptStatus
- type DecryptStatusStatus
- type DeviceRegister
- type DeviceRegisterPushPlatform
- type DeviceRegistered
- type Error
- type ErrorErrorCode
- type MPACreated
- type MPACreatedStatus
- type MPAGroup
- type MPAGroupMember
- type MPARequest
- type MPARequestRejectPolicy
- type MPAResponse
- type MPAResponseDecision
- type MPAResponseResult
- type MPAResponseResultStatus
- type MPAStatus
- type MPAStatusStatus
- type PushRequest
- type PushResult
- type PushResultStatus
- type PushToDeviceJSONRequestBody
- type RateLimited
- type RegisterDeviceJSONRequestBody
- type RequestDecryptJSONRequestBody
- type RespondChallengeJSONRequestBody
- type RespondDecryptJSONRequestBody
- type RespondMPAJSONRequestBody
- type ServerInfo
- type ServerInfoMode
- type Unauthorized
- type WebhookConfig
- type WebhookConfigEvents
- type WebhookCreated
Constants ¶
const (
BearerAuthScopes = "BearerAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct {
// Description Human-readable description displayed to user
Description string `json:"description"`
Params *map[string]interface{} `json:"params,omitempty"`
// Type Machine-readable action type
Type string `json:"type"`
}
Action defines model for Action.
type ChallengeCreated ¶
type ChallengeCreated struct {
ChallengeId openapi_types.UUID `json:"challenge_id"`
ExpiresAt time.Time `json:"expires_at"`
Fingerprint string `json:"fingerprint"`
Pictogram []string `json:"pictogram"`
PictogramSpeakable string `json:"pictogram_speakable"`
}
ChallengeCreated defines model for ChallengeCreated.
type ChallengeRequest ¶
type ChallengeRequest struct {
Action Action `json:"action"`
// DevicePublicKey Base64-encoded compressed P-256 public key (33 bytes)
DevicePublicKey string `json:"device_public_key"`
// Fingerprint SHA256 of device public key, hex-encoded
Fingerprint string `json:"fingerprint"`
}
ChallengeRequest defines model for ChallengeRequest.
type ChallengeResponse ¶
type ChallengeResponse struct {
ChallengeId openapi_types.UUID `json:"challenge_id"`
Decision ChallengeResponseDecision `json:"decision"`
DevicePublicKey string `json:"device_public_key"`
// Signature Base64-encoded ECDSA signature (64 bytes)
Signature string `json:"signature"`
Timestamp time.Time `json:"timestamp"`
}
ChallengeResponse defines model for ChallengeResponse.
type ChallengeResponseDecision ¶
type ChallengeResponseDecision string
ChallengeResponseDecision defines model for ChallengeResponse.Decision.
const ( ChallengeResponseDecisionApproved ChallengeResponseDecision = "approved" ChallengeResponseDecisionRejected ChallengeResponseDecision = "rejected" )
Defines values for ChallengeResponseDecision.
func (ChallengeResponseDecision) Valid ¶
func (e ChallengeResponseDecision) Valid() bool
Valid indicates whether the value is a known member of the ChallengeResponseDecision enum.
type ChallengeStatus ¶
type ChallengeStatus struct {
ChallengeId openapi_types.UUID `json:"challenge_id"`
Decision *ChallengeStatusDecision `json:"decision,omitempty"`
Fingerprint *string `json:"fingerprint,omitempty"`
Pictogram *[]string `json:"pictogram,omitempty"`
PictogramSpeakable *string `json:"pictogram_speakable,omitempty"`
Status ChallengeStatusStatus `json:"status"`
VerifiedAt *time.Time `json:"verified_at,omitempty"`
}
ChallengeStatus defines model for ChallengeStatus.
type ChallengeStatusDecision ¶
type ChallengeStatusDecision string
ChallengeStatusDecision defines model for ChallengeStatus.Decision.
const ( ChallengeStatusDecisionApproved ChallengeStatusDecision = "approved" ChallengeStatusDecisionRejected ChallengeStatusDecision = "rejected" )
Defines values for ChallengeStatusDecision.
func (ChallengeStatusDecision) Valid ¶
func (e ChallengeStatusDecision) Valid() bool
Valid indicates whether the value is a known member of the ChallengeStatusDecision enum.
type ChallengeStatusStatus ¶
type ChallengeStatusStatus string
ChallengeStatusStatus defines model for ChallengeStatus.Status.
const ( ChallengeStatusStatusExpired ChallengeStatusStatus = "expired" ChallengeStatusStatusPending ChallengeStatusStatus = "pending" ChallengeStatusStatusRejected ChallengeStatusStatus = "rejected" ChallengeStatusStatusVerified ChallengeStatusStatus = "verified" )
Defines values for ChallengeStatusStatus.
func (ChallengeStatusStatus) Valid ¶
func (e ChallengeStatusStatus) Valid() bool
Valid indicates whether the value is a known member of the ChallengeStatusStatus enum.
type ChallengeVerified ¶
type ChallengeVerified struct {
Action *Action `json:"action,omitempty"`
Fingerprint string `json:"fingerprint"`
Pictogram []string `json:"pictogram"`
PictogramSpeakable string `json:"pictogram_speakable"`
Verified bool `json:"verified"`
}
ChallengeVerified defines model for ChallengeVerified.
type ConfigureWebhookJSONRequestBody ¶
type ConfigureWebhookJSONRequestBody = WebhookConfig
ConfigureWebhookJSONRequestBody defines body for ConfigureWebhook for application/json ContentType.
type CreateChallengeJSONRequestBody ¶
type CreateChallengeJSONRequestBody = ChallengeRequest
CreateChallengeJSONRequestBody defines body for CreateChallenge for application/json ContentType.
type CreateMPARequestJSONRequestBody ¶
type CreateMPARequestJSONRequestBody = MPARequest
CreateMPARequestJSONRequestBody defines body for CreateMPARequest for application/json ContentType.
type DecryptCreated ¶
type DecryptCreated struct {
ExpiresAt time.Time `json:"expires_at"`
Fingerprint string `json:"fingerprint"`
RequestId string `json:"request_id"`
}
DecryptCreated defines model for DecryptCreated.
type DecryptRequest ¶
type DecryptRequest struct {
Action Action `json:"action"`
DevicePublicKey string `json:"device_public_key"`
Fingerprint string `json:"fingerprint"`
// IntegratorEncryptedPayload Base64-encoded ECIES ciphertext (ephemeral_pk || nonce || ciphertext || tag)
IntegratorEncryptedPayload string `json:"integrator_encrypted_payload"`
}
DecryptRequest defines model for DecryptRequest.
type DecryptResponse ¶
type DecryptResponse struct {
DevicePublicKey string `json:"device_public_key"`
// EncryptedPlaintext Transport-encrypted result
EncryptedPlaintext string `json:"encrypted_plaintext"`
RequestId string `json:"request_id"`
Signature string `json:"signature"`
Timestamp time.Time `json:"timestamp"`
}
DecryptResponse defines model for DecryptResponse.
type DecryptResult ¶
type DecryptResult struct {
DecryptedAt time.Time `json:"decrypted_at"`
Fingerprint string `json:"fingerprint"`
Pictogram *[]string `json:"pictogram,omitempty"`
// Plaintext Base64-encoded decrypted data
Plaintext string `json:"plaintext"`
Status DecryptResultStatus `json:"status"`
}
DecryptResult defines model for DecryptResult.
type DecryptResultStatus ¶
type DecryptResultStatus string
DecryptResultStatus defines model for DecryptResult.Status.
const (
Decrypted DecryptResultStatus = "decrypted"
)
Defines values for DecryptResultStatus.
func (DecryptResultStatus) Valid ¶
func (e DecryptResultStatus) Valid() bool
Valid indicates whether the value is a known member of the DecryptResultStatus enum.
type DecryptStatus ¶
type DecryptStatus struct {
DecryptedAt *time.Time `json:"decrypted_at,omitempty"`
Fingerprint *string `json:"fingerprint,omitempty"`
Pictogram *[]string `json:"pictogram,omitempty"`
PictogramSpeakable *string `json:"pictogram_speakable,omitempty"`
Plaintext *string `json:"plaintext,omitempty"`
RequestId string `json:"request_id"`
Status DecryptStatusStatus `json:"status"`
}
DecryptStatus defines model for DecryptStatus.
type DecryptStatusStatus ¶
type DecryptStatusStatus string
DecryptStatusStatus defines model for DecryptStatus.Status.
const ( DecryptStatusStatusDecrypted DecryptStatusStatus = "decrypted" DecryptStatusStatusExpired DecryptStatusStatus = "expired" DecryptStatusStatusPending DecryptStatusStatus = "pending" DecryptStatusStatusRejected DecryptStatusStatus = "rejected" )
Defines values for DecryptStatusStatus.
func (DecryptStatusStatus) Valid ¶
func (e DecryptStatusStatus) Valid() bool
Valid indicates whether the value is a known member of the DecryptStatusStatus enum.
type DeviceRegister ¶
type DeviceRegister struct {
DevicePublicKey string `json:"device_public_key"`
PushPlatform DeviceRegisterPushPlatform `json:"push_platform"`
PushToken string `json:"push_token"`
}
DeviceRegister defines model for DeviceRegister.
type DeviceRegisterPushPlatform ¶
type DeviceRegisterPushPlatform string
DeviceRegisterPushPlatform defines model for DeviceRegister.PushPlatform.
const ( Apns DeviceRegisterPushPlatform = "apns" Fcm DeviceRegisterPushPlatform = "fcm" )
Defines values for DeviceRegisterPushPlatform.
func (DeviceRegisterPushPlatform) Valid ¶
func (e DeviceRegisterPushPlatform) Valid() bool
Valid indicates whether the value is a known member of the DeviceRegisterPushPlatform enum.
type DeviceRegistered ¶
type DeviceRegistered struct {
Fingerprint string `json:"fingerprint"`
Pictogram []string `json:"pictogram"`
PictogramSpeakable string `json:"pictogram_speakable"`
RegisteredAt time.Time `json:"registered_at"`
}
DeviceRegistered defines model for DeviceRegistered.
type Error ¶
type Error struct {
Error struct {
Code ErrorErrorCode `json:"code"`
Details *map[string]interface{} `json:"details,omitempty"`
Message string `json:"message"`
} `json:"error"`
}
Error defines model for Error.
type ErrorErrorCode ¶
type ErrorErrorCode string
ErrorErrorCode defines model for Error.Error.Code.
const ( CHALLENGEALREADYUSED ErrorErrorCode = "CHALLENGE_ALREADY_USED" CHALLENGEEXPIRED ErrorErrorCode = "CHALLENGE_EXPIRED" CHALLENGENOTFOUND ErrorErrorCode = "CHALLENGE_NOT_FOUND" DECRYPTIONFAILED ErrorErrorCode = "DECRYPTION_FAILED" FINGERPRINTMISMATCH ErrorErrorCode = "FINGERPRINT_MISMATCH" INVALIDPUBLICKEY ErrorErrorCode = "INVALID_PUBLIC_KEY" INVALIDSIGNATURE ErrorErrorCode = "INVALID_SIGNATURE" RATELIMITED ErrorErrorCode = "RATE_LIMITED" RELAYUNAVAILABLE ErrorErrorCode = "RELAY_UNAVAILABLE" TIMESTAMPINVALID ErrorErrorCode = "TIMESTAMP_INVALID" UNAUTHORIZED ErrorErrorCode = "UNAUTHORIZED" )
Defines values for ErrorErrorCode.
func (ErrorErrorCode) Valid ¶
func (e ErrorErrorCode) Valid() bool
Valid indicates whether the value is a known member of the ErrorErrorCode enum.
type MPACreated ¶
type MPACreated struct {
ChallengesSent *int `json:"challenges_sent,omitempty"`
ExpiresAt time.Time `json:"expires_at"`
GroupsRequired int `json:"groups_required"`
GroupsTotal int `json:"groups_total"`
RequestId string `json:"request_id"`
Status MPACreatedStatus `json:"status"`
}
MPACreated defines model for MPACreated.
type MPACreatedStatus ¶
type MPACreatedStatus string
MPACreatedStatus defines model for MPACreated.Status.
const (
MPACreatedStatusPending MPACreatedStatus = "pending"
)
Defines values for MPACreatedStatus.
func (MPACreatedStatus) Valid ¶
func (e MPACreatedStatus) Valid() bool
Valid indicates whether the value is a known member of the MPACreatedStatus enum.
type MPAGroup ¶
type MPAGroup struct {
Members []MPAGroupMember `json:"members"`
}
MPAGroup defines model for MPAGroup.
type MPAGroupMember ¶
type MPAGroupMember struct {
DevicePublicKey string `json:"device_public_key"`
Fingerprint string `json:"fingerprint"`
}
MPAGroupMember defines model for MPAGroupMember.
type MPARequest ¶
type MPARequest struct {
Action Action `json:"action"`
ExpiresInSeconds *int `json:"expires_in_seconds,omitempty"`
Groups []MPAGroup `json:"groups"`
RejectPolicy *MPARequestRejectPolicy `json:"reject_policy,omitempty"`
RequestId string `json:"request_id"`
// Required Number of groups that must approve
Required int `json:"required"`
}
MPARequest defines model for MPARequest.
type MPARequestRejectPolicy ¶
type MPARequestRejectPolicy string
MPARequestRejectPolicy defines model for MPARequest.RejectPolicy.
const ( Continue MPARequestRejectPolicy = "continue" RejectOnFirst MPARequestRejectPolicy = "reject_on_first" )
Defines values for MPARequestRejectPolicy.
func (MPARequestRejectPolicy) Valid ¶
func (e MPARequestRejectPolicy) Valid() bool
Valid indicates whether the value is a known member of the MPARequestRejectPolicy enum.
type MPAResponse ¶
type MPAResponse struct {
Decision MPAResponseDecision `json:"decision"`
DevicePublicKey string `json:"device_public_key"`
RequestId string `json:"request_id"`
Signature string `json:"signature"`
Timestamp time.Time `json:"timestamp"`
}
MPAResponse defines model for MPAResponse.
type MPAResponseDecision ¶
type MPAResponseDecision string
MPAResponseDecision defines model for MPAResponse.Decision.
const ( MPAResponseDecisionApproved MPAResponseDecision = "approved" MPAResponseDecisionRejected MPAResponseDecision = "rejected" )
Defines values for MPAResponseDecision.
func (MPAResponseDecision) Valid ¶
func (e MPAResponseDecision) Valid() bool
Valid indicates whether the value is a known member of the MPAResponseDecision enum.
type MPAResponseResult ¶
type MPAResponseResult struct {
Fingerprint *string `json:"fingerprint,omitempty"`
GroupSatisfied *bool `json:"group_satisfied,omitempty"`
GroupsRequired *int `json:"groups_required,omitempty"`
GroupsSatisfied *int `json:"groups_satisfied,omitempty"`
Pictogram *[]string `json:"pictogram,omitempty"`
QuorumReached *bool `json:"quorum_reached,omitempty"`
Status MPAResponseResultStatus `json:"status"`
}
MPAResponseResult defines model for MPAResponseResult.
type MPAResponseResultStatus ¶
type MPAResponseResultStatus string
MPAResponseResultStatus defines model for MPAResponseResult.Status.
const ( MPAResponseResultStatusAlreadySatisfied MPAResponseResultStatus = "already_satisfied" MPAResponseResultStatusApproved MPAResponseResultStatus = "approved" MPAResponseResultStatusRecorded MPAResponseResultStatus = "recorded" MPAResponseResultStatusRejected MPAResponseResultStatus = "rejected" )
Defines values for MPAResponseResultStatus.
func (MPAResponseResultStatus) Valid ¶
func (e MPAResponseResultStatus) Valid() bool
Valid indicates whether the value is a known member of the MPAResponseResultStatus enum.
type MPAStatus ¶
type MPAStatus struct {
ExpiresAt *time.Time `json:"expires_at,omitempty"`
GroupsRequired int `json:"groups_required"`
GroupsSatisfied *[]int `json:"groups_satisfied,omitempty"`
GroupsTotal int `json:"groups_total"`
RequestId string `json:"request_id"`
Status MPAStatusStatus `json:"status"`
}
MPAStatus defines model for MPAStatus.
type MPAStatusStatus ¶
type MPAStatusStatus string
MPAStatusStatus defines model for MPAStatus.Status.
const ( MPAStatusStatusApproved MPAStatusStatus = "approved" MPAStatusStatusPending MPAStatusStatus = "pending" MPAStatusStatusRejected MPAStatusStatus = "rejected" MPAStatusStatusTimeout MPAStatusStatus = "timeout" )
Defines values for MPAStatusStatus.
func (MPAStatusStatus) Valid ¶
func (e MPAStatusStatus) Valid() bool
Valid indicates whether the value is a known member of the MPAStatusStatus enum.
type PushRequest ¶
type PushRequest struct {
Fingerprint string `json:"fingerprint"`
// Payload Challenge notification payload
Payload map[string]interface{} `json:"payload"`
// RequestSignature ECDSA signature over request
RequestSignature string `json:"request_signature"`
ServerId string `json:"server_id"`
Timestamp time.Time `json:"timestamp"`
}
PushRequest defines model for PushRequest.
type PushResult ¶
type PushResult struct {
DeliveredAt *time.Time `json:"delivered_at,omitempty"`
PushId *string `json:"push_id,omitempty"`
Status PushResultStatus `json:"status"`
}
PushResult defines model for PushResult.
type PushResultStatus ¶
type PushResultStatus string
PushResultStatus defines model for PushResult.Status.
const ( Delivered PushResultStatus = "delivered" Failed PushResultStatus = "failed" Queued PushResultStatus = "queued" )
Defines values for PushResultStatus.
func (PushResultStatus) Valid ¶
func (e PushResultStatus) Valid() bool
Valid indicates whether the value is a known member of the PushResultStatus enum.
type PushToDeviceJSONRequestBody ¶
type PushToDeviceJSONRequestBody = PushRequest
PushToDeviceJSONRequestBody defines body for PushToDevice for application/json ContentType.
type RegisterDeviceJSONRequestBody ¶
type RegisterDeviceJSONRequestBody = DeviceRegister
RegisterDeviceJSONRequestBody defines body for RegisterDevice for application/json ContentType.
type RequestDecryptJSONRequestBody ¶
type RequestDecryptJSONRequestBody = DecryptRequest
RequestDecryptJSONRequestBody defines body for RequestDecrypt for application/json ContentType.
type RespondChallengeJSONRequestBody ¶
type RespondChallengeJSONRequestBody = ChallengeResponse
RespondChallengeJSONRequestBody defines body for RespondChallenge for application/json ContentType.
type RespondDecryptJSONRequestBody ¶
type RespondDecryptJSONRequestBody = DecryptResponse
RespondDecryptJSONRequestBody defines body for RespondDecrypt for application/json ContentType.
type RespondMPAJSONRequestBody ¶
type RespondMPAJSONRequestBody = MPAResponse
RespondMPAJSONRequestBody defines body for RespondMPA for application/json ContentType.
type ServerInfo ¶
type ServerInfo struct {
Features *struct {
MnemonicGeneration *bool `json:"mnemonic_generation,omitempty"`
Mpa *bool `json:"mpa,omitempty"`
SecureDecrypt *bool `json:"secure_decrypt,omitempty"`
Webhooks *bool `json:"webhooks,omitempty"`
} `json:"features,omitempty"`
Mode ServerInfoMode `json:"mode"`
RelayUrl *string `json:"relay_url,omitempty"`
ServerId string `json:"server_id"`
ServerName string `json:"server_name"`
ServerPictogram []string `json:"server_pictogram"`
// ServerPictogramSpeakable Space-separated speakable names (JSON), hyphen-separated in URLs
ServerPictogramSpeakable string `json:"server_pictogram_speakable"`
// ServerPublicKey Base64-encoded compressed P-256 public key (33 bytes)
ServerPublicKey string `json:"server_public_key"`
Version string `json:"version"`
}
ServerInfo defines model for ServerInfo.
type ServerInfoMode ¶
type ServerInfoMode string
ServerInfoMode defines model for ServerInfo.Mode.
const ( Init ServerInfoMode = "init" Operational ServerInfoMode = "operational" )
Defines values for ServerInfoMode.
func (ServerInfoMode) Valid ¶
func (e ServerInfoMode) Valid() bool
Valid indicates whether the value is a known member of the ServerInfoMode enum.
type WebhookConfig ¶
type WebhookConfig struct {
Events []WebhookConfigEvents `json:"events"`
// Secret HMAC secret for signature verification
Secret *string `json:"secret,omitempty"`
Url string `json:"url"`
}
WebhookConfig defines model for WebhookConfig.
type WebhookConfigEvents ¶
type WebhookConfigEvents string
WebhookConfigEvents defines model for WebhookConfig.Events.
const ( WebhookConfigEventsChallengeExpired WebhookConfigEvents = "challenge.expired" WebhookConfigEventsChallengeRejected WebhookConfigEvents = "challenge.rejected" WebhookConfigEventsChallengeVerified WebhookConfigEvents = "challenge.verified" WebhookConfigEventsDecryptCompleted WebhookConfigEvents = "decrypt.completed" WebhookConfigEventsDecryptExpired WebhookConfigEvents = "decrypt.expired" WebhookConfigEventsDecryptRejected WebhookConfigEvents = "decrypt.rejected" WebhookConfigEventsMpaApproved WebhookConfigEvents = "mpa.approved" WebhookConfigEventsMpaRejected WebhookConfigEvents = "mpa.rejected" WebhookConfigEventsMpaTimeout WebhookConfigEvents = "mpa.timeout" )
Defines values for WebhookConfigEvents.
func (WebhookConfigEvents) Valid ¶
func (e WebhookConfigEvents) Valid() bool
Valid indicates whether the value is a known member of the WebhookConfigEvents enum.