Documentation
¶
Index ¶
- Constants
- Variables
- type APIKeyHandler
- func (h APIKeyHandler) CreateAPIKey(w http.ResponseWriter, r *http.Request)
- func (h APIKeyHandler) DeleteApiKey(w http.ResponseWriter, r *http.Request)
- func (h APIKeyHandler) GetAllApiKeys(w http.ResponseWriter, r *http.Request)
- func (h APIKeyHandler) GetApiKeyByID(w http.ResponseWriter, r *http.Request)
- func (h APIKeyHandler) UpdateKey(w http.ResponseWriter, r *http.Request)
- type AssetRequest
- type AssetWithEnabledInfo
- type AssetsHandler
- type Balance
- type BalancesHandler
- type BridgeIntegrationHandler
- type CircleConfigHandler
- type CreateAPIKeyRequest
- type CreateUserRequest
- type DeleteContactInfoHandler
- type DisbursementHandler
- func (d DisbursementHandler) DeleteDisbursement(w http.ResponseWriter, r *http.Request)
- func (d DisbursementHandler) GetDisbursement(w http.ResponseWriter, r *http.Request)
- func (d DisbursementHandler) GetDisbursementInstructions(w http.ResponseWriter, r *http.Request)
- func (d DisbursementHandler) GetDisbursementReceivers(w http.ResponseWriter, r *http.Request)
- func (d DisbursementHandler) GetDisbursements(w http.ResponseWriter, r *http.Request)
- func (d DisbursementHandler) PatchDisbursementStatus(w http.ResponseWriter, r *http.Request)
- func (d DisbursementHandler) PostDisbursement(w http.ResponseWriter, r *http.Request)
- func (d DisbursementHandler) PostDisbursementInstructions(w http.ResponseWriter, r *http.Request)
- type ErrorInformationNotFound
- type ErrorVerificationAttemptsExceeded
- type ExportHandler
- type ForgotPasswordHandler
- type ForgotPasswordRequest
- type GetBalanceResponse
- type GetProfileResponse
- type GetReceiverResponse
- type HealthHandler
- type HealthResponse
- type ListRolesHandler
- type LoginHandler
- type LoginRequest
- type LoginResponse
- type MFAHandler
- type MFARequest
- type MFAResponse
- type OTPRegistrationType
- type OrganizationLogoHandler
- type PatchCircleConfigRequest
- type PatchDisbursementStatusRequest
- type PatchOrganizationProfileRequest
- type PatchPaymentStatusRequest
- type PatchReceiverWalletStatusRequest
- type PatchRequest
- type PatchUserPasswordRequest
- type PatchUserProfileRequest
- type PaymentCSV
- type PaymentsHandler
- func (p PaymentsHandler) GetPayment(w http.ResponseWriter, r *http.Request)
- func (p PaymentsHandler) GetPayments(w http.ResponseWriter, r *http.Request)
- func (p PaymentsHandler) PatchPaymentStatus(w http.ResponseWriter, r *http.Request)
- func (p PaymentsHandler) PostDirectPayment(w http.ResponseWriter, r *http.Request)
- func (p PaymentsHandler) RetryPayments(rw http.ResponseWriter, req *http.Request)
- type PostDisbursementRequest
- type ProfileHandler
- func (h ProfileHandler) GetOrganizationInfo(rw http.ResponseWriter, req *http.Request)
- func (h ProfileHandler) GetProfile(rw http.ResponseWriter, req *http.Request)
- func (h ProfileHandler) PatchOrganizationProfile(rw http.ResponseWriter, req *http.Request)
- func (h ProfileHandler) PatchUserPassword(rw http.ResponseWriter, req *http.Request)
- func (h ProfileHandler) PatchUserProfile(rw http.ResponseWriter, req *http.Request)
- type ReceiverHandler
- func (rh ReceiverHandler) CreateReceiver(w http.ResponseWriter, r *http.Request)
- func (rh ReceiverHandler) GetReceiver(w http.ResponseWriter, r *http.Request)
- func (rh ReceiverHandler) GetReceiverVerificationTypes(w http.ResponseWriter, r *http.Request)
- func (rh ReceiverHandler) GetReceivers(w http.ResponseWriter, r *http.Request)
- type ReceiverRegistrationHandler
- type ReceiverRegistrationResponse
- type ReceiverSendOTPData
- type ReceiverSendOTPHandler
- type ReceiverSendOTPRequest
- type ReceiverSendOTPResponseBody
- type ReceiverWalletsHandler
- type RefreshTokenHandler
- type RegistrationContactTypesHandler
- type ResetPasswordHandler
- type ResetPasswordRequest
- type RetryInvitationMessageResponse
- type RetryPaymentsRequest
- type SEP24InteractiveDepositHandler
- type StatisticsHandler
- type Status
- type StellarTomlHandler
- type URLShortenerHandler
- type UpdateAPIKeyRequest
- type UpdateDisbursementStatusResponseBody
- type UpdatePaymentStatusResponseBody
- type UpdateReceiverHandler
- type UpdateRolesRequest
- type UserActivationRequest
- type UserHandler
- func (h UserHandler) CreateUser(rw http.ResponseWriter, req *http.Request)
- func (h UserHandler) GetAllUsers(rw http.ResponseWriter, req *http.Request)
- func (h UserHandler) UpdateUserRoles(rw http.ResponseWriter, req *http.Request)
- func (h UserHandler) UserActivation(rw http.ResponseWriter, req *http.Request)
- type UserSorterByEmail
- type UserSorterByIsActive
- type VerifyReceiverRegistrationHandler
- type WalletsHandler
- func (c WalletsHandler) DeleteWallet(rw http.ResponseWriter, req *http.Request)
- func (h WalletsHandler) GetWallets(w http.ResponseWriter, r *http.Request)
- func (h WalletsHandler) PatchWallets(rw http.ResponseWriter, req *http.Request)
- func (h WalletsHandler) PostWallets(rw http.ResponseWriter, req *http.Request)
Constants ¶
const ( OTPExpirationTimeMinutes = 5 OTPMaxAttempts = 5 InformationNotFoundOnServer = "The information you provided could not be found" )
const DefaultMaxMemoryAllocation = 2 * 1024 * 1024
DefaultMaxMemoryAllocation limits the max of memory allocation up to 2MB when parsing the multipart form data request
const DeviceIDHeader = "Device-ID"
const OTPMessageDisclaimer = " If you did not request this code, please ignore. Do not share your code with anyone."
OTPMessageDisclaimer contains disclaimer text that needs to be added as part of the OTP message to remind the receiver how sensitive the data is.
Variables ¶
var ( ErrOTPMaxAttemptsExceeded = errors.New("the number of attempts to confirm the OTP exceeded the max attempts") ErrOTPExpired = errors.New("the OTP is expired, please request a new one") ErrOTPDoesNotMatch = errors.New("the OTP does not match the one saved in the database") )
var ErrUnsupportedStatusTransition = errors.New("invalid target status")
Functions ¶
This section is empty.
Types ¶
type APIKeyHandler ¶
func (APIKeyHandler) CreateAPIKey ¶
func (h APIKeyHandler) CreateAPIKey(w http.ResponseWriter, r *http.Request)
func (APIKeyHandler) DeleteApiKey ¶
func (h APIKeyHandler) DeleteApiKey(w http.ResponseWriter, r *http.Request)
func (APIKeyHandler) GetAllApiKeys ¶
func (h APIKeyHandler) GetAllApiKeys(w http.ResponseWriter, r *http.Request)
func (APIKeyHandler) GetApiKeyByID ¶
func (h APIKeyHandler) GetApiKeyByID(w http.ResponseWriter, r *http.Request)
func (APIKeyHandler) UpdateKey ¶
func (h APIKeyHandler) UpdateKey(w http.ResponseWriter, r *http.Request)
type AssetRequest ¶
type AssetWithEnabledInfo ¶
type AssetsHandler ¶
type AssetsHandler struct { Models *data.Models engine.SubmitterEngine GetPreconditionsFn func() txnbuild.Preconditions DistributionAccountService services.DistributionAccountServiceInterface }
func (AssetsHandler) CreateAsset ¶
func (c AssetsHandler) CreateAsset(w http.ResponseWriter, r *http.Request)
CreateAsset adds a new asset.
func (AssetsHandler) DeleteAsset ¶
func (c AssetsHandler) DeleteAsset(w http.ResponseWriter, r *http.Request)
DeleteAsset marks an asset for soft delete.
func (AssetsHandler) GetAssets ¶
func (c AssetsHandler) GetAssets(w http.ResponseWriter, r *http.Request)
GetAssets returns a list of assets.
type BalancesHandler ¶
type BalancesHandler struct { DistributionAccountResolver signing.DistributionAccountResolver CircleService circle.ServiceInterface NetworkType utils.NetworkType }
func (BalancesHandler) Get ¶
func (h BalancesHandler) Get(w http.ResponseWriter, r *http.Request)
Get returns the balances of the distribution account.
type BridgeIntegrationHandler ¶
type BridgeIntegrationHandler struct { BridgeService bridge.ServiceInterface AuthManager auth.AuthManager Models *data.Models DistributionAccountResolver signing.DistributionAccountResolver }
BridgeIntegrationHandler handles Bridge integration endpoints.
func (BridgeIntegrationHandler) Get ¶
func (h BridgeIntegrationHandler) Get(w http.ResponseWriter, r *http.Request)
Get handles GET /bridge-integration
func (BridgeIntegrationHandler) Patch ¶
func (h BridgeIntegrationHandler) Patch(w http.ResponseWriter, r *http.Request)
Patch handles PATCH /bridge-integration
type CircleConfigHandler ¶
type CircleConfigHandler struct { NetworkType sdpUtils.NetworkType CircleFactory circle.ClientFactory TenantManager tenant.ManagerInterface Encrypter sdpUtils.PrivateKeyEncrypter EncryptionPassphrase string CircleClientConfigModel circle.ClientConfigModelInterface DistributionAccountResolver signing.DistributionAccountResolver MonitorService monitor.MonitorServiceInterface }
CircleConfigHandler implements a handler to configure the Circle API access.
func (CircleConfigHandler) Patch ¶
func (h CircleConfigHandler) Patch(w http.ResponseWriter, r *http.Request)
Patch is a handler to configure the Circle API access.
type CreateAPIKeyRequest ¶
type CreateUserRequest ¶
type DeleteContactInfoHandler ¶
func (DeleteContactInfoHandler) ServeHTTP ¶
func (d DeleteContactInfoHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type DisbursementHandler ¶
type DisbursementHandler struct { Models *data.Models MonitorService monitor.MonitorServiceInterface AuthManager auth.AuthManager DisbursementManagementService *services.DisbursementManagementService DistributionAccountResolver signing.DistributionAccountResolver }
func (DisbursementHandler) DeleteDisbursement ¶
func (d DisbursementHandler) DeleteDisbursement(w http.ResponseWriter, r *http.Request)
DeleteDisbursement deletes a draft or ready disbursement and its associated payments
func (DisbursementHandler) GetDisbursement ¶
func (d DisbursementHandler) GetDisbursement(w http.ResponseWriter, r *http.Request)
func (DisbursementHandler) GetDisbursementInstructions ¶
func (d DisbursementHandler) GetDisbursementInstructions(w http.ResponseWriter, r *http.Request)
func (DisbursementHandler) GetDisbursementReceivers ¶
func (d DisbursementHandler) GetDisbursementReceivers(w http.ResponseWriter, r *http.Request)
func (DisbursementHandler) GetDisbursements ¶
func (d DisbursementHandler) GetDisbursements(w http.ResponseWriter, r *http.Request)
GetDisbursements returns a paginated list of disbursements
func (DisbursementHandler) PatchDisbursementStatus ¶
func (d DisbursementHandler) PatchDisbursementStatus(w http.ResponseWriter, r *http.Request)
PatchDisbursementStatus updates the status of a disbursement
func (DisbursementHandler) PostDisbursement ¶
func (d DisbursementHandler) PostDisbursement(w http.ResponseWriter, r *http.Request)
func (DisbursementHandler) PostDisbursementInstructions ¶
func (d DisbursementHandler) PostDisbursementInstructions(w http.ResponseWriter, r *http.Request)
type ErrorInformationNotFound ¶
type ErrorInformationNotFound struct {
// contains filtered or unexported fields
}
ErrorInformationNotFound implements the error interface.
func (*ErrorInformationNotFound) Error ¶
func (e *ErrorInformationNotFound) Error() string
type ErrorVerificationAttemptsExceeded ¶
type ErrorVerificationAttemptsExceeded struct {
// contains filtered or unexported fields
}
func (*ErrorVerificationAttemptsExceeded) Error ¶
func (e *ErrorVerificationAttemptsExceeded) Error() string
type ExportHandler ¶
func (ExportHandler) ExportDisbursements ¶
func (e ExportHandler) ExportDisbursements(rw http.ResponseWriter, r *http.Request)
func (ExportHandler) ExportPayments ¶
func (e ExportHandler) ExportPayments(rw http.ResponseWriter, r *http.Request)
func (ExportHandler) ExportReceivers ¶
func (e ExportHandler) ExportReceivers(rw http.ResponseWriter, r *http.Request)
type ForgotPasswordHandler ¶
type ForgotPasswordHandler struct { AuthManager auth.AuthManager MessengerClient message.MessengerClient Models *data.Models ReCAPTCHAValidator validators.ReCAPTCHAValidator ReCAPTCHADisabled bool }
ForgotPasswordHandler searches for the user that is requesting a password reset and sends an email with a link to access the password reset page.
func (ForgotPasswordHandler) SendForgotPasswordMessage ¶
func (h ForgotPasswordHandler) SendForgotPasswordMessage(ctx context.Context, uiBaseURL, email, resetToken string) error
func (ForgotPasswordHandler) ServeHTTP ¶
func (h ForgotPasswordHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements the http.Handler interface.
type ForgotPasswordRequest ¶
type GetBalanceResponse ¶
type GetBalanceResponse struct { Account schema.TransactionAccount `json:"account"` Balances []Balance `json:"balances"` }
type GetProfileResponse ¶
type GetReceiverResponse ¶
type GetReceiverResponse struct { data.Receiver Wallets []data.ReceiverWallet `json:"wallets"` Verifications []data.ReceiverVerification `json:"verifications,omitempty"` }
type HealthHandler ¶
type HealthHandler struct { Version string ServiceID string ReleaseID string DBConnectionPool db.DBConnectionPool Producer events.Producer }
HealthHandler implements a simple handler that returns the health response.
func (HealthHandler) ServeHTTP ¶
func (h HealthHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements the http.Handler interface.
type HealthResponse ¶
type HealthResponse struct { Status Status `json:"status"` Version string `json:"version,omitempty"` ServiceID string `json:"service_id,omitempty"` ReleaseID string `json:"release_id,omitempty"` Services map[string]Status `json:"services,omitempty"` }
HealthResponse follows the health check response format for HTTP APIs, based on the format defined in the draft IETF network working group standard, Health Check Response Format for HTTP APIs.
https://datatracker.ietf.org/doc/html/draft-inadarei-api-health-check-06#name-api-health-response
type ListRolesHandler ¶
type ListRolesHandler struct{}
func (ListRolesHandler) GetRoles ¶
func (h ListRolesHandler) GetRoles(rw http.ResponseWriter, req *http.Request)
GetRoles retrieves all the users roles available
type LoginHandler ¶
type LoginHandler struct { AuthManager auth.AuthManager ReCAPTCHAValidator validators.ReCAPTCHAValidator MessengerClient message.MessengerClient Models *data.Models ReCAPTCHADisabled bool MFADisabled bool }
func (LoginHandler) ServeHTTP ¶
func (h LoginHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request)
type LoginRequest ¶
type LoginResponse ¶
type LoginResponse struct {
Token string `json:"token"`
}
type MFAHandler ¶
type MFAHandler struct { AuthManager auth.AuthManager ReCAPTCHAValidator validators.ReCAPTCHAValidator Models *data.Models ReCAPTCHADisabled bool }
func (MFAHandler) ServeHTTP ¶
func (h MFAHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request)
type MFARequest ¶
type MFAResponse ¶
type MFAResponse struct {
Token string `json:"token"`
}
type OTPRegistrationType ¶
type OTPRegistrationType string
type OrganizationLogoHandler ¶
func (OrganizationLogoHandler) GetOrganizationLogo ¶
func (h OrganizationLogoHandler) GetOrganizationLogo(rw http.ResponseWriter, req *http.Request)
GetOrganizationLogo renders the stored organization logo. The image is rendered inline (not attached - the attached option downloads the content) so the client can embed the image.
type PatchDisbursementStatusRequest ¶
type PatchDisbursementStatusRequest struct {
Status string `json:"status"`
}
type PatchOrganizationProfileRequest ¶
type PatchOrganizationProfileRequest struct { OrganizationName string `json:"organization_name"` TimezoneUTCOffset string `json:"timezone_utc_offset"` IsApprovalRequired *bool `json:"is_approval_required"` IsLinkShortenerEnabled *bool `json:"is_link_shortener_enabled"` IsMemoTracingEnabled *bool `json:"is_memo_tracing_enabled"` ReceiverInvitationResendInterval *int64 `json:"receiver_invitation_resend_interval_days"` PaymentCancellationPeriodDays *int64 `json:"payment_cancellation_period_days"` ReceiverRegistrationMessageTemplate *string `json:"receiver_registration_message_template"` OTPMessageTemplate *string `json:"otp_message_template"` PrivacyPolicyLink *string `json:"privacy_policy_link"` }
func (*PatchOrganizationProfileRequest) AreAllFieldsEmpty ¶
func (r *PatchOrganizationProfileRequest) AreAllFieldsEmpty() bool
type PatchPaymentStatusRequest ¶
type PatchPaymentStatusRequest struct {
Status string `json:"status"`
}
type PatchReceiverWalletStatusRequest ¶
type PatchReceiverWalletStatusRequest struct {
Status string `json:"status"`
}
type PatchRequest ¶
type PatchRequest struct { Status data.BridgeIntegrationStatus `json:"status"` Email string `json:"email,omitempty"` FullName string `json:"full_name,omitempty"` KYCType bridge.KYCType `json:"kyc_type,omitempty"` }
PatchRequest represents the request to opt into Bridge integration
func (PatchRequest) Validate ¶
func (r PatchRequest) Validate() error
Validate validates the opt-in request and returns an error if validation fails.
type PatchUserProfileRequest ¶
type PaymentCSV ¶
type PaymentCSV struct { ID string Amount string StellarTransactionID string Status data.PaymentStatus DisbursementID string `csv:"Disbursement.ID"` Asset data.Asset Wallet data.Wallet ReceiverID string `csv:"Receiver.ID"` ReceiverPhoneNumber string `csv:"Receiver.PhoneNumber"` ReceiverEmail string `csv:"Receiver.Email"` ReceiverExternalID string `csv:"Receiver.ExternalID"` ReceiverWalletAddress string `csv:"ReceiverWallet.Address"` ReceiverWalletStatus data.ReceiversWalletStatus `csv:"ReceiverWallet.Status"` CreatedAt time.Time UpdatedAt time.Time ExternalPaymentID string CircleTransferRequestID *string }
type PaymentsHandler ¶
type PaymentsHandler struct { Models *data.Models DBConnectionPool db.DBConnectionPool AuthManager auth.AuthManager EventProducer events.Producer CrashTrackerClient crashtracker.CrashTrackerClient DistributionAccountResolver signing.DistributionAccountResolver DirectPaymentService *services.DirectPaymentService }
func (PaymentsHandler) GetPayment ¶
func (p PaymentsHandler) GetPayment(w http.ResponseWriter, r *http.Request)
func (PaymentsHandler) GetPayments ¶
func (p PaymentsHandler) GetPayments(w http.ResponseWriter, r *http.Request)
func (PaymentsHandler) PatchPaymentStatus ¶
func (p PaymentsHandler) PatchPaymentStatus(w http.ResponseWriter, r *http.Request)
func (PaymentsHandler) PostDirectPayment ¶
func (p PaymentsHandler) PostDirectPayment(w http.ResponseWriter, r *http.Request)
func (PaymentsHandler) RetryPayments ¶
func (p PaymentsHandler) RetryPayments(rw http.ResponseWriter, req *http.Request)
type PostDisbursementRequest ¶
type PostDisbursementRequest struct { Name string `json:"name"` WalletID string `json:"wallet_id"` AssetID string `json:"asset_id"` VerificationField data.VerificationType `json:"verification_field"` RegistrationContactType data.RegistrationContactType `json:"registration_contact_type"` ReceiverRegistrationMessageTemplate string `json:"receiver_registration_message_template"` }
type ProfileHandler ¶
type ProfileHandler struct { Models *data.Models AuthManager auth.AuthManager MaxMemoryAllocation int64 DistributionAccountResolver signing.DistributionAccountResolver PasswordValidator *authUtils.PasswordValidator utils.NetworkType }
func (ProfileHandler) GetOrganizationInfo ¶
func (h ProfileHandler) GetOrganizationInfo(rw http.ResponseWriter, req *http.Request)
func (ProfileHandler) GetProfile ¶
func (h ProfileHandler) GetProfile(rw http.ResponseWriter, req *http.Request)
func (ProfileHandler) PatchOrganizationProfile ¶
func (h ProfileHandler) PatchOrganizationProfile(rw http.ResponseWriter, req *http.Request)
func (ProfileHandler) PatchUserPassword ¶
func (h ProfileHandler) PatchUserPassword(rw http.ResponseWriter, req *http.Request)
func (ProfileHandler) PatchUserProfile ¶
func (h ProfileHandler) PatchUserProfile(rw http.ResponseWriter, req *http.Request)
type ReceiverHandler ¶
type ReceiverHandler struct { Models *data.Models DBConnectionPool db.DBConnectionPool }
func (ReceiverHandler) CreateReceiver ¶
func (rh ReceiverHandler) CreateReceiver(w http.ResponseWriter, r *http.Request)
func (ReceiverHandler) GetReceiver ¶
func (rh ReceiverHandler) GetReceiver(w http.ResponseWriter, r *http.Request)
func (ReceiverHandler) GetReceiverVerificationTypes ¶
func (rh ReceiverHandler) GetReceiverVerificationTypes(w http.ResponseWriter, r *http.Request)
GetReceiverVerification returns a list of verification types
func (ReceiverHandler) GetReceivers ¶
func (rh ReceiverHandler) GetReceivers(w http.ResponseWriter, r *http.Request)
type ReceiverRegistrationHandler ¶
type ReceiverRegistrationHandler struct { Models *data.Models ReceiverWalletModel *data.ReceiverWalletModel ReCAPTCHADisabled bool ReCAPTCHASiteKey string }
func (ReceiverRegistrationHandler) ServeHTTP ¶
func (h ReceiverRegistrationHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP will serve the SEP-24 deposit page needed to register users.
type ReceiverRegistrationResponse ¶
type ReceiverRegistrationResponse struct { PrivacyPolicyLink string `json:"privacy_policy_link"` OrganizationName string `json:"organization_name"` OrganizationLogo string `json:"organization_logo"` TruncatedContactInfo string `json:"truncated_contact_info,omitempty"` IsRegistered bool `json:"is_registered"` IsRecaptchaDisabled bool `json:"is_recaptcha_disabled"` ReCAPTCHASiteKey string `json:"recaptcha_site_key,omitempty"` }
type ReceiverSendOTPData ¶
type ReceiverSendOTPHandler ¶
type ReceiverSendOTPHandler struct { Models *data.Models MessageDispatcher message.MessageDispatcherInterface ReCAPTCHAValidator validators.ReCAPTCHAValidator ReCAPTCHADisabled bool }
func (ReceiverSendOTPHandler) ServeHTTP ¶
func (h ReceiverSendOTPHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type ReceiverSendOTPRequest ¶
type ReceiverSendOTPResponseBody ¶
type ReceiverSendOTPResponseBody struct { Message string `json:"message"` VerificationField data.VerificationType `json:"verification_field"` }
type ReceiverWalletsHandler ¶
type ReceiverWalletsHandler struct { Models *data.Models EventProducer events.Producer CrashTrackerClient crashtracker.CrashTrackerClient }
func (ReceiverWalletsHandler) PatchReceiverWalletStatus ¶
func (h ReceiverWalletsHandler) PatchReceiverWalletStatus(rw http.ResponseWriter, req *http.Request)
PatchReceiverWalletStatus updates a receiver wallet’s status.
func (ReceiverWalletsHandler) RetryInvitation ¶
func (h ReceiverWalletsHandler) RetryInvitation(rw http.ResponseWriter, req *http.Request)
type RefreshTokenHandler ¶
type RefreshTokenHandler struct {
AuthManager auth.AuthManager
}
func (RefreshTokenHandler) PostRefreshToken ¶
func (h RefreshTokenHandler) PostRefreshToken(rw http.ResponseWriter, req *http.Request)
type RegistrationContactTypesHandler ¶
type RegistrationContactTypesHandler struct{}
func (RegistrationContactTypesHandler) Get ¶
func (c RegistrationContactTypesHandler) Get(w http.ResponseWriter, r *http.Request)
type ResetPasswordHandler ¶
type ResetPasswordHandler struct { AuthManager auth.AuthManager PasswordValidator *authUtils.PasswordValidator }
ResetPasswordHandler resets the user password by receiving a valid reset token and the new password.
func (ResetPasswordHandler) ServeHTTP ¶
func (h ResetPasswordHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements the http.Handler interface.
type ResetPasswordRequest ¶
type RetryPaymentsRequest ¶
type RetryPaymentsRequest struct {
PaymentIDs []string `json:"payment_ids"`
}
type SEP24InteractiveDepositHandler ¶
func (SEP24InteractiveDepositHandler) ServeApp ¶
func (h SEP24InteractiveDepositHandler) ServeApp(w http.ResponseWriter, r *http.Request)
ServeApp services the SEP-24 interactive deposit app.
type StatisticsHandler ¶
type StatisticsHandler struct {
DBConnectionPool db.DBConnectionPool
}
func (StatisticsHandler) GetStatistics ¶
func (s StatisticsHandler) GetStatistics(w http.ResponseWriter, r *http.Request)
func (StatisticsHandler) GetStatisticsByDisbursement ¶
func (s StatisticsHandler) GetStatisticsByDisbursement(w http.ResponseWriter, r *http.Request)
type StellarTomlHandler ¶
type StellarTomlHandler struct { AnchorPlatformBaseSepURL string DistributionAccountResolver signing.DistributionAccountResolver NetworkPassphrase string Models *data.Models Sep10SigningPublicKey string InstanceName string }
func (StellarTomlHandler) ServeHTTP ¶
func (s StellarTomlHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP will serve the stellar.toml file needed to register users through SEP-24.
type URLShortenerHandler ¶
func (URLShortenerHandler) HandleRedirect ¶
func (u URLShortenerHandler) HandleRedirect(w http.ResponseWriter, r *http.Request)
type UpdateAPIKeyRequest ¶
type UpdateAPIKeyRequest struct { Permissions []data.APIKeyPermission `json:"permissions"` AllowedIPs any `json:"allowed_ips,omitempty"` // Can be a string or array of strings }
type UpdateDisbursementStatusResponseBody ¶
type UpdateDisbursementStatusResponseBody struct {
Message string `json:"message"`
}
type UpdatePaymentStatusResponseBody ¶
type UpdatePaymentStatusResponseBody struct {
Message string `json:"message"`
}
type UpdateReceiverHandler ¶
type UpdateReceiverHandler struct { Models *data.Models DBConnectionPool db.DBConnectionPool AuthManager auth.AuthManager }
func (UpdateReceiverHandler) UpdateReceiver ¶
func (h UpdateReceiverHandler) UpdateReceiver(rw http.ResponseWriter, req *http.Request)
type UpdateRolesRequest ¶
type UserActivationRequest ¶
type UserHandler ¶
type UserHandler struct { AuthManager auth.AuthManager CrashTrackerClient crashtracker.CrashTrackerClient MessengerClient message.MessengerClient Models *data.Models }
func (UserHandler) CreateUser ¶
func (h UserHandler) CreateUser(rw http.ResponseWriter, req *http.Request)
func (UserHandler) GetAllUsers ¶
func (h UserHandler) GetAllUsers(rw http.ResponseWriter, req *http.Request)
func (UserHandler) UpdateUserRoles ¶
func (h UserHandler) UpdateUserRoles(rw http.ResponseWriter, req *http.Request)
func (UserHandler) UserActivation ¶
func (h UserHandler) UserActivation(rw http.ResponseWriter, req *http.Request)
type UserSorterByEmail ¶
func (UserSorterByEmail) Len ¶
func (a UserSorterByEmail) Len() int
func (UserSorterByEmail) Less ¶
func (a UserSorterByEmail) Less(i, j int) bool
func (UserSorterByEmail) Swap ¶
func (a UserSorterByEmail) Swap(i, j int)
type UserSorterByIsActive ¶
func (UserSorterByIsActive) Len ¶
func (a UserSorterByIsActive) Len() int
func (UserSorterByIsActive) Less ¶
func (a UserSorterByIsActive) Less(i, j int) bool
func (UserSorterByIsActive) Swap ¶
func (a UserSorterByIsActive) Swap(i, j int)
type VerifyReceiverRegistrationHandler ¶
type VerifyReceiverRegistrationHandler struct { AnchorPlatformAPIService anchorplatform.AnchorPlatformAPIServiceInterface Models *data.Models ReCAPTCHAValidator validators.ReCAPTCHAValidator ReCAPTCHADisabled bool NetworkPassphrase string EventProducer events.Producer CrashTrackerClient crashtracker.CrashTrackerClient DistributionAccountResolver signing.DistributionAccountResolver }
func (VerifyReceiverRegistrationHandler) VerifyReceiverRegistration ¶
func (v VerifyReceiverRegistrationHandler) VerifyReceiverRegistration(w http.ResponseWriter, r *http.Request)
VerifyReceiverRegistration is the handler for the SEP-24 `POST /wallet-registration/verification` endpoint. It is where the SDP verifies the receiver's PII & OTP, update the receiver wallet with the Stellar account and memo, found in the JWT token, and PATCH the transaction on the AnchorPlatform.
type WalletsHandler ¶
type WalletsHandler struct { Models *data.Models NetworkType utils.NetworkType WalletAssetResolver *services.WalletAssetResolver }
func (WalletsHandler) DeleteWallet ¶
func (c WalletsHandler) DeleteWallet(rw http.ResponseWriter, req *http.Request)
func (WalletsHandler) GetWallets ¶
func (h WalletsHandler) GetWallets(w http.ResponseWriter, r *http.Request)
GetWallets returns a list of wallets
func (WalletsHandler) PatchWallets ¶
func (h WalletsHandler) PatchWallets(rw http.ResponseWriter, req *http.Request)
func (WalletsHandler) PostWallets ¶
func (h WalletsHandler) PostWallets(rw http.ResponseWriter, req *http.Request)
Source Files
¶
- api_key_handler.go
- assets_handler.go
- balances_handler.go
- bridge_integration_handler.go
- circle_config_handler.go
- delete_contact_info_handler.go
- disbursement_handler.go
- export_handler.go
- forgot_password_handler.go
- health_handler.go
- list_roles_handler.go
- login_handler.go
- mfa_handler.go
- payments_handler.go
- profile_handler.go
- receiver_handler.go
- receiver_registration_handler.go
- receiver_send_otp_handler.go
- receiver_wallets_handler.go
- refresh_token_handler.go
- registration_contact_types.go
- reset_password_handler.go
- sep24_interactive_deposit_handler.go
- statistics_handler.go
- stellar_toml_handler.go
- update_receiver_handler.go
- url_shortener_handler.go
- user_handler.go
- verify_receiver_registration_handler.go
- wallets_handler.go