Files
upstream-ory-kratos/pkg/httpclient/model_user_verification.go
upstream-mirror c60cc7ca75
Some checks failed
CI / Run tests and lints (push) Failing after 29s
CI / Build CLI docs (push) Has been skipped
CI / Run Playwright end-to-end tests (mysql) (push) Failing after 3s
CI / Run Playwright end-to-end tests (postgres) (push) Failing after 2s
CI / Run Playwright end-to-end tests (sqlite) (push) Failing after 3s
CodeQL / Analyze (go) (push) Failing after 4s
CodeQL / Analyze (javascript) (push) Failing after 3s
Docker Image Scanners / scanners (push) Failing after 4s
Synchronize Issue Labels / Synchronize Issue Labels (push) Has been skipped
CI / Run end-to-end tests (postgres) (push) Failing after 19s
CI / Run end-to-end tests (sqlite) (push) Failing after 2s
CI / Run Playwright end-to-end tests (cockroach) (push) Failing after 2s
CI / Draft newsletter (push) Has been skipped
CI / Generate release (push) Has been skipped
CI / Pending approval Slack notification (push) Has been skipped
CI / Send newsletter (push) Has been skipped
snapshot of https://github.com/ory/kratos.git (master, 2026-09-15; blobs > 131072B omitted)
2026-09-15 21:19:12 +05:00

114 lines
3.1 KiB
Go

/*
Ory Identities API
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
API version:
Contact: office@ory.sh
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package client
import (
"encoding/json"
"fmt"
)
// UserVerification \"pin\" means the holder proves knowledge of a PIN via pin_proof at login; \"platform\" means the device gates key use behind platform biometrics or an equivalent lock screen; \"none\" marks a possession-only key, usable as a second factor but never as the sole first factor. The empty value marks a legacy key from before user verification existed; such keys are rejected at login and must be re-enrolled.
type UserVerification string
// List of UserVerification
const (
USERVERIFICATION_PIN UserVerification = "pin"
USERVERIFICATION_PLATFORM UserVerification = "platform"
USERVERIFICATION_NONE UserVerification = "none"
)
// All allowed values of UserVerification enum
var AllowedUserVerificationEnumValues = []UserVerification{
"pin",
"platform",
"none",
}
func (v *UserVerification) UnmarshalJSON(src []byte) error {
var value string
err := json.Unmarshal(src, &value)
if err != nil {
return err
}
enumTypeValue := UserVerification(value)
for _, existing := range AllowedUserVerificationEnumValues {
if existing == enumTypeValue {
*v = enumTypeValue
return nil
}
}
return fmt.Errorf("%+v is not a valid UserVerification", value)
}
// NewUserVerificationFromValue returns a pointer to a valid UserVerification
// for the value passed as argument, or an error if the value passed is not allowed by the enum
func NewUserVerificationFromValue(v string) (*UserVerification, error) {
ev := UserVerification(v)
if ev.IsValid() {
return &ev, nil
} else {
return nil, fmt.Errorf("invalid value '%v' for UserVerification: valid values are %v", v, AllowedUserVerificationEnumValues)
}
}
// IsValid return true if the value is valid for the enum, false otherwise
func (v UserVerification) IsValid() bool {
for _, existing := range AllowedUserVerificationEnumValues {
if existing == v {
return true
}
}
return false
}
// Ptr returns reference to UserVerification value
func (v UserVerification) Ptr() *UserVerification {
return &v
}
type NullableUserVerification struct {
value *UserVerification
isSet bool
}
func (v NullableUserVerification) Get() *UserVerification {
return v.value
}
func (v *NullableUserVerification) Set(val *UserVerification) {
v.value = val
v.isSet = true
}
func (v NullableUserVerification) IsSet() bool {
return v.isSet
}
func (v *NullableUserVerification) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUserVerification(val *UserVerification) *NullableUserVerification {
return &NullableUserVerification{value: val, isSet: true}
}
func (v NullableUserVerification) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUserVerification) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}