Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DependencySet = wire.NewSet( NewHookHTTPClient, wire.Struct(new(Service), "*"), wire.Struct(new(ProofOfPhoneNumberVerificationWebHook), "*"), NewWebhookMiddlewareLogger, )
View Source
var HookResponseSchema = validation.NewSimpleSchema(`
{
"type": "object",
"additionalProperties": false,
"properties": {
"identity": {
"type": "object",
"additionalProperties": false,
"properties": {
"type" : {
"type": "string",
"enum" : ["login_id"]
},
"login_id": {
"type": "object",
"properties": {
"key": { "type": "string" },
"type": { "type": "string" },
"value": { "type": "string" }
},
"required": ["key", "type", "value"]
}
}
}
},
"required": ["identity"]
}
`)
View Source
var InvalidConfiguration = apierrors.InternalError.WithReason("InvalidConfiguration")
Functions ¶
This section is empty.
Types ¶
type Hook ¶
type Hook interface {
Call(ctx context.Context, u *url.URL, hookReq *HookRequest) (*HookResponse, error)
}
type HookHTTPClient ¶
func NewHookHTTPClient ¶
func NewHookHTTPClient(cfg *config.ProofOfPhoneNumberVerificationHookConfig) HookHTTPClient
type HookRequest ¶
type HookRequest struct {
ProofOfPhoneNumberVerification string `json:"proof_of_phone_number_verification"`
}
type HookResponse ¶
func ParseHookResponse ¶
type ProofOfPhoneNumberVerificationWebHook ¶
type ProofOfPhoneNumberVerificationWebHook struct { hook.WebHook Client HookHTTPClient Logger WebhookMiddlewareLogger }
func (*ProofOfPhoneNumberVerificationWebHook) Call ¶
func (h *ProofOfPhoneNumberVerificationWebHook) Call(ctx context.Context, u *url.URL, hookReq *HookRequest) (*HookResponse, error)
type Service ¶
type Service struct { Config *config.ProofOfPhoneNumberVerificationHookConfig WebHook *ProofOfPhoneNumberVerificationWebHook }
type WebhookMiddlewareLogger ¶
func NewWebhookMiddlewareLogger ¶
func NewWebhookMiddlewareLogger(lf *log.Factory) WebhookMiddlewareLogger
Click to show internal directories.
Click to hide internal directories.