observations

package
v0.0.0-...-efbd42f Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package observations handle the request of observations data from governor endpoint defined in the api.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller definition.

func NewController

func NewController(srv *observations.Service, logger *zap.Logger) *Controller

NewController create a new controler.

func (*Controller) FindAll

func (c *Controller) FindAll(ctx *fiber.Ctx) error

FindAll godoc @Description Returns all observations, sorted in descending timestamp order. @Tags deltaswapscan @ID find-observations @Param page query integer false "Page number." @Param pageSize query integer false "Number of elements per page." @Param sortOrder query string false "Sort results in ascending or descending order." Enums(ASC, DESC) @Success 200 {object} []observations.ObservationDoc @Failure 400 @Failure 500 @Router /api/v1/observations [get]

func (*Controller) FindAllByChain

func (c *Controller) FindAllByChain(ctx *fiber.Ctx) error

FindAllByChain godoc @Description Returns all observations for a given blockchain, sorted in descending timestamp order. @Tags deltaswapscan @ID find-observations-by-chain @Param page query integer false "Page number." @Param pageSize query integer false "Number of elements per page." @Param sortOrder query string false "Sort results in ascending or descending order." Enums(ASC, DESC) @Success 200 {object} []observations.ObservationDoc @Failure 400 @Failure 500 @Router /api/v1/observations/:chain [get]

func (*Controller) FindAllByEmitter

func (c *Controller) FindAllByEmitter(ctx *fiber.Ctx) error

FindAllByEmitter godoc @Description Returns all observations for a specific emitter address, sorted in descending timestamp order. @Tags deltaswapscan @ID find-observations-by-emitter @Param page query integer false "Page number." @Param pageSize query integer false "Number of elements per page." @Param sortOrder query string false "Sort results in ascending or descending order." Enums(ASC, DESC) @Success 200 {object} []observations.ObservationDoc @Failure 400 @Failure 500 @Router /api/v1/observations/:chain/:emitter [get]

func (*Controller) FindAllByVAA

func (c *Controller) FindAllByVAA(ctx *fiber.Ctx) error

FindAllByVAA godoc @Description Find observations identified by emitter chain, emitter address and sequence. @Tags deltaswapscan @ID find-observations-by-sequence @Param page query integer false "Page number." @Param pageSize query integer false "Number of elements per page." @Param sortOrder query string false "Sort results in ascending or descending order." Enums(ASC, DESC) @Success 200 {object} []observations.ObservationDoc @Failure 400 @Failure 500 @Router /api/v1/observations/:chain/:emitter/:sequence [get]

func (*Controller) FindOne

func (c *Controller) FindOne(ctx *fiber.Ctx) error

FindOne godoc @Description Find a specific observation. @Tags deltaswapscan @ID find-observations-by-id @Param page query integer false "Page number." @Param pageSize query integer false "Number of elements per page." @Param sortOrder query string false "Sort results in ascending or descending order." Enums(ASC, DESC) @Success 200 {object} []observations.ObservationDoc @Failure 400 @Failure 500 @Router /api/v1/observations/:chain/:emitter/:sequence/:signer/:hash [get]

Jump to

Keyboard shortcuts

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