pr_client

package
v0.0.0-...-1305305 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PR_ACTIVE    = "active"
	PR_SUSPENDED = "suspended"
	PR_INACTIVE  = "inactive"
)

Variables

View Source
var LOGGER = logging.MustGetLogger("pr-client")

Functions

This section is empty.

Types

type MockPRServiceClient

type MockPRServiceClient struct {
	URL                                                 string
	ParticipantRegistryGetAllParticipantsURL            string
	ParticipantRegistryGetParticipantsByCountryURL      string
	ParticipantRegistryDomainURL                        string
	ParticipantRegistryQuoteURL                         string
	ParticipantRegistryDistAccountURL                   string
	ParticipantRegistryIssuingAccountURL                string
	ParticipantRegistryGetParticipantsByAssetCountryURL string
	ParticipantRegistryGetParticipantByAddress          string
}

func CreateMockPRServiceClient

func CreateMockPRServiceClient(url string) (MockPRServiceClient, error)

func (MockPRServiceClient) GetAllParticipants

func (client MockPRServiceClient) GetAllParticipants() ([]model.Participant, error)

func (MockPRServiceClient) GetParticipantAccount

func (client MockPRServiceClient) GetParticipantAccount(domain string, account string) (string, error)

func (MockPRServiceClient) GetParticipantByAddress

func (client MockPRServiceClient) GetParticipantByAddress(address string) (model.Participant, error)

func (MockPRServiceClient) GetParticipantDistAccount

func (client MockPRServiceClient) GetParticipantDistAccount(domain string, account string) (string, error)

func (MockPRServiceClient) GetParticipantForDomain

func (client MockPRServiceClient) GetParticipantForDomain(participantID string) (model.Participant, error)

func (MockPRServiceClient) GetParticipantForIssuingAddress

func (client MockPRServiceClient) GetParticipantForIssuingAddress(address string) (model.Participant, error)

func (MockPRServiceClient) GetParticipantIssuingAccount

func (client MockPRServiceClient) GetParticipantIssuingAccount(domain string) (string, error)

func (MockPRServiceClient) GetParticipantsByCountry

func (client MockPRServiceClient) GetParticipantsByCountry(countryCode string) ([]model.Participant, error)

func (MockPRServiceClient) PostParticipantDistAccount

func (client MockPRServiceClient) PostParticipantDistAccount(domain string, account model.Account) error

func (MockPRServiceClient) PostParticipantIssuingAccount

func (client MockPRServiceClient) PostParticipantIssuingAccount(domain string, account model.Account) error

type PRServiceClient

type PRServiceClient interface {
	GetParticipantForDomain(domain string) (model.Participant, error)
	GetParticipantForIssuingAddress(domain string) (model.Participant, error)
	GetAllParticipants() ([]model.Participant, error)
	GetParticipantsByCountry(countryCode string) ([]model.Participant, error)
	GetParticipantDistAccount(domain string, account string) (string, error)
	GetParticipantIssuingAccount(domain string) (string, error)
	PostParticipantDistAccount(domain string, account model.Account) error
	PostParticipantIssuingAccount(domain string, account model.Account) error
	GetParticipantAccount(domain string, account string) (string, error)
	GetParticipantByAddress(address string) (model.Participant, error)
}

type RestPRServiceClient

type RestPRServiceClient struct {
	URL                                                 string
	ParticipantRegistryGetAllParticipantsURL            string
	ParticipantRegistryGetParticipantsByCountryURL      string
	ParticipantRegistryDomainURL                        string
	ParticipantRegistryQuoteURL                         string
	ParticipantRegistryDistAccountURL                   string
	ParticipantRegistryIssuingAccountURL                string
	ParticipantRegistryGetParticipantsByAssetCountryURL string
	ParticipantRegistryGetParticipantByAddress          string
}

func CreateRestPRServiceClient

func CreateRestPRServiceClient(url string) (RestPRServiceClient, error)

func (RestPRServiceClient) GetAllParticipants

func (client RestPRServiceClient) GetAllParticipants() ([]model.Participant, error)

func (RestPRServiceClient) GetParticipantAccount

func (client RestPRServiceClient) GetParticipantAccount(domain string, account string) (string, error)

return err if account does not exist

func (RestPRServiceClient) GetParticipantByAddress

func (client RestPRServiceClient) GetParticipantByAddress(address string) (model.Participant, error)

func (RestPRServiceClient) GetParticipantDistAccount

func (client RestPRServiceClient) GetParticipantDistAccount(domain string, account string) (string, error)

func (RestPRServiceClient) GetParticipantForDomain

func (client RestPRServiceClient) GetParticipantForDomain(domain string) (model.Participant, error)

func (RestPRServiceClient) GetParticipantForIssuingAddress

func (client RestPRServiceClient) GetParticipantForIssuingAddress(accountAddress string) (model.Participant, error)

func (RestPRServiceClient) GetParticipantIssuingAccount

func (client RestPRServiceClient) GetParticipantIssuingAccount(domain string) (string, error)

func (RestPRServiceClient) GetParticipantsByCountry

func (client RestPRServiceClient) GetParticipantsByCountry(countryCode string) ([]model.Participant, error)

func (RestPRServiceClient) GetParticipantsForAssetPair

func (client RestPRServiceClient) GetParticipantsForAssetPair(sc string, tc string) ([]model.Participant, error)

func (RestPRServiceClient) PostParticipantDistAccount

func (client RestPRServiceClient) PostParticipantDistAccount(domain string, account model.Account) error

func (RestPRServiceClient) PostParticipantIssuingAccount

func (client RestPRServiceClient) PostParticipantIssuingAccount(domain string, account model.Account) error

Jump to

Keyboard shortcuts

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