phone

package
v1.12.3 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: MIT Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SendVerificationCodeResponse_Result_name = map[int32]string{
		0: "OK",
		1: "NOT_INVITED",
		2: "RATE_LIMITED",
		3: "INVALID_PHONE_NUMBER",
		4: "UNSUPPORTED_PHONE_TYPE",
	}
	SendVerificationCodeResponse_Result_value = map[string]int32{
		"OK":                     0,
		"NOT_INVITED":            1,
		"RATE_LIMITED":           2,
		"INVALID_PHONE_NUMBER":   3,
		"UNSUPPORTED_PHONE_TYPE": 4,
	}
)

Enum value maps for SendVerificationCodeResponse_Result.

View Source
var (
	CheckVerificationCodeResponse_Result_name = map[int32]string{
		0: "OK",
		1: "INVALID_CODE",
		2: "NO_VERIFICATION",
		3: "RATE_LIMITED",
	}
	CheckVerificationCodeResponse_Result_value = map[string]int32{
		"OK":              0,
		"INVALID_CODE":    1,
		"NO_VERIFICATION": 2,
		"RATE_LIMITED":    3,
	}
)

Enum value maps for CheckVerificationCodeResponse_Result.

View Source
var (
	GetAssociatedPhoneNumberResponse_Result_name = map[int32]string{
		0: "OK",
		1: "NOT_FOUND",
		2: "NOT_INVITED",
		3: "UNLOCKED_TIMELOCK_ACCOUNT",
	}
	GetAssociatedPhoneNumberResponse_Result_value = map[string]int32{
		"OK":                        0,
		"NOT_FOUND":                 1,
		"NOT_INVITED":               2,
		"UNLOCKED_TIMELOCK_ACCOUNT": 3,
	}
)

Enum value maps for GetAssociatedPhoneNumberResponse_Result.

View Source
var File_phone_v1_phone_verification_service_proto protoreflect.FileDescriptor
View Source
var PhoneVerification_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "code.phone.v1.PhoneVerification",
	HandlerType: (*PhoneVerificationServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SendVerificationCode",
			Handler:    _PhoneVerification_SendVerificationCode_Handler,
		},
		{
			MethodName: "CheckVerificationCode",
			Handler:    _PhoneVerification_CheckVerificationCode_Handler,
		},
		{
			MethodName: "GetAssociatedPhoneNumber",
			Handler:    _PhoneVerification_GetAssociatedPhoneNumber_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "phone/v1/phone_verification_service.proto",
}

PhoneVerification_ServiceDesc is the grpc.ServiceDesc for PhoneVerification service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterPhoneVerificationServer

func RegisterPhoneVerificationServer(s grpc.ServiceRegistrar, srv PhoneVerificationServer)

Types

type CheckVerificationCodeRequest

