api

package
v1.7.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNetworkRequired    = fmt.Errorf("request requires a valid network (%s or %s)", config.TestNet, config.MainNet)
	ErrInvalidCredentials = errors.New("auth0 credentials are missing or invalid")
	ErrExpiredCredentials = errors.New("auth0 credentials have expired")
	ErrPathRequired       = errors.New("local credentials requires a path to the stored json credential")
	ErrIDRequired         = errors.New("request requires a valid ID to determine the endpoint path")
	ErrMissingMemberID    = errors.New("member ID is required to query member details")
)

Functions

func MustRefreshToken added in v1.5.0

func MustRefreshToken(c *gin.Context, err interface{})

MustRefreshToken returns a JSON 401 response with the refresh_token flag set to true.

func NotAllowed

func NotAllowed(c *gin.Context)

NotAllowed returns a JSON 405 response for the API.

func NotFound

func NotFound(c *gin.Context)

NotFound returns a JSON 404 response for the API.

Types

type APIv1

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

APIv1 implements the BFFClient interface.

func (*APIv1) AddCollaborator added in v1.5.2

func (s *APIv1) AddCollaborator(ctx context.Context, request *models.Collaborator) (collaborator *models.Collaborator, err error)

Add a collaborator to an organization.

func (*APIv1) Announcements added in v1.5.0

func (s *APIv1) Announcements(ctx context.Context) (out *AnnouncementsReply, err error)

Announcements returns a list of network announcments made by the admins.

func (*APIv1) Attention added in v1.5.0

func (s *APIv1) Attention(ctx context.Context) (out *AttentionReply, err error)

Attention returns the set of current attention messages for the organization.

func (*APIv1) Certificates added in v1.5.0

func (s *APIv1) Certificates(ctx context.Context) (out *CertificatesReply, err error)

Certificates returns the list of certificates associated with the organization.

func (*APIv1) CreateOrganization added in v1.6.0

func (s *APIv1) CreateOrganization(ctx context.Context, in *OrganizationParams) (out *OrganizationReply, err error)

Create a new organization.

func (*APIv1) DeleteCollaborator added in v1.5.4

func (s *APIv1) DeleteCollaborator(ctx context.Context, id string) (err error)

Delete a collaborator from an organization.

func (*APIv1) DeleteOrganization added in v1.7.0

func (s *APIv1) DeleteOrganization(ctx context.Context, id string) (err error)

Delete an organization by ID.

func (*APIv1) Do

func (s *APIv1) Do(req *http.Request, data interface{}, checkStatus bool) (rep *http.Response, err error)

Do executes an http request against the server, performs error checking, and deserializes the response data into the specified struct if requested.

func (*APIv1) ListCollaborators added in v1.6.0

func (s *APIv1) ListCollaborators(ctx context.Context) (out *ListCollaboratorsReply, err error)

List all collaborators on an organization.

func (*APIv1) ListOrganizations added in v1.6.0

func (s *APIv1) ListOrganizations(ctx context.Context, in *ListOrganizationsParams) (out *ListOrganizationsReply, err error)

List available organizations.

func (*APIv1) ListUserRoles added in v1.6.0

func (s *APIv1) ListUserRoles(ctx context.Context) (out []string, err error)

Return the set of assignable user roles.

func (*APIv1) LoadRegistrationForm added in v1.5.0

func (s *APIv1) LoadRegistrationForm(ctx context.Context, in *RegistrationFormParams) (form *RegistrationForm, err error)

Load registration form data from the server to populate the front-end form.

func (*APIv1) Login added in v1.5.0

func (s *APIv1) Login(ctx context.Context, in *LoginParams) (err error)

Login post-processes an Auth0 login or registration and sets CSRF cookies.

func (*APIv1) Lookup

func (s *APIv1) Lookup(ctx context.Context, in *LookupParams) (out *LookupReply, err error)

Lookup a VASP record in both the TestNet and the MainNet.

func (*APIv1) LookupAutocomplete added in v1.7.3

func (s *APIv1) LookupAutocomplete(ctx context.Context) (out map[string]string, err error)

Returns the deduplicated list of all verified VASPs across both networks to enable client-side autocomplete for lookups.

func (*APIv1) MakeAnnouncement added in v1.5.0

func (s *APIv1) MakeAnnouncement(ctx context.Context, in *models.Announcement) (err error)

