Documentation ¶
Index ¶
- Variables
- func BuildHTTPResponse(statusCode int, body string) *http.Response
- func GetResponse(testServer *httptest.Server, values url.Values) (int, []byte)
- func JSONGetResponse(testServer *httptest.Server, data map[string]interface{}) (int, []byte)
- func Now() time.Time
- type HTTPClientInterface
- type MockDatabase
- func (m *MockDatabase) DeleteAllowedFIByDomain(domain string) error
- func (m *MockDatabase) DeleteAllowedUserByDomainAndUserID(domain, userID string) error
- func (m *MockDatabase) GetAllowedFIByDomain(domain string) (*db.AllowedFI, error)
- func (m *MockDatabase) GetAllowedUserByDomainAndUserID(domain, userID string) (*db.AllowedUser, error)
- func (m *MockDatabase) GetAuthData(requestID string) (*db.AuthData, error)
- func (m *MockDatabase) GetAuthorizedTransactionByMemo(memo string) (*db.AuthorizedTransaction, error)
- func (m *MockDatabase) InsertAllowedFI(fi *db.AllowedFI) error
- func (m *MockDatabase) InsertAllowedUser(user *db.AllowedUser) error
- func (m *MockDatabase) InsertAuthData(authData *db.AuthData) error
- func (m *MockDatabase) InsertAuthorizedTransaction(transaction *db.AuthorizedTransaction) error
- type MockFederationResolver
- func (m *MockFederationResolver) ForwardRequest(domain string, fields url.Values) (*fprotocol.NameResponse, error)
- func (m *MockFederationResolver) LookupByAccountID(aid string) (*fprotocol.IDResponse, error)
- func (m *MockFederationResolver) LookupByAddress(addy string) (*fprotocol.NameResponse, error)
- type MockHTTPClient
- type MockNonceGenerator
- type MockSignerVerifier
- type MockStellartomlResolver
Constants ¶
This section is empty.
Variables ¶
var PredefinedTime time.Time
PredefinedTime is a time.Time object that will be returned by Now() function
Functions ¶
func BuildHTTPResponse ¶
BuildHTTPResponse is used in tests
func GetResponse ¶
GetResponse is used in tests
func JSONGetResponse ¶
JSONGetResponse is used in tests
Types ¶
type HTTPClientInterface ¶
type HTTPClientInterface interface { PostForm(url string, data url.Values) (resp *http.Response, err error) Get(url string) (resp *http.Response, err error) }
HTTPClientInterface helps mocking http.Client in tests
type MockDatabase ¶
MockDatabase ...
func (*MockDatabase) DeleteAllowedFIByDomain ¶
func (m *MockDatabase) DeleteAllowedFIByDomain(domain string) error
DeleteAllowedFIByDomain is a mocking a method
func (*MockDatabase) DeleteAllowedUserByDomainAndUserID ¶
func (m *MockDatabase) DeleteAllowedUserByDomainAndUserID(domain, userID string) error
DeleteAllowedUserByDomainAndUserID is a mocking a method
func (*MockDatabase) GetAllowedFIByDomain ¶
func (m *MockDatabase) GetAllowedFIByDomain(domain string) (*db.AllowedFI, error)
GetAllowedFIByDomain is a mocking a method
func (*MockDatabase) GetAllowedUserByDomainAndUserID ¶
func (m *MockDatabase) GetAllowedUserByDomainAndUserID(domain, userID string) (*db.AllowedUser, error)
GetAllowedUserByDomainAndUserID is a mocking a method
func (*MockDatabase) GetAuthData ¶
func (m *MockDatabase) GetAuthData(requestID string) (*db.AuthData, error)
GetAuthData is a mocking a method
func (*MockDatabase) GetAuthorizedTransactionByMemo ¶
func (m *MockDatabase) GetAuthorizedTransactionByMemo(memo string) (*db.AuthorizedTransaction, error)
GetAuthorizedTransactionByMemo is a mocking a method
func (*MockDatabase) InsertAllowedFI ¶
func (m *MockDatabase) InsertAllowedFI(fi *db.AllowedFI) error
InsertAllowedFI is a mocking a method
func (*MockDatabase) InsertAllowedUser ¶
func (m *MockDatabase) InsertAllowedUser(user *db.AllowedUser) error
InsertAllowedUser is a mocking a method
func (*MockDatabase) InsertAuthData ¶
func (m *MockDatabase) InsertAuthData(authData *db.AuthData) error
InsertAuthData is a mocking a method
func (*MockDatabase) InsertAuthorizedTransaction ¶
func (m *MockDatabase) InsertAuthorizedTransaction(transaction *db.AuthorizedTransaction) error
InsertAuthorizedTransaction is a mocking a method
type MockFederationResolver ¶
MockFederationResolver ...
func (*MockFederationResolver) ForwardRequest ¶
func (m *MockFederationResolver) ForwardRequest(domain string, fields url.Values) (*fprotocol.NameResponse, error)
ForwardRequest is a mocking a method
func (*MockFederationResolver) LookupByAccountID ¶
func (m *MockFederationResolver) LookupByAccountID(aid string) (*fprotocol.IDResponse, error)
LookupByAccountID is a mocking a method
func (*MockFederationResolver) LookupByAddress ¶
func (m *MockFederationResolver) LookupByAddress(addy string) (*fprotocol.NameResponse, error)
LookupByAddress is a mocking a method
type MockHTTPClient ¶
MockHTTPClient ...
type MockNonceGenerator ¶
type MockNonceGenerator struct{}
func (*MockNonceGenerator) Generate ¶
func (n *MockNonceGenerator) Generate() string
type MockSignerVerifier ¶
MockSignerVerifier ...
type MockStellartomlResolver ¶
MockStellartomlResolver ...
func (*MockStellartomlResolver) GetStellarToml ¶
func (m *MockStellartomlResolver) GetStellarToml(domain string) (resp *stellartoml.Response, err error)
GetStellarToml is a mocking a method
func (*MockStellartomlResolver) GetStellarTomlByAddress ¶
func (m *MockStellartomlResolver) GetStellarTomlByAddress(addy string) (*stellartoml.Response, error)
GetStellarTomlByAddress is a mocking a method