trp

package
v0.24.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

* Package trp implements a JSON web server for the Travel Rule Protocol that was * designed and developed by OpenVASP. This is a separate server from the rest of the * envoy services so that it can be enabled, authenticated, and managed independently.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

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 New

func New(conf config.Config, store store.Store, network network.Network) (s *Server, err error)

func (*Server) Healthz

func (s *Server) Healthz(c *gin.Context)

Healthz is used to alert k8s to the health/liveness status of the server.

func (*Server) Identity added in v0.24.1

func (s *Server) Identity(c *gin.Context)

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

func (s *Server) NotAllowed(c *gin.Context)

Returns a method not allowed JSON response

func (*Server) NotFound

func (s *Server) NotFound(c *gin.Context)

Returns a not found JSON response

func (*Server) OnConfirmation added in v0.24.1

func (s *Server) OnConfirmation(*openvasp.Confirmation) error

OnConfirmation implements the openvasp.ConfirmationHandler interface for finalizing TRP transfer requests with details about the completed on-chain transaction.

func (*Server) OnInquiry added in v0.24.1

OnInquiry implements the openvasp.InquiryHandler interface for handling incoming TRP requests and creating transactions in the database.

func (*Server) Readyz

func (s *Server) Readyz(c *gin.Context)

Readyz is used to alert k8s to the readiness status of the server.

func (*Server) Serve

func (s *Server) Serve(errc chan<- error) (err error)

Serve the TRP API server

func (*Server) SetStatus

func (s *Server) SetStatus(health, ready bool)

SetStatus sets the health and ready status on the server, modifying the behavior of the kubernetes probe responses.

func (*Server) Shutdown

func (s *Server) Shutdown() (err error)

Shutdown the web server gracefully.

func (*Server) Status

func (s *Server) Status(c *gin.Context)

Status reports the version and uptime of the server

func (*Server) TRPExtensions added in v0.24.1

func (s *Server) TRPExtensions(c *gin.Context)

Implementation of the Discoverability Extension: returns supported and required extensions. See: https://gitlab.com/OpenVASP/travel-rule-protocol/-/blob/master/extensions/discoverability.md

func (*Server) TRPVersion added in v0.24.1

func (s *Server) TRPVersion(c *gin.Context)

Implementation of the Discoverability Extension: returns the version and vendor. See: https://gitlab.com/OpenVASP/travel-rule-protocol/-/blob/master/extensions/discoverability.md

func (*Server) URL

func (s *Server) URL() string

URL returns the endpoint of the server as determined by the configuration and the socket address and port (if specified).

func (*Server) Uptime added in v0.24.1

func (s *Server) Uptime(c *gin.Context)

Implementation of the Discoverability Extension: returns the uptime in number of seconds See: https://gitlab.com/OpenVASP/travel-rule-protocol/-/blob/master/extensions/discoverability.md

func (*Server) VerifyTRPHeaders added in v0.24.1

func (s *Server) VerifyTRPHeaders(c *gin.Context)

Middleware for validating TRP protocol headers and ensuring a correct request.

Directories

Path Synopsis
api
v1

Jump to

Keyboard shortcuts

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