MakeAnnouncement allows administrators to post new network announcements.

func (*APIv1) MemberDetails added in v1.5.0

func (s *APIv1) MemberDetails(ctx context.Context, in *MemberDetailsParams) (out *MemberDetailsReply, err error)

Details returns the sensitive details for a VASP member.

func (*APIv1) MemberList added in v1.7.1

func (s *APIv1) MemberList(ctx context.Context, in *MemberPageInfo) (out *MemberListReply, err error)

Returns a list of all verified VASPs in the specified directory.

func (*APIv1) NetworkActivity added in v1.7.3

func (s *APIv1) NetworkActivity(ctx context.Context) (out *NetworkActivityReply, err error)

func (*APIv1) NewRequest

func (s *APIv1) NewRequest(ctx context.Context, method, path string, data interface{}, params *url.Values) (req *http.Request, err error)

NewRequest creates an http.Request with the specified context and method, resolving the path to the root endpoint of the API (e.g. /v2) and serializes the data to JSON. This method also sets the default headers of all GDS Admin API v2 client requests.

func (*APIv1) Overview added in v1.5.0

func (s *APIv1) Overview(ctx context.Context) (out *OverviewReply, err error)

Overview returns a high-level summary of the organization account and networks.

func (*APIv1) PatchOrganization added in v1.7.0

func (s *APIv1) PatchOrganization(ctx context.Context, id string, in *OrganizationParams) (out *OrganizationReply, err error)

Patch an organization.

func (*APIv1) RegistrationStatus added in v1.5.0

func (s *APIv1) RegistrationStatus(ctx context.Context) (out *RegistrationStatus, err error)

RegistrationStatus returns the status of the VASP registrations for the organization.

func (*APIv1) ResetRegistrationForm added in v1.7.0

func (s *APIv1) ResetRegistrationForm(ctx context.Context, in *RegistrationFormParams) (form *RegistrationForm, err error)

Reset the registration form on the server to its default values.

func (*APIv1) SaveRegistrationForm added in v1.5.0

func (s *APIv1) SaveRegistrationForm(ctx context.Context, form *RegistrationForm) (out *RegistrationForm, err error)

Save registration form data to the server in preparation for submitting it.

func (*APIv1) SetCSRFProtect added in v1.5.0

func (c *APIv1) SetCSRFProtect(protect bool) error

SetCSRFProtect is a helper function to set CSRF cookies on the client. This is not possible in a browser because of the HttpOnly flag. This method should only be used for testing purposes and an error is returned if the URL is not localhost. For live clients - the server should set these cookies. If protect is false, then the cookies are removed from the client by setting the cookies to an empty slice.

func (*APIv1) SetCredentials added in v1.5.0

func (c *APIv1) SetCredentials(creds Credentials)

SetCredentials is a helper function for external users to override credentials at runtime and is used extensively in testing the BFF server.

func (*APIv1) Status

func (s *APIv1) Status(ctx context.Context, in *StatusParams) (out *StatusReply, err error)

Status performs a health check request to the BFF.

func (*APIv1) SubmitRegistration added in v1.5.0

func (s *APIv1) SubmitRegistration(ctx context.Context, network string) (out *RegisterReply, err error)

Submit the registration form to the specified network (testnet or mainnet).

func (*APIv1) UpdateCollaboratorRoles added in v1.5.4

func (s *APIv1) UpdateCollaboratorRoles(ctx context.Context, id string, request *UpdateRolesParams) (collaborator *models.Collaborator, err error)

Update a collaborator's roles in an organization.

func (*APIv1) UpdateUser added in v1.6.1

func (s *APIv1) UpdateUser(ctx context.Context, in *UpdateUserParams) (err error)

Update the user's profile.

func (*APIv1) UserOrganization added in v1.6.0

func (s *APIv1) UserOrganization(ctx context.Context) (out *OrganizationReply, err error)

Get the user's current organization.

func (*APIv1) VerifyContact

func (s *APIv1) VerifyContact(ctx context.Context, in *VerifyContactParams) (out *VerifyContactReply, err error)

Verify a contact with the token sent to their email address.

type Activity added in v1.7.3

type Activity struct {
	Date   string `json:"date"`
	Events uint64 `json:"events"`
}

Activity is a time-aggregated collection of events (Search, Lookup, etc)

type AnnouncementsReply added in v1.5.0

