dfnsapiclient

package
v0.0.2-beta Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const PolicyPendingErrorCode = 202
View Source
const (
	UserActionHeader = "x-dfns-useraction"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthTransport

type AuthTransport struct {
	*AuthTransportConfig
}

func NewAuthTransport

func NewAuthTransport(config *AuthTransportConfig) *AuthTransport

func (*AuthTransport) RoundTrip

func (auth *AuthTransport) RoundTrip(req *http.Request) (*http.Response, error)

type AuthTransportConfig

type AuthTransportConfig struct {
	AppID     string
	AuthToken *string
	BaseURL   string
	Signer    credentials.ICredentialSigner
}

type DfnsError

type DfnsError struct {
	HTTPStatus int                    `json:"httpStatus"`        // HTTP status code
	Message    string                 `json:"message"`           // Error message
	Context    map[string]interface{} `json:"context,omitempty"` // Additional context
}

DfnsError represents an error that occurred during DFNS API requests.

func NewDfnsError

func NewDfnsError(statut int, message string, context map[string]interface{}) *DfnsError

func (*DfnsError) Error

func (e *DfnsError) Error() string

Error returns the error message.

type PolicyPendingError

type PolicyPendingError struct {
	DfnsError
}

PolicyPendingError represents an error indicating that the operation triggered a policy pending approval.

func NewPolicyPendingError

func NewPolicyPendingError(context map[string]interface{}) *PolicyPendingError

NewPolicyPendingError creates a new instance of PolicyPendingError.

Jump to

Keyboard shortcuts

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