Documentation ¶
Index ¶
- Variables
- func Bool(b bool) *bool
- func Float32(f float32) *float32
- func Float64(f float64) *float64
- func Int(i int) *int
- func Int64(i int64) *int64
- func String(s string) *string
- type Ding
- type HTTPClient
- type Lookup
- type Otp
- func (s *Otp) Check(ctx context.Context, request *components.CreateCheckRequest) (*operations.CheckResponse, error)
- func (s *Otp) CreateAuthentication(ctx context.Context, request *components.CreateAuthenticationRequest) (*operations.CreateAuthenticationResponse, error)
- func (s *Otp) Feedback(ctx context.Context, request *components.FeedbackRequest) (*operations.FeedbackResponse, error)
- func (s *Otp) Retry(ctx context.Context, request *components.RetryAuthenticationRequest) (*operations.RetryResponse, error)
- type SDKOption
- func WithClient(client HTTPClient) SDKOption
- func WithRetryConfig(retryConfig utils.RetryConfig) SDKOption
- func WithSecurity(apiKey string) SDKOption
- func WithSecuritySource(security func(context.Context) (components.Security, error)) SDKOption
- func WithServerIndex(serverIndex int) SDKOption
- func WithServerURL(serverURL string) SDKOption
- func WithTemplatedServerURL(serverURL string, params map[string]string) SDKOption
Constants ¶
This section is empty.
Variables ¶
var ServerList = []string{
"https://api.ding.live/v1",
}
ServerList contains the list of servers available to the SDK
Functions ¶
Types ¶
type Ding ¶
type Ding struct { // Send OTP codes to your users using their phone numbers. Otp *Otp // Retrieve up-to-date metadata about a specific phone number Lookup *Lookup // contains filtered or unexported fields }
Ding - Ding: The OTP API allows you to send authentication codes to your users using their phone numbers.
type HTTPClient ¶
HTTPClient provides an interface for suplying the SDK with a custom HTTP client
type Lookup ¶
type Lookup struct {
// contains filtered or unexported fields
}
Lookup - Retrieve up-to-date metadata about a specific phone number
func (*Lookup) Lookup ¶
func (s *Lookup) Lookup(ctx context.Context, customerUUID string, phoneNumber string) (*operations.LookupResponse, error)
Lookup - Perform a phone number lookup
type Otp ¶
type Otp struct {
// contains filtered or unexported fields
}
Otp - Send OTP codes to your users using their phone numbers.
func (*Otp) Check ¶
func (s *Otp) Check(ctx context.Context, request *components.CreateCheckRequest) (*operations.CheckResponse, error)
Check a code
func (*Otp) CreateAuthentication ¶ added in v0.6.1
func (s *Otp) CreateAuthentication(ctx context.Context, request *components.CreateAuthenticationRequest) (*operations.CreateAuthenticationResponse, error)
CreateAuthentication - Send a code
func (*Otp) Feedback ¶ added in v0.6.2
func (s *Otp) Feedback(ctx context.Context, request *components.FeedbackRequest) (*operations.FeedbackResponse, error)
Feedback - Send feedback
func (*Otp) Retry ¶
func (s *Otp) Retry(ctx context.Context, request *components.RetryAuthenticationRequest) (*operations.RetryResponse, error)
Retry - Perform a retry
type SDKOption ¶
type SDKOption func(*Ding)
func WithClient ¶
func WithClient(client HTTPClient) SDKOption
WithClient allows the overriding of the default HTTP client used by the SDK
func WithRetryConfig ¶
func WithRetryConfig(retryConfig utils.RetryConfig) SDKOption
func WithSecurity ¶
WithSecurity configures the SDK to use the provided security details
func WithSecuritySource ¶ added in v0.2.4
WithSecuritySource configures the SDK to invoke the Security Source function on each method call to determine authentication
func WithServerIndex ¶ added in v0.5.0
WithServerIndex allows the overriding of the default server by index
func WithServerURL ¶
WithServerURL allows the overriding of the default server URL