Documentation ¶
Overview ¶
package middleare contains all the middleware function to use in the API.
package middleare contains all the middleware function to use in the API.
package middleare contains all the middleware function to use in the API.
Index ¶
- func ErrorHandler(ctx *fiber.Ctx, err error) error
- func ExtractEmitterAddr(c *fiber.Ctx, l *zap.Logger) (*vaa.Address, error)
- func ExtractEmitterChainID(c *fiber.Ctx, l *zap.Logger) (vaa.ChainID, error)
- func ExtractGuardianAddress(c *fiber.Ctx, l *zap.Logger) (string, error)
- func ExtractObservationHash(c *fiber.Ctx, l *zap.Logger) (string, error)
- func ExtractObservationSigner(c *fiber.Ctx, l *zap.Logger) (*vaa.Address, error)
- func ExtractPagination(ctx *fiber.Ctx) (*pagination.Pagination, error)
- func ExtractSequence(c *fiber.Ctx, l *zap.Logger) (uint64, error)
- func ExtractTargetChainID(c *fiber.Ctx, l *zap.Logger) (vaa.ChainID, error)
- func ExtractTransactionId(c *fiber.Ctx, l *zap.Logger) (string, error)
- func ExtractVAAChainIDEmitter(c *fiber.Ctx, l *zap.Logger) (vaa.ChainID, *vaa.Address, error)
- func ExtractVAAEmitterAndTargetChainId(c *fiber.Ctx, l *zap.Logger) (vaa.ChainID, *vaa.Address, vaa.ChainID, error)
- func ExtractVAAParams(c *fiber.Ctx, l *zap.Logger) (vaa.ChainID, *vaa.Address, vaa.ChainID, uint64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorHandler ¶
ErrorHandler define a fiber custom error handler. This function process all errors returned from any handlers in the stack.
To setup this function we must set the ErrorHandler field of the fiber.Config struct with this function and create a new fiber with this config.
example: fiber.New(fiber.Config{ErrorHandler: errs.APIErrorHandler}
func ExtractEmitterAddr ¶
ExtractEmitterAddr get emitter parameter from route path.
func ExtractEmitterChainID ¶
ExtractEmitterChainID get chain parameter from route path.
func ExtractGuardianAddress ¶
ExtractGuardianAddress get guardian address from route path.
func ExtractObservationHash ¶
ExtractObservationHash get a hash from route path.
func ExtractObservationSigner ¶
ExtractObservationSigner get signer from route path.
func ExtractPagination ¶
func ExtractPagination(ctx *fiber.Ctx) (*pagination.Pagination, error)
func ExtractSequence ¶
ExtractSequence get sequence parameter from route path.
func ExtractTargetChainID ¶
ExtractTargetChainID get chain parameter from route path.
func ExtractVAAChainIDEmitter ¶
ExtractVAAParams get VAA chain, address from route path.
Types ¶
This section is empty.