Documentation ¶
Overview ¶
Package governor handle the request of governor data from governor endpoint defined in the api.
Index ¶
- type Controller
- func (c *Controller) FindGovernorConfigurationByGuardianAddress(ctx *fiber.Ctx) error
- func (c *Controller) FindGovernorConfigurations(ctx *fiber.Ctx) error
- func (c *Controller) FindGovernorStatus(ctx *fiber.Ctx) error
- func (c *Controller) FindGovernorStatusByGuardianAddress(ctx *fiber.Ctx) error
- func (c *Controller) FindNotionalLimit(ctx *fiber.Ctx) error
- func (c *Controller) GetAvailableNotional(ctx *fiber.Ctx) error
- func (c *Controller) GetAvailableNotionalByChainID(ctx *fiber.Ctx) error
- func (c *Controller) GetEnqueuedVaas(ctx *fiber.Ctx) error
- func (c *Controller) GetEnqueuedVaasByChainID(ctx *fiber.Ctx) error
- func (c *Controller) GetGovernorLimit(ctx *fiber.Ctx) error
- func (c *Controller) GetGovernorVaas(ctx *fiber.Ctx) error
- func (c *Controller) GetMaxNotionalAvailableByChainID(ctx *fiber.Ctx) error
- func (c *Controller) GetNotionalLimitByChainID(ctx *fiber.Ctx) error
- type GovernorVaasResponse
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(serv *governor.Service, logger *zap.Logger) *Controller
NewController create a new controler.
func (*Controller) FindGovernorConfigurationByGuardianAddress ¶
func (c *Controller) FindGovernorConfigurationByGuardianAddress(ctx *fiber.Ctx) error
FindGovernorConfigurationByGuardianAddress godoc @Description Returns governor configuration for a given guardian. @Tags wormholescan @ID governor-config-by-guardian-address @Success 200 {object} response.Response[governor.GovConfig] @Failure 400 @Failure 500 @Router /api/v1/governor/config/:guardian_address [get]
func (*Controller) FindGovernorConfigurations ¶
func (c *Controller) FindGovernorConfigurations(ctx *fiber.Ctx) error
FindGovernorConfigurations godoc @Description Returns governor configuration for all guardians. @Tags wormholescan @ID governor-config @Param page query integer false "Page number." @Param pageSize query integer false "Number of elements per page." @Success 200 {object} response.Response[governor.GovConfig] @Failure 400 @Failure 500 @Router /api/v1/governor/config [get]
func (*Controller) FindGovernorStatus ¶
func (c *Controller) FindGovernorStatus(ctx *fiber.Ctx) error
FindGovernorStatus godoc @Description Returns the governor status for all guardians. @Tags wormholescan @ID governor-status @Param page query integer false "Page number." @Param pageSize query integer false "Number of elements per page." @Success 200 {object} response.Response[[]governor.GovStatus] @Failure 400 @Failure 500 @Router /api/v1/governor/status [get]
func (*Controller) FindGovernorStatusByGuardianAddress ¶
func (c *Controller) FindGovernorStatusByGuardianAddress(ctx *fiber.Ctx) error
FindGovernorStatusByGuardianAddress godoc @Description Returns the governor status for a given guardian. @Tags wormholescan @ID governor-status-by-guardian-address @Param page query integer false "Page number." @Param pageSize query integer false "Number of elements per page." @Success 200 {object} response.Response[governor.GovStatus] @Failure 400 @Failure 500 @Router /api/v1/governor/status/:guardian_address [get]
func (*Controller) FindNotionalLimit ¶
func (c *Controller) FindNotionalLimit(ctx *fiber.Ctx) error
FindNotionalLimit godoc @Description Returns the detailed notional limit for all blockchains. @Tags wormholescan @ID governor-notional-limit-detail @Param page query integer false "Page number." @Param pageSize query integer false "Number of elements per page." @Success 200 {object} response.Response[[]governor.NotionalLimitDetail] @Failure 400 @Failure 500 @Router /api/v1/governor/notional/limit [get]
func (*Controller) GetAvailableNotional ¶
func (c *Controller) GetAvailableNotional(ctx *fiber.Ctx) error
GetAvailableNotional godoc @Description Returns the amount of notional value available for each blockchain. @Tags wormholescan @ID governor-notional-available @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} response.Response[[]governor.NotionalAvailable] @Failure 400 @Failure 500 @Router /api/v1/governor/notional/available [get]
func (*Controller) GetAvailableNotionalByChainID ¶
func (c *Controller) GetAvailableNotionalByChainID(ctx *fiber.Ctx) error
GetAvailableNotionalByChainID godoc @Description Returns the amount of notional value available for a given blockchain. @Tags wormholescan @ID governor-notional-available-by-chain @Param page query integer false "Page number." @Param pageSize query integer false "Number of elements per page." @Success 200 {object} response.Response[[]governor.NotionalAvailableDetail] @Failure 400 @Failure 500 @Router /api/v1/governor/notional/available/:chain [get]
func (*Controller) GetEnqueuedVaas ¶
func (c *Controller) GetEnqueuedVaas(ctx *fiber.Ctx) error
GetEnqueuedVaas godoc @Description Returns enqueued VAAs for each blockchain. @Tags wormholescan @ID governor-enqueued-vaas @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} response.Response[[]governor.EnqueuedVaas] @Failure 400 @Failure 500 @Router /api/v1/governor/enqueued_vaas/ [get]
func (*Controller) GetEnqueuedVaasByChainID ¶
func (c *Controller) GetEnqueuedVaasByChainID(ctx *fiber.Ctx) error
GetEnqueuedVaasByChainID godoc @Description Returns all enqueued VAAs for a given blockchain. @Tags wormholescan @ID guardians-enqueued-vaas-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} response.Response[[]governor.EnqueuedVaaDetail] @Failure 400 @Failure 500 @Router /api/v1/governor/enqueued_vaas/:chain [get]
func (*Controller) GetGovernorLimit ¶
func (c *Controller) GetGovernorLimit(ctx *fiber.Ctx) error
GetGovernorLimit godoc @Description Returns the governor limit for all blockchains. @Tags wormholescan @ID governor-notional-limit @Param page query integer false "Page number." @Param pageSize query integer false "Number of elements per page." @Success 200 {object} response.Response[[]governor.GovernorLimit] @Failure 400 @Failure 500 @Router /api/v1/governor/limit [get]
func (*Controller) GetGovernorVaas ¶
func (c *Controller) GetGovernorVaas(ctx *fiber.Ctx) error
GetGovernorVaas godoc @Description Returns all vaas in Governor. @Tags wormholescan @ID governor-vaas @Success 200 {object} response.Response[[]governor.GovernorVaasResponse] @Failure 400 @Failure 500 @Router /api/v1/governor/vaas [get]
func (*Controller) GetMaxNotionalAvailableByChainID ¶
func (c *Controller) GetMaxNotionalAvailableByChainID(ctx *fiber.Ctx) error
GetMaxNotionalAvailableByChainID godoc @Description Returns the maximum amount of notional value available for a given blockchain. @Tags wormholescan @ID governor-max-notional-available-by-chain @Success 200 {object} response.Response[governor.MaxNotionalAvailableRecord] @Failure 400 @Failure 500 @Router /api/v1/governor/notional/max_available/:chain [get]
func (*Controller) GetNotionalLimitByChainID ¶
func (c *Controller) GetNotionalLimitByChainID(ctx *fiber.Ctx) error
GetNotionalLimitByChainID godoc @Description Returns the detailed notional limit available for a given blockchain. @Tags wormholescan @ID governor-notional-limit-detail-by-chain @Param page query integer false "Page number." @Param pageSize query integer false "Number of elements per page." @Success 200 {object} response.Response[[]governor.NotionalLimitDetail] @Failure 400 @Failure 500 @Router /api/v1/governor/notional/limit/:chain [get]
type GovernorVaasResponse ¶
type GovernorVaasResponse struct { VaaID string `json:"vaaId"` ChainID vaa.ChainID `json:"chainId"` EmitterAddress string `json:"emitterAddress"` Sequence string `json:"sequence"` TxHash string `json:"txHash"` ReleaseTime time.Time `json:"releaseTime"` Amount uint64 `json:"amount"` Status string `json:"status"` }