type AnnouncementsReply struct {
	Announcements []*models.Announcement `json:"announcements"`
	LastUpdated   string                 `json:"last_updated,omitempty"`
}

AnnouncementsReply contains up to the last 10 network announcements that were made in the past month. It does not require pagination since only relevant results are returned.

type AttentionMessage added in v1.5.0

type AttentionMessage struct {
	Message  string `json:"message"`
	Severity string `json:"severity"`
	Action   string `json:"action"`
}

AttentionMessage contains details about a single attention message.

type AttentionReply added in v1.5.0

type AttentionReply struct {
	Messages []*AttentionMessage `json:"messages"`
}

AttentionReply contains all the current attention messages relevant to an organization.

type Auth0Token added in v1.5.0

type Auth0Token struct {
	Token     string    `json:"access_token"`
	ExpiresIn int64     `json:"expires_in"`
	Scope     string    `json:"scope"`
	Type      string    `json:"token_type"`
	CreatedAt time.Time `json:"created_at"`
	ExpiresAt time.Time `json:"expires_at"`
}

Auth0Token is a JSON representation of the Token returned by Auth0

func (*Auth0Token) AccessToken added in v1.5.0

func (t *Auth0Token) AccessToken() (_ string, err error)

AccessToken implements the Credentials interface and ensures that a token is present and that the token has not expired yet. It relies on the data structure from Auth0 rather than parsing the jwt token directly.

type BFFClient

type BFFClient interface {
	// Unauthenticated Endpoints
	Status(context.Context, *StatusParams) (*StatusReply, error)
	Lookup(context.Context, *LookupParams) (*LookupReply, error)
	LookupAutocomplete(context.Context) (map[string]string, error)
	VerifyContact(context.Context, *VerifyContactParams) (*VerifyContactReply, error)
	NetworkActivity(context.Context) (*NetworkActivityReply, error)

	// User Management Endpoints
	Login(context.Context, *LoginParams) error
	ListUserRoles(context.Context) ([]string, error)

	// Authenticated Endpoints
	UpdateUser(context.Context, *UpdateUserParams) error
	UserOrganization(context.Context) (*OrganizationReply, error)

	// Organization management
	CreateOrganization(context.Context, *OrganizationParams) (*OrganizationReply, error)
	DeleteOrganization(_ context.Context, id string) error
	PatchOrganization(_ context.Context, id string, request *OrganizationParams) (*OrganizationReply, error)
	ListOrganizations(context.Context, *ListOrganizationsParams) (*ListOrganizationsReply, error)

	// Collaborators endpoint
	AddCollaborator(context.Context, *models.Collaborator) (*models.Collaborator, error)
	ListCollaborators(context.Context) (*ListCollaboratorsReply, error)
	UpdateCollaboratorRoles(_ context.Context, id string, request *UpdateRolesParams) (*models.Collaborator, error)
	DeleteCollaborator(_ context.Context, id string) error

	MemberList(context.Context, *MemberPageInfo) (*MemberListReply, error)
	MemberDetails(context.Context, *MemberDetailsParams) (*MemberDetailsReply, error)

	// Registration form
	LoadRegistrationForm(context.Context, *RegistrationFormParams) (*RegistrationForm, error)
	SaveRegistrationForm(context.Context, *RegistrationForm) (*RegistrationForm, error)
	ResetRegistrationForm(context.Context, *RegistrationFormParams) (*RegistrationForm, error)
	SubmitRegistration(_ context.Context, network string) (*RegisterReply, error)
	RegistrationStatus(context.Context) (*RegistrationStatus, error)

	// Overview and announcements
	Overview(context.Context) (*OverviewReply, error)
	Announcements(context.Context) (*AnnouncementsReply, error)
	MakeAnnouncement(context.Context, *models.Announcement) error
	Attention(context.Context) (*AttentionReply, error)

	// Certificate management
	Certificates(context.Context) (*CertificatesReply, error)
}

func New

func New(endpoint string, opts ...ClientOption) (_ BFFClient, err error)

New creates a new api.v1 API client that implements the BFF interface.

type Certificate added in v1.5.0

type Certificate struct {
	SerialNumber string                 `json:"serial_number"`
	IssuedAt     string                 `json:"issued_at"`
	ExpiresAt    string                 `json:"expires_at"`
	Revoked      bool                   `json:"revoked"`
	Details      map[string]interface{} `json:"details"`
}