type CheckVerificationCodeRequest struct {

	// The phone number being verified.
	PhoneNumber *v1.PhoneNumber `protobuf:"bytes,1,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"`
	// The verification code received via SMS.
	Code *VerificationCode `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckVerificationCodeRequest) Descriptor deprecated

func (*CheckVerificationCodeRequest) Descriptor() ([]byte, []int)

Deprecated: Use CheckVerificationCodeRequest.ProtoReflect.Descriptor instead.

func (*CheckVerificationCodeRequest) GetCode

func (*CheckVerificationCodeRequest) GetPhoneNumber

func (x *CheckVerificationCodeRequest) GetPhoneNumber() *v1.PhoneNumber

func (*CheckVerificationCodeRequest) ProtoMessage

func (*CheckVerificationCodeRequest) ProtoMessage()

func (*CheckVerificationCodeRequest) ProtoReflect

func (*CheckVerificationCodeRequest) Reset

func (x *CheckVerificationCodeRequest) Reset()

func (*CheckVerificationCodeRequest) String

func (*CheckVerificationCodeRequest) Validate

func (m *CheckVerificationCodeRequest) Validate() error

Validate checks the field values on CheckVerificationCodeRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type CheckVerificationCodeRequestValidationError

type CheckVerificationCodeRequestValidationError struct {
	// contains filtered or unexported fields
}

CheckVerificationCodeRequestValidationError is the validation error returned by CheckVerificationCodeRequest.Validate if the designated constraints aren't met.

func (CheckVerificationCodeRequestValidationError) Cause

Cause function returns cause value.

func (CheckVerificationCodeRequestValidationError) Error

Error satisfies the builtin error interface

func (CheckVerificationCodeRequestValidationError) ErrorName

ErrorName returns error name.

func (CheckVerificationCodeRequestValidationError) Field

Field function returns field value.

func (CheckVerificationCodeRequestValidationError) Key

Key function returns key value.

func (CheckVerificationCodeRequestValidationError) Reason

Reason function returns reason value.

type CheckVerificationCodeResponse

type CheckVerificationCodeResponse struct {
	Result CheckVerificationCodeResponse_Result `protobuf:"varint,1,opt,name=result,proto3,enum=code.phone.v1.CheckVerificationCodeResponse_Result" json:"result,omitempty"`
	// The token used to associate an owner account to a user using the verified
	// phone number.
	LinkingToken *PhoneLinkingToken `protobuf:"bytes,2,opt,name=linking_token,json=linkingToken,proto3" json:"linking_token,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckVerificationCodeResponse) Descriptor deprecated

func (*CheckVerificationCodeResponse) Descriptor() ([]byte, []int)

Deprecated: Use CheckVerificationCodeResponse.ProtoReflect.Descriptor instead.

func (*CheckVerificationCodeResponse) GetLinkingToken

func (x *CheckVerificationCodeResponse) GetLinkingToken() *PhoneLinkingToken

func (*CheckVerificationCodeResponse) GetResult

func (*CheckVerificationCodeResponse) ProtoMessage

func (*CheckVerificationCodeResponse) ProtoMessage()

func (*CheckVerificationCodeResponse) ProtoReflect

func (*CheckVerificationCodeResponse) Reset

func (x *CheckVerificationCodeResponse) Reset()

func (*CheckVerificationCodeResponse) String

func (*CheckVerificationCodeResponse) Validate

func (m *CheckVerificationCodeResponse) Validate() error

Validate checks the field values on CheckVerificationCodeResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type CheckVerificationCodeResponseValidationError

type CheckVerificationCodeResponseValidationError struct {
	// contains filtered or unexported fields
}

CheckVerificationCodeResponseValidationError is the validation error returned by CheckVerificationCodeResponse.Validate if the designated constraints aren't met.

func (CheckVerificationCodeResponseValidationError) Cause

Cause function returns cause value.

func (CheckVerificationCodeResponseValidationError) Error

Error satisfies the builtin error interface

func (CheckVerificationCodeResponseValidationError) ErrorName

ErrorName returns error name.

func (CheckVerificationCodeResponseValidationError) Field

Field function returns field value.

func (CheckVerificationCodeResponseValidationError) Key

Key function returns key value.

func (CheckVerificationCodeResponseValidationError) Reason

Reason function returns reason value.

type CheckVerificationCodeResponse_Result

type CheckVerificationCodeResponse_Result int32
const (
	CheckVerificationCodeResponse_OK CheckVerificationCodeResponse_Result = 0
	// The provided verification code is invalid. The user may retry
	// enterring the code if this is received. When max attempts are
	// received, NO_VERIFICATION will be returned.
	CheckVerificationCodeResponse_INVALID_CODE CheckVerificationCodeResponse_Result = 1
	// There is no verification in progress for the phone number. Several
	// reasons this can occur include a verification being expired or having
	// reached a maximum check threshold. The client must initiate a new
	// verification using SendVerificationCode.
	CheckVerificationCodeResponse_NO_VERIFICATION CheckVerificationCodeResponse_Result = 2
	// The call is rate limited (eg. by IP, phone number, etc). The code is
	// not verified.
	CheckVerificationCodeResponse_RATE_LIMITED CheckVerificationCodeResponse_Result = 3
)

func (CheckVerificationCodeResponse_Result) Descriptor

func (CheckVerificationCodeResponse_Result) Enum

func (CheckVerificationCodeResponse_Result) EnumDescriptor deprecated

func (CheckVerificationCodeResponse_Result) EnumDescriptor() ([]byte, []int)

Deprecated: Use CheckVerificationCodeResponse_Result.Descriptor instead.

func (CheckVerificationCodeResponse_Result) Number

func (CheckVerificationCodeResponse_Result) String

func (CheckVerificationCodeResponse_Result) Type

type GetAssociatedPhoneNumberRequest

type GetAssociatedPhoneNumberRequest struct {

	// The public key of the owner account that is being queried for a linked
	// phone number.
	OwnerAccountId *v1.SolanaAccountId `protobuf:"bytes,1,opt,name=owner_account_id,json=ownerAccountId,proto3" json:"owner_account_id,omitempty"`
	// The signature is of serialize(GetAssociatedPhoneNumberRequest) without
	// this field set using the private key of owner_account_id. This provides
	// an authentication mechanism to the RPC.
	Signature *v1.Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAssociatedPhoneNumberRequest) Descriptor deprecated

func (*GetAssociatedPhoneNumberRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetAssociatedPhoneNumberRequest.ProtoReflect.Descriptor instead.

func (*GetAssociatedPhoneNumberRequest) GetOwnerAccountId

func (x *GetAssociatedPhoneNumberRequest) GetOwnerAccountId() *v1.SolanaAccountId

func (*GetAssociatedPhoneNumberRequest) GetSignature

func (x *GetAssociatedPhoneNumberRequest) GetSignature() *v1.Signature

func (*GetAssociatedPhoneNumberRequest) ProtoMessage

func (*GetAssociatedPhoneNumberRequest) ProtoMessage()

func (*GetAssociatedPhoneNumberRequest) ProtoReflect

func (*GetAssociatedPhoneNumberRequest) Reset

func (*GetAssociatedPhoneNumberRequest) String

func (*GetAssociatedPhoneNumberRequest) Validate

func (m *GetAssociatedPhoneNumberRequest) Validate() error

Validate checks the field values on GetAssociatedPhoneNumberRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type GetAssociatedPhoneNumberRequestValidationError

type GetAssociatedPhoneNumberRequestValidationError struct {
	// contains filtered or unexported fields
}

GetAssociatedPhoneNumberRequestValidationError is the validation error returned by GetAssociatedPhoneNumberRequest.Validate if the designated constraints aren't met.

func (GetAssociatedPhoneNumberRequestValidationError) Cause

Cause function returns cause value.

func (GetAssociatedPhoneNumberRequestValidationError) Error

Error satisfies the builtin error interface

func (GetAssociatedPhoneNumberRequestValidationError) ErrorName

ErrorName returns error name.

func (GetAssociatedPhoneNumberRequestValidationError) Field

Field function returns field value.

func (GetAssociatedPhoneNumberRequestValidationError) Key

Key function returns key value.

func (GetAssociatedPhoneNumberRequestValidationError) Reason

Reason function returns reason value.

type GetAssociatedPhoneNumberResponse

type GetAssociatedPhoneNumberResponse struct {
	Result GetAssociatedPhoneNumberResponse_Result `protobuf:"varint,1,opt,name=result,proto3,enum=code.phone.v1.GetAssociatedPhoneNumberResponse_Result" json:"result,omitempty"`
	// The latest phone number associated with the owner account.
	PhoneNumber *v1.PhoneNumber `protobuf:"bytes,2,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"`
	// State that determines whether a phone number is linked to the owner
	// account. A phone number is linked if we can treat it as an alias.
	// This is notably different from association, which answers the question
	// of whether the number was linked at any point in time.
	IsLinked bool `protobuf:"varint,3,opt,name=is_linked,json=isLinked,proto3" json:"is_linked,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAssociatedPhoneNumberResponse) Descriptor deprecated

func (*GetAssociatedPhoneNumberResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetAssociatedPhoneNumberResponse.ProtoReflect.Descriptor instead.

func (*GetAssociatedPhoneNumberResponse) GetIsLinked

func (x *GetAssociatedPhoneNumberResponse) GetIsLinked() bool

func (*GetAssociatedPhoneNumberResponse) GetPhoneNumber

func (x *GetAssociatedPhoneNumberResponse) GetPhoneNumber() *v1.PhoneNumber

func (*GetAssociatedPhoneNumberResponse) GetResult

func (*GetAssociatedPhoneNumberResponse) ProtoMessage

func (*GetAssociatedPhoneNumberResponse) ProtoMessage()

func (*GetAssociatedPhoneNumberResponse) ProtoReflect

func (*GetAssociatedPhoneNumberResponse) Reset

func (*GetAssociatedPhoneNumberResponse) String

func (*GetAssociatedPhoneNumberResponse) Validate

Validate checks the field values on GetAssociatedPhoneNumberResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type GetAssociatedPhoneNumberResponseValidationError

type GetAssociatedPhoneNumberResponseValidationError struct {
	// contains filtered or unexported fields
}

GetAssociatedPhoneNumberResponseValidationError is the validation error returned by GetAssociatedPhoneNumberResponse.Validate if the designated constraints aren't met.

func (GetAssociatedPhoneNumberResponseValidationError) Cause

Cause function returns cause value.

func (GetAssociatedPhoneNumberResponseValidationError) Error

Error satisfies the builtin error interface

func (GetAssociatedPhoneNumberResponseValidationError) ErrorName

ErrorName returns error name.

func (GetAssociatedPhoneNumberResponseValidationError) Field

Field function returns field value.

func (GetAssociatedPhoneNumberResponseValidationError) Key

Key function returns key value.

func (GetAssociatedPhoneNumberResponseValidationError) Reason

Reason function returns reason value.

type GetAssociatedPhoneNumberResponse_Result

type GetAssociatedPhoneNumberResponse_Result int32
const (
	GetAssociatedPhoneNumberResponse_OK GetAssociatedPhoneNumberResponse_Result = 0
	// A phone number is not associated with the provided owner account.
	GetAssociatedPhoneNumberResponse_NOT_FOUND GetAssociatedPhoneNumberResponse_Result = 1
	// The phone number exists, but is no longer invited
	GetAssociatedPhoneNumberResponse_NOT_INVITED GetAssociatedPhoneNumberResponse_Result = 2
	// The phone number exists, but at least one timelock account is unlocked
	GetAssociatedPhoneNumberResponse_UNLOCKED_TIMELOCK_ACCOUNT GetAssociatedPhoneNumberResponse_Result = 3
)

func (GetAssociatedPhoneNumberResponse_Result) Descriptor

func (GetAssociatedPhoneNumberResponse_Result) Enum

func (GetAssociatedPhoneNumberResponse_Result) EnumDescriptor deprecated

func (GetAssociatedPhoneNumberResponse_Result) EnumDescriptor() ([]byte, []int)

Deprecated: Use GetAssociatedPhoneNumberResponse_Result.Descriptor instead.

func (GetAssociatedPhoneNumberResponse_Result) Number

func (GetAssociatedPhoneNumberResponse_Result) String

func (GetAssociatedPhoneNumberResponse_Result) Type

type PhoneLinkingToken

type PhoneLinkingToken struct {

	// The verified phone number.
	PhoneNumber *v1.PhoneNumber `protobuf:"bytes,1,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"`
	// The code that verified the phone number.
	Code *VerificationCode `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
	// contains filtered or unexported fields
}

A one-time use token that can be provided to the Identity service to link an owner account to a user with the verified phone number. The client should treat this token as opaque.

func (*PhoneLinkingToken) Descriptor deprecated

func (*PhoneLinkingToken) Descriptor() ([]byte, []int)

Deprecated: Use PhoneLinkingToken.ProtoReflect.Descriptor instead.

func (*PhoneLinkingToken) GetCode

func (x *PhoneLinkingToken) GetCode() *VerificationCode

func (*PhoneLinkingToken) GetPhoneNumber

func (x *PhoneLinkingToken) GetPhoneNumber() *v1.PhoneNumber

func (*PhoneLinkingToken) ProtoMessage

func (*PhoneLinkingToken) ProtoMessage()

func (*PhoneLinkingToken) ProtoReflect

func (x *PhoneLinkingToken) ProtoReflect() protoreflect.Message

func (*PhoneLinkingToken) Reset

func (x *PhoneLinkingToken) Reset()

func (*PhoneLinkingToken) String

func (x *PhoneLinkingToken) String() string

func (*PhoneLinkingToken) Validate

func (m *PhoneLinkingToken) Validate() error

Validate checks the field values on PhoneLinkingToken with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type PhoneLinkingTokenValidationError

type PhoneLinkingTokenValidationError struct {
	// contains filtered or unexported fields
}

PhoneLinkingTokenValidationError is the validation error returned by PhoneLinkingToken.Validate if the designated constraints aren't met.

func (PhoneLinkingTokenValidationError) Cause

Cause function returns cause value.

func (PhoneLinkingTokenValidationError) Error

Error satisfies the builtin error interface

func (PhoneLinkingTokenValidationError) ErrorName

ErrorName returns error name.

func (PhoneLinkingTokenValidationError) Field

Field function returns field value.

func (PhoneLinkingTokenValidationError) Key

Key function returns key value.

func (PhoneLinkingTokenValidationError) Reason

Reason function returns reason value.

type PhoneVerificationClient

type PhoneVerificationClient interface {
	// SendVerificationCode sends a verification code to the provided phone number
	// over SMS. If an active verification is already taking place, the existing code
	// will be resent.
	SendVerificationCode(ctx context.Context, in *SendVerificationCodeRequest, opts ...grpc.CallOption) (*SendVerificationCodeResponse, error)
	// CheckVerificationCode validates a verification code. On success, a one-time use
	// token to link an owner account is provided.
	CheckVerificationCode(ctx context.Context, in *CheckVerificationCodeRequest, opts ...grpc.CallOption) (*CheckVerificationCodeResponse, error)
	// GetAssociatedPhoneNumber gets the latest verified phone number linked to an owner account.
	GetAssociatedPhoneNumber(ctx context.Context, in *GetAssociatedPhoneNumberRequest, opts ...grpc.CallOption) (*GetAssociatedPhoneNumberResponse, error)
}

PhoneVerificationClient is the client API for PhoneVerification service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type PhoneVerificationServer

type PhoneVerificationServer interface {
	// SendVerificationCode sends a verification code to the provided phone number
	// over SMS. If an active verification is already taking place, the existing code
	// will be resent.
	SendVerificationCode(context.Context, *SendVerificationCodeRequest) (*SendVerificationCodeResponse, error)
	// CheckVerificationCode validates a verification code. On success, a one-time use
	// token to link an owner account is provided.
	CheckVerificationCode(context.Context, *CheckVerificationCodeRequest) (*CheckVerificationCodeResponse, error)
	// GetAssociatedPhoneNumber gets the latest verified phone number linked to an owner account.
	GetAssociatedPhoneNumber(context.Context, *GetAssociatedPhoneNumberRequest) (*GetAssociatedPhoneNumberResponse, error)
	// contains filtered or unexported methods
}

PhoneVerificationServer is the server API for PhoneVerification service. All implementations must embed UnimplementedPhoneVerificationServer for forward compatibility

type SendVerificationCodeRequest

type SendVerificationCodeRequest struct {

	// The phone number to send a verification code over SMS to.
	PhoneNumber *v1.PhoneNumber `protobuf:"bytes,1,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"`
	// Device token for antispam measures against fake devices
	DeviceToken *v1.DeviceToken `protobuf:"bytes,2,opt,name=device_token,json=deviceToken,proto3" json:"device_token,omitempty"`
	// contains filtered or unexported fields
}

func (*SendVerificationCodeRequest) Descriptor deprecated

func (*SendVerificationCodeRequest) Descriptor() ([]byte, []int)

Deprecated: Use SendVerificationCodeRequest.ProtoReflect.Descriptor instead.

func (*SendVerificationCodeRequest) GetDeviceToken

func (x *SendVerificationCodeRequest) GetDeviceToken() *v1.DeviceToken

func (*SendVerificationCodeRequest) GetPhoneNumber

func (x *SendVerificationCodeRequest) GetPhoneNumber() *v1.PhoneNumber

func (*SendVerificationCodeRequest) ProtoMessage

func (*SendVerificationCodeRequest) ProtoMessage()

func (*SendVerificationCodeRequest) ProtoReflect

func (*SendVerificationCodeRequest) Reset

func (x *SendVerificationCodeRequest) Reset()

func (*SendVerificationCodeRequest) String

func (x *SendVerificationCodeRequest) String() string

func (*SendVerificationCodeRequest) Validate

func (m *SendVerificationCodeRequest) Validate() error

Validate checks the field values on SendVerificationCodeRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type SendVerificationCodeRequestValidationError

type SendVerificationCodeRequestValidationError struct {
	// contains filtered or unexported fields
}

SendVerificationCodeRequestValidationError is the validation error returned by SendVerificationCodeRequest.Validate if the designated constraints aren't met.

func (SendVerificationCodeRequestValidationError) Cause

Cause function returns cause value.

func (SendVerificationCodeRequestValidationError) Error

Error satisfies the builtin error interface

func (SendVerificationCodeRequestValidationError) ErrorName

ErrorName returns error name.

func (SendVerificationCodeRequestValidationError) Field

Field function returns field value.

func (SendVerificationCodeRequestValidationError) Key

Key function returns key value.

func (SendVerificationCodeRequestValidationError) Reason

Reason function returns reason value.

type SendVerificationCodeResponse

type SendVerificationCodeResponse struct {
	Result SendVerificationCodeResponse_Result `protobuf:"varint,1,opt,name=result,proto3,enum=code.phone.v1.SendVerificationCodeResponse_Result" json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*SendVerificationCodeResponse) Descriptor deprecated

func (*SendVerificationCodeResponse) Descriptor() ([]byte, []int)

Deprecated: Use SendVerificationCodeResponse.ProtoReflect.Descriptor instead.

func (*SendVerificationCodeResponse) GetResult

func (*SendVerificationCodeResponse) ProtoMessage

func (*SendVerificationCodeResponse) ProtoMessage()

func (*SendVerificationCodeResponse) ProtoReflect

func (*SendVerificationCodeResponse) Reset

func (x *SendVerificationCodeResponse) Reset()

func (*SendVerificationCodeResponse) String

func (*SendVerificationCodeResponse) Validate

func (m *SendVerificationCodeResponse) Validate() error

Validate checks the field values on SendVerificationCodeResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type SendVerificationCodeResponseValidationError

type SendVerificationCodeResponseValidationError struct {
	// contains filtered or unexported fields
}

SendVerificationCodeResponseValidationError is the validation error returned by SendVerificationCodeResponse.Validate if the designated constraints aren't met.

func (SendVerificationCodeResponseValidationError) Cause

Cause function returns cause value.

func (SendVerificationCodeResponseValidationError) Error

Error satisfies the builtin error interface

func (SendVerificationCodeResponseValidationError) ErrorName

ErrorName returns error name.

func (SendVerificationCodeResponseValidationError) Field

Field function returns field value.

func (SendVerificationCodeResponseValidationError) Key

Key function returns key value.

func (SendVerificationCodeResponseValidationError) Reason

Reason function returns reason value.

type SendVerificationCodeResponse_Result

type SendVerificationCodeResponse_Result int32
const (
	SendVerificationCodeResponse_OK SendVerificationCodeResponse_Result = 0
	// The phone number is not invited and cannot use Code. The SMS will not
	// be sent until the user is invited. This result is only valid during
	// the invitation stage of the application and won't apply after general
	// public release.
	SendVerificationCodeResponse_NOT_INVITED SendVerificationCodeResponse_Result = 1
	// SMS is rate limited (eg. by IP, phone number, etc) and was not sent.
	// These will be set generously such that real users won't actually hit
	// the limits.
	SendVerificationCodeResponse_RATE_LIMITED SendVerificationCodeResponse_Result = 2
	// The phone number is not real because it fails Twilio lookup.
	SendVerificationCodeResponse_INVALID_PHONE_NUMBER SendVerificationCodeResponse_Result = 3
	// The phone number is valid, but it maps to an unsupported type of phone
	// like a landline.
	SendVerificationCodeResponse_UNSUPPORTED_PHONE_TYPE SendVerificationCodeResponse_Result = 4
)

func (SendVerificationCodeResponse_Result) Descriptor

func (SendVerificationCodeResponse_Result) Enum

func (SendVerificationCodeResponse_Result) EnumDescriptor deprecated

func (SendVerificationCodeResponse_Result) EnumDescriptor() ([]byte, []int)

Deprecated: Use SendVerificationCodeResponse_Result.Descriptor instead.

func (SendVerificationCodeResponse_Result) Number

func (SendVerificationCodeResponse_Result) String

func (SendVerificationCodeResponse_Result) Type

type UnimplementedPhoneVerificationServer

type UnimplementedPhoneVerificationServer struct {
}

UnimplementedPhoneVerificationServer must be embedded to have forward compatible implementations.

func (UnimplementedPhoneVerificationServer) SendVerificationCode

type UnsafePhoneVerificationServer

type UnsafePhoneVerificationServer interface {
	// contains filtered or unexported methods
}

UnsafePhoneVerificationServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PhoneVerificationServer will result in compilation errors.

type VerificationCode

type VerificationCode struct {

	// A 4-10 digit numerical code.
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*VerificationCode) Descriptor deprecated

func (*VerificationCode) Descriptor() ([]byte, []int)

Deprecated: Use VerificationCode.ProtoReflect.Descriptor instead.

func (*VerificationCode) GetValue

func (x *VerificationCode) GetValue() string

func (*VerificationCode) ProtoMessage

func (*VerificationCode) ProtoMessage()

func (*VerificationCode) ProtoReflect

func (x *VerificationCode) ProtoReflect() protoreflect.Message

func (*VerificationCode) Reset

func (x *VerificationCode) Reset()

func (*VerificationCode) String

func (x *VerificationCode) String() string

func (*VerificationCode) Validate

func (m *VerificationCode) Validate() error

Validate checks the field values on VerificationCode with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type VerificationCodeValidationError

type VerificationCodeValidationError struct {
	// contains filtered or unexported fields
}

VerificationCodeValidationError is the validation error returned by VerificationCode.Validate if the designated constraints aren't met.

func (VerificationCodeValidationError) Cause

Cause function returns cause value.

func (VerificationCodeValidationError) Error

Error satisfies the builtin error interface

func (VerificationCodeValidationError) ErrorName

ErrorName returns error name.

func (VerificationCodeValidationError) Field

Field function returns field value.

func (VerificationCodeValidationError) Key

Key function returns key value.

func (VerificationCodeValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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