Documentation
¶
Index ¶
- Constants
- Variables
- func CheckUUIDMatch(id, target uuid.UUID) error
- func IsAPIRequest(c *gin.Context) bool
- type Render
- type Server
- func (s *Server) APIDocs(c *gin.Context)
- func (s *Server) APIEnabled() gin.HandlerFunc
- func (s *Server) APIKeyDetail(c *gin.Context)
- func (s *Server) APIKeys(c *gin.Context)
- func (s *Server) About(c *gin.Context)
- func (s *Server) AcceptTransaction(c *gin.Context)
- func (s *Server) AcceptTransactionPreview(c *gin.Context)
- func (s *Server) AccountDetail(c *gin.Context)
- func (s *Server) Accounts(c *gin.Context)
- func (s *Server) Authenticate(c *gin.Context)
- func (s *Server) ChangePassword(c *gin.Context)
- func (s *Server) ChangeUserPassword(c *gin.Context)
- func (s *Server) CounterpartyDetail(c *gin.Context)
- func (s *Server) CounterpartyFromTravelAddress(c *gin.Context, address string) (cp *models.Counterparty, err error)
- func (s *Server) CounterpartyVasps(c *gin.Context)
- func (s *Server) CreateAPIKey(c *gin.Context)
- func (s *Server) CreateAccount(c *gin.Context)
- func (s *Server) CreateCounterparty(c *gin.Context)
- func (s *Server) CreateCryptoAddress(c *gin.Context)
- func (s *Server) CreateTransaction(c *gin.Context)
- func (s *Server) CreateUser(c *gin.Context)
- func (s *Server) CryptoAddressDetail(c *gin.Context)
- func (s *Server) Debug(c *gin.Context)
- func (s *Server) DecodeTravelAddress(c *gin.Context)
- func (s *Server) Decrypt(in *models.SecureEnvelope) (out *envelope.Envelope, err error)
- func (s *Server) DeleteAPIKey(c *gin.Context)
- func (s *Server) DeleteAccount(c *gin.Context)
- func (s *Server) DeleteCounterparty(c *gin.Context)
- func (s *Server) DeleteCryptoAddress(c *gin.Context)
- func (s *Server) DeleteTransaction(c *gin.Context)
- func (s *Server) DeleteUser(c *gin.Context)
- func (s *Server) EncodeTravelAddress(c *gin.Context)
- func (s *Server) ExportTransactions(c *gin.Context)
- func (s *Server) Healthz(c *gin.Context)
- func (s *Server) Home(c *gin.Context)
- func (s *Server) LatestPayloadEnvelope(c *gin.Context)
- func (s *Server) ListAPIKeys(c *gin.Context)
- func (s *Server) ListAccounts(c *gin.Context)
- func (s *Server) ListCounterparties(c *gin.Context)
- func (s *Server) ListCryptoAddresses(c *gin.Context)
- func (s *Server) ListSecureEnvelopes(c *gin.Context)
- func (s *Server) ListTransactions(c *gin.Context)
- func (s *Server) ListUsers(c *gin.Context)
- func (s *Server) Localparty(ctx context.Context) (_ *models.Counterparty, err error)
- func (s *Server) Login(c *gin.Context)
- func (s *Server) LoginPage(c *gin.Context)
- func (s *Server) Logout(c *gin.Context)
- func (s *Server) Maintenance() gin.HandlerFunc
- func (s *Server) NotAllowed(c *gin.Context)
- func (s *Server) NotFound(c *gin.Context)
- func (s *Server) OpenAPI(c *gin.Context)
- func (s *Server) PrepareTransaction(c *gin.Context)
- func (s *Server) Readyz(c *gin.Context)
- func (s *Server) Reauthenticate(c *gin.Context)
- func (s *Server) RejectTransaction(c *gin.Context)
- func (s *Server) RepairTransaction(c *gin.Context)
- func (s *Server) RepairTransactionPreview(c *gin.Context)
- func (s *Server) SearchCounterparties(c *gin.Context)
- func (s *Server) SecureEnvelopeDetail(c *gin.Context)
- func (s *Server) SendEnvelope(ctx context.Context, packet *postman.Packet) (err error)
- func (s *Server) SendEnvelopeForTransaction(c *gin.Context)
- func (s *Server) SendEnvelopeForm(c *gin.Context)
- func (s *Server) SendPreparedTransaction(c *gin.Context)
- func (s *Server) SendTRISATransfer(ctx context.Context, p *postman.Packet) (err error)
- func (s *Server) Serve(errc chan<- error) (err error)
- func (s *Server) SetStatus(health, ready bool)
- func (s *Server) Shutdown() (err error)
- func (s *Server) Status(c *gin.Context)
- func (s *Server) TransactionDetail(c *gin.Context)
- func (s *Server) Transactions(c *gin.Context)
- func (s *Server) TransactionsAcceptPreview(c *gin.Context)
- func (s *Server) TransactionsInfo(c *gin.Context)
- func (s *Server) TransactionsRepairPreview(c *gin.Context)
- func (s *Server) TravelAddressUtility(c *gin.Context)
- func (s *Server) UIEnabled() gin.HandlerFunc
- func (s *Server) URL() string
- func (s *Server) UpdateAPIKey(c *gin.Context)
- func (s *Server) UpdateAPIKeyPreview(c *gin.Context)
- func (s *Server) UpdateAccount(c *gin.Context)
- func (s *Server) UpdateAccountPreview(c *gin.Context)
- func (s *Server) UpdateCounterparty(c *gin.Context)
- func (s *Server) UpdateCounterpartyPreview(c *gin.Context)
- func (s *Server) UpdateCryptoAddress(c *gin.Context)
- func (s *Server) UpdateTransaction(c *gin.Context)
- func (s *Server) UpdateUser(c *gin.Context)
- func (s *Server) UserDetail(c *gin.Context)
- func (s *Server) UserProfile(c *gin.Context)
- func (s *Server) UsersManagement(c *gin.Context)
Constants ¶
const ( ContentDisposition = "Content-Disposition" ContentType = "Content-Type" AcceptLength = "Accept-Length" ContentTypeCSV = "text/csv" )
Variables ¶
var ( ErrNoTRISAEndpoint = errors.New("cannot construct trisa travel address: no trisa endpoint defined") ErrNoLocalCommonName = errors.New("invalid configuration: no common name in trisa endpoint configuration") ErrNoLocalparty = errors.New("could not lookup local vasp counterparty from database, please try again later") ErrNotAccepted = errors.New("the accepted formats are not offered by the server") ErrNoPublicKey = errors.New("no public key associated with secure envelope") )
var TransactionsHeader = []string{
"ID", "Status", "Counterparty", "Originator", "Originator Address",
"Beneficiary", "Beneficiary Address", "Virtual Asset", "Amount",
"Last Update", "Created", "Number of Envelopes", "HMAC Signature",
}
Functions ¶
func CheckUUIDMatch ¶
func IsAPIRequest ¶ added in v0.16.0
Determines if the request being handled is an API request by inspecting the request path and Accept header. If the request path starts in /v1 and the Accept header is nil or json, then this function returns true.
Types ¶
type Render ¶
type Render struct {
// contains filtered or unexported fields
}
func (*Render) AddPattern ¶
type Server ¶
The Web Server implements the compliance and administrative user interfaces.
func Debug ¶
func Debug(conf config.Config, store store.Store, network network.Network, srv *http.Server) (s *Server, err error)
Debug returns a server that uses the specified http server instead of creating one. This function is primarily used to create test servers easily.
func (*Server) APIEnabled ¶ added in v0.16.0
func (s *Server) APIEnabled() gin.HandlerFunc
If the API is disabled, this middleware factory function returns a middleware that returns 529 Unavailable on all API requests. If the API is enabled, it returns nil and should not be used as a middleware function.
func (*Server) APIKeyDetail ¶ added in v0.24.1
func (*Server) AcceptTransaction ¶ added in v0.14.0
func (*Server) AcceptTransactionPreview ¶ added in v0.12.0
func (*Server) AccountDetail ¶
func (*Server) Authenticate ¶
func (*Server) ChangePassword ¶ added in v0.18.0
func (*Server) ChangeUserPassword ¶ added in v0.18.0
func (*Server) CounterpartyDetail ¶
func (*Server) CounterpartyFromTravelAddress ¶
func (*Server) CounterpartyVasps ¶
func (*Server) CreateAPIKey ¶ added in v0.24.1
func (*Server) CreateAccount ¶
func (*Server) CreateCounterparty ¶
func (*Server) CreateCryptoAddress ¶
func (*Server) CreateTransaction ¶
func (*Server) CreateUser ¶ added in v0.18.0
func (*Server) CryptoAddressDetail ¶
func (*Server) DecodeTravelAddress ¶ added in v0.12.0
Decode a travel address into a URL or its other contents.
func (*Server) DeleteAPIKey ¶ added in v0.24.1
func (*Server) DeleteAccount ¶
func (*Server) DeleteCounterparty ¶
func (*Server) DeleteCryptoAddress ¶
func (*Server) DeleteTransaction ¶
func (*Server) DeleteUser ¶ added in v0.18.0
func (*Server) EncodeTravelAddress ¶ added in v0.12.0
Convert a URL or other data into a travel address.
func (*Server) ExportTransactions ¶
func (*Server) LatestPayloadEnvelope ¶ added in v0.24.0
func (*Server) ListAPIKeys ¶ added in v0.24.1
func (*Server) ListAccounts ¶
func (*Server) ListCounterparties ¶
func (*Server) ListCryptoAddresses ¶
func (*Server) ListSecureEnvelopes ¶
func (*Server) ListTransactions ¶
func (*Server) Localparty ¶
Localparty returns the VASP information for the current node.
func (*Server) Maintenance ¶
func (s *Server) Maintenance() gin.HandlerFunc
If the server is in maintenance mode, aborts the current request and renders the maintenance mode page instead. Returns nil if not in maintenance mode.
func (*Server) NotAllowed ¶
Renders the "invalid action page"
func (*Server) PrepareTransaction ¶
func (*Server) Reauthenticate ¶
func (*Server) RejectTransaction ¶ added in v0.14.0
func (*Server) RepairTransaction ¶ added in v0.24.0
func (*Server) RepairTransactionPreview ¶ added in v0.24.0
func (*Server) SearchCounterparties ¶ added in v0.23.0
func (*Server) SecureEnvelopeDetail ¶
func (*Server) SendEnvelope ¶ added in v0.14.0
SendEnvelope performs the bulk of the work to send a TRISA or TRP transaction to the counterparty specified and storing both the outgoing and incoming secure envelopes in the database. This method is used to send the prepared transaction, to send envelopes for a transaction, and in the accept/reject workflows.
func (*Server) SendEnvelopeForTransaction ¶ added in v0.14.0
func (*Server) SendEnvelopeForm ¶
func (*Server) SendPreparedTransaction ¶
func (*Server) SendTRISATransfer ¶
func (*Server) Serve ¶
Serve the compliance and administrative user interfaces in its own go routine.
func (*Server) SetStatus ¶
SetStatus sets the health and ready status on the server, modifying the behavior of the kubernetes probe responses.
func (*Server) TransactionDetail ¶
func (*Server) Transactions ¶
func (*Server) TransactionsAcceptPreview ¶ added in v0.12.0
func (*Server) TransactionsInfo ¶ added in v0.12.0
func (*Server) TransactionsRepairPreview ¶ added in v0.24.1
func (*Server) TravelAddressUtility ¶ added in v0.12.0
func (*Server) UIEnabled ¶ added in v0.16.0
func (s *Server) UIEnabled() gin.HandlerFunc
If the UI is disabled, this middleware factory function returrns a middleware that returns 529 Unvailable on all UI requests. If the UI is enabled, it returns nil.
func (*Server) URL ¶
URL returns the endpoint of the server as determined by the configuration and the socket address and port (if specified).
func (*Server) UpdateAPIKey ¶ added in v0.24.1
func (*Server) UpdateAPIKeyPreview ¶ added in v0.27.0
func (*Server) UpdateAccount ¶
func (*Server) UpdateAccountPreview ¶
func (*Server) UpdateCounterparty ¶
func (*Server) UpdateCounterpartyPreview ¶
func (*Server) UpdateCryptoAddress ¶
func (*Server) UpdateTransaction ¶
func (*Server) UpdateUser ¶ added in v0.18.0
func (*Server) UserDetail ¶ added in v0.18.0
func (*Server) UserProfile ¶ added in v0.18.0
func (*Server) UsersManagement ¶ added in v0.18.0
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
api
|
|
Scene provides well structured template contexts and functionality for HTML template rendering.
|
Scene provides well structured template contexts and functionality for HTML template rendering. |