Certificate contains details about a certificate issued to a VASP.

type CertificatesReply added in v1.5.0

type CertificatesReply struct {
	Error   NetworkError  `json:"network_error,omitempty"`
	TestNet []Certificate `json:"testnet"`
	MainNet []Certificate `json:"mainnet"`
}

CertificatesReply is returned on certificates requests.

type ClientOption added in v1.5.0

type ClientOption func(c *APIv1) error

ClientOption allows us to configure the APIv1 client when it is created.

func WithClient added in v1.5.0

func WithClient(client *http.Client) ClientOption

func WithCredentials added in v1.5.0

func WithCredentials(creds Credentials) ClientOption

type Credentials added in v1.5.0

type Credentials interface {
	AccessToken() (string, error)
}

Credentials provides a basic interface for loading an access token from Auth0 into the BFF API Client. Credentials can be loaded from disk, generated, or directly authenticated with Auth0 via a machine-to-machine token.

NOTE: this is a fundamentally different mechanism than the GDS Admin API credentials because the Admin API generates its own tokens, and Auth0 manages the BFF credentials.

type FieldValidationError added in v1.7.0

type FieldValidationError struct {
	Field string `json:"field"`
	Error string `json:"error"`
	Index int    `json:"index"`
}

A per-field validation error that is intended for human consumption - if the field is not valid (e.g. empty when required, doesn't match regular expression, etc.) then this struct is meant to be sent back so the front-end can render the message to the user in a help-box or similar. If the field is an array element, then the index field will contain the index of the erroring element.

func FromValidationErrors added in v1.7.0

func FromValidationErrors(err error) []*FieldValidationError

func NewFieldValidationError added in v1.7.0

func NewFieldValidationError(err error) *FieldValidationError

type ListCollaboratorsReply added in v1.6.0

type ListCollaboratorsReply struct {
	Collaborators []*models.Collaborator `json:"collaborators"`
}

ListCollaboratorsReply contains a list of collaborators.

type ListOrganizationsParams added in v1.7.0

type ListOrganizationsParams struct {
	Name     string `url:"name,omitempty" form:"name"`
	Page     int    `url:"page,omitempty" form:"page" default:"1"`
	PageSize int    `url:"page_size,omitempty" form:"page_size" default:"8"`
}

ListOrganizationsParams contains query parameters for listing organizations.

type ListOrganizationsReply added in v1.7.0

type ListOrganizationsReply struct {
	Organizations []*OrganizationReply `json:"organizations"`
	Count         int                  `json:"count"`
	Page          int                  `json:"page"`
	PageSize      int                  `json:"page_size"`
}

ListOrganizationsReply contains a page of organizations.

type LocalCredentials added in v1.5.0

type LocalCredentials struct {
	Path  string
	Token *Auth0Token
}

LocalCredentials loads and saves the access token from disk.

func (*LocalCredentials) AccessToken added in v1.5.0

func (t *LocalCredentials) AccessToken() (_ string, err error)

AccessToken implements the Credentials interface by checking if the token has been loaded, and if not, it loads the token from disk. Validation is performed by the Auth0Token to ensure the credentials are valid and not expired.

func (*LocalCredentials) Dump added in v1.5.0

func (t *LocalCredentials) Dump() (err error)

Dump the credentials to store them to the path on disk.

func (*LocalCredentials) Load added in v1.5.0

func (t *LocalCredentials) Load() (err error)

Load the credentials from the path on disk.

type LoginParams added in v1.6.0

type LoginParams struct {
	OrgID string `json:"orgid"`
}

LoginParams contains additional information needed for post-authentication checks during user login.

type LookupParams

type LookupParams struct {
	ID         string `url:"uuid,omitempty" form:"uuid"`
	CommonName string `url:"common_name,omitempty" form:"common_name"`
}

LookupParams is converted into a GDS LookupRequest.

type LookupReply

type LookupReply struct {
	TestNet map[string]interface{} `json:"testnet"`
	MainNet map[string]interface{} `json:"mainnet"`
}

LookupReply can return 1-2 results either one result found from one directory service or results found from both TestNet and MainNet. If no results are found, the Lookup endpoint returns a 404 error (not found). The result is the simplest case, just a JSON serialization of the protocol buffers returned from GDS to help long term maintainability. The protocol buffers contain a "registered_directory" field that will have either vaspdirectory.net or trisatest.net inside of it - which can be used to identify which network the record is associated with. The protocol buffers may also contain an "error" field - the BFF will handle this field by logging the error but will exclude it from any results returned.

type MemberDetails added in v1.5.0

type MemberDetails struct {
	ID          string                 `json:"id"`
	Status      string                 `json:"status"`
	CountryCode string                 `json:"country_code"`
	FirstListed string                 `json:"first_listed"`
	VerifiedOn  string                 `json:"verified_on"`
	LastUpdated string                 `json:"last_updated"`
	Certificate map[string]interface{} `json:"certificate"`
}

MemberDetails contains VASP-specific information.

type MemberDetailsParams added in v1.5.0

type MemberDetailsParams struct {
	ID        string `url:"-" form:"-"`
	Directory string `url:"registered_directory,omitempty" form:"registered_directory"`
}

MemberDetailsParams contains details required to identify a VASP member in a specific registered directory (e.g. trisatest.net or vaspdirectory.net).

type MemberDetailsReply added in v1.5.0

type MemberDetailsReply struct {
	Summary     map[string]interface{} `json:"summary"`
	LegalPerson map[string]interface{} `json:"legal_person"`
	Contacts    map[string]interface{} `json:"contacts"`
	Trixo       map[string]interface{} `json:"trixo"`
}

MemberDetailsReply contains sensitive details about a VASP member.

type MemberListReply added in v1.7.1

type MemberListReply struct {
	VASPs         []*members.VASPMember `json:"vasps"`
	NextPageToken string                `json:"next_page_token,omitempty"`
}

type MemberPageInfo added in v1.7.1

type MemberPageInfo struct {
	Directory string `url:"registered_directory,omitempty" form:"registered_directory"`
	PageSize  int32  `url:"page_size,omitempty" form:"page_size"`
	PageToken string `url:"page_token,omitempty" form:"page_token"`
}

MembersPageInfo enables paginated requests to the TRISAMembers/List RPC for the specified directory. Pagination is not stateful and requires a token.

type NetworkActivityReply added in v1.7.3

type NetworkActivityReply struct {
	TestNet []Activity `json:"testnet"`
	MainNet []Activity `json:"mainnet"`
}

NetworkActivityReply is a map of the network (TestNet or MainNet) to Activity, which is a time-aggregated collection of events (Search, Lookup, etc) that occurred on the network

type NetworkError added in v1.5.0

type NetworkError struct {
	TestNet string `json:"testnet,omitempty"`
	MainNet string `json:"mainnet,omitempty"`
}

NetworkError is populated when the BFF receives an error from a network endpoint, containing an error string for each network that errored. This allows the client to distinguish between network errors and BFF errors and determine which network the errors originated from.

type NetworkOverview added in v1.5.0

type NetworkOverview struct {
	Status             string        `json:"status"`
	Vasps              int           `json:"vasps"`
	CertificatesIssued int           `json:"certificates_issued"`
	NewMembers         int           `json:"new_members"`
	MemberDetails      MemberDetails `json:"member_details"`
}

NetworkOverview contains network-specific information.

type OrganizationParams added in v1.6.0

type OrganizationParams struct {
	Name   string `json:"name"`
	Domain string `json:"domain"`
}

OrganizationParams is used to create and update organizations.

type OrganizationReply added in v1.6.0

type OrganizationReply struct {
	ID           string `json:"id"`
	Name         string `json:"name"`
	Domain       string `json:"domain"`
	CreatedAt    string `json:"created_at"`
	LastLogin    string `json:"last_login"`
	RefreshToken bool   `json:"refresh_token,omitempty"`
}

OrganizationReply contains high level information about an organization.

type OverviewReply added in v1.5.0

type OverviewReply struct {
	Error   NetworkError    `json:"error,omitempty"`
	OrgID   string          `json:"org_id"`
	TestNet NetworkOverview `json:"testnet"`
	MainNet NetworkOverview `json:"mainnet"`
}

OverviewReply is returned on overview requests.

type RegisterReply

type RegisterReply struct {
	Error               map[string]interface{} `json:"error,omitempty"`
	Id                  string                 `json:"id"`
	RegisteredDirectory string                 `json:"registered_directory"`
	CommonName          string                 `json:"common_name"`
	Status              string                 `json:"status"`
	Message             string                 `json:"message"`
	PKCS12Password      string                 `json:"pkcs12password"`
	RefreshToken        bool                   `json:"refresh_token,omitempty"`
}

RegisterReply is converted from a protocol buffer RegisterReply.

type RegistrationForm added in v1.7.0

type RegistrationForm struct {
	Step   RegistrationFormStep     `json:"step,omitempty"`
	Form   *models.RegistrationForm `json:"form"`
	Errors []*FieldValidationError  `json:"errors,omitempty"`
}

RegistrationForm is a wrapper around the models.RegistrationForm that includes API- specific details such as the step and field validation errors.

func (*RegistrationForm) MarshalStepJSON added in v1.7.0

func (r *RegistrationForm) MarshalStepJSON() (_ gin.H, err error)

MarshalStepJSON removes any unnecessary fields from the registration form.

type RegistrationFormParams added in v1.7.0

type RegistrationFormParams struct {
	Step RegistrationFormStep `url:"step,omitempty" form:"step"`
}

Allows the front-end to specify which part of the registration form they want to fetch or delete. GET /v1/registration will return the entire registration form, while GET /v1/registration?step=trixo would return just the TRIXO form DELETE /v1/registration will reset the entire registration form, while DELETE /v1/registration?step=trixo would reset just the TRIXO form

type RegistrationFormStep added in v1.7.0

type RegistrationFormStep string
const (
	StepBasicDetails RegistrationFormStep = "basic"
	StepLegalPerson  RegistrationFormStep = "legal"
	StepContacts     RegistrationFormStep = "contacts"
	StepTRISA        RegistrationFormStep = "trisa"
	StepTRIXO        RegistrationFormStep = "trixo"
)

type RegistrationStatus added in v1.5.0

type RegistrationStatus struct {
	TestNetSubmitted string `json:"testnet_submitted,omitempty"`
	MainNetSubmitted string `json:"mainnet_submitted,omitempty"`
}

RegistrationStatus is returned on registration status requests. This will contain RFC3339 formatted timestamps indicating when the registration was submitted for testnet and mainnet.

type Reply

type Reply struct {
	Success      bool   `json:"success"`
	Error        string `json:"error,omitempty" yaml:"error,omitempty"`
	RefreshToken bool   `json:"refresh_token,omitempty" yaml:"refresh_token,omitempty"`
}

Reply contains standard fields that are used for generic API responses and errors

func ErrorResponse

func ErrorResponse(err interface{}) Reply

ErrorResponse constructs an new response from the error or returns a success: false.

type StatusParams

type StatusParams struct {
	NoGDS bool `url:"nogds,omitempty" form:"nogds" default:"false"`
}

StatusParams is parsed from the query parameters of the GET request

type StatusReply

type StatusReply struct {
	Status  string `json:"status"`
	Uptime  string `json:"uptime,omitempty"`
	Version string `json:"version,omitempty"`
	TestNet string `json:"testnet,omitempty"`
	MainNet string `json:"mainnet,omitempty"`
}

StatusReply is returned on status requests. Note that no request is needed.

type Token added in v1.5.0

type Token string

A Token is just the JWT base64 encoded token string that can be obtained from the Auth0 debugger or created in memory for tests using Token("mytoken"). Token implements the Credentials interface so it can be passed directly to the client.

func (Token) AccessToken added in v1.5.0

func (t Token) AccessToken() (string, error)

Token implements the Credentials interface but performs limited validation on the string.

type UpdateRolesParams added in v1.5.4

type UpdateRolesParams struct {
	Roles []string `json:"roles"`
}

UpdateRolesParams contains a list of new roles for a collaborator.

type UpdateUserParams added in v1.6.1

type UpdateUserParams struct {
	Name string `json:"name,omitempty"`
}

UpdateUserParams is used to update the user's profile information.

type VerifyContactParams

type VerifyContactParams struct {
	ID        string `url:"vaspID,omitempty" form:"vaspID"`
	Token     string `url:"token,omitempty" form:"token"`
	Directory string `url:"registered_directory,omitempty" form:"registered_directory"`
}

VerifyContactParams is converted into a GDS VerifyContactRequest.

type VerifyContactReply

type VerifyContactReply struct {
	Error   map[string]interface{} `json:"error,omitempty"`
	Status  string                 `json:"status"`
	Message string                 `json:"message"`
}

VerifyContactReply

Jump to

Keyboard shortcuts

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