Documentation
¶
Index ¶
- type ActionHandler
- type ActionsWorker
- type Address
- type Balance
- type Coin
- type Context
- type Delegation
- type DelegationResponse
- type DelegationReward
- type GraphQLError
- type Payload
- type PayloadArgs
- type Redelegation
- type RedelegationEntry
- type RedelegationResponse
- type UnbondingDelegation
- type UnbondingDelegationResponse
- type ValidatorCommissionAmount
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionHandler ¶
ActionHandler represents a Hasura action request handler. It returns an interface to be returned to the called, or an error if something is wrong
type ActionsWorker ¶
type ActionsWorker struct {
// contains filtered or unexported fields
}
ActionsWorker represents the worker that is used to handle Hasura actions queries
func NewActionsWorker ¶
func NewActionsWorker(context *Context) *ActionsWorker
NewActionsWorker returns a new ActionsWorker instance
func (*ActionsWorker) RegisterHandler ¶
func (w *ActionsWorker) RegisterHandler(path string, handler ActionHandler)
RegisterHandler registers the provided handler to be used on each call to the provided path
type Context ¶
type Context struct {
Sources *modulestypes.Sources
// contains filtered or unexported fields
}
Context contains the data about a Hasura actions worker execution
func NewContext ¶
func NewContext(node node.Node, sources *modulestypes.Sources) *Context
NewContext returns a new Context instance
type Delegation ¶
type DelegationResponse ¶
type DelegationResponse struct {
Delegations []Delegation `json:"delegations"`
Pagination *query.PageResponse `json:"pagination"`
}
type DelegationReward ¶
type GraphQLError ¶
type GraphQLError struct {
Message string `json:"message"`
}
type Payload ¶
type Payload struct {
SessionVariables map[string]interface{} `json:"session_variables"`
Input PayloadArgs `json:"input"`
}
Payload contains the payload data that is sent from Hasura
func (*Payload) GetAddress ¶
GetAddress returns the address associated with this payload, if any
func (*Payload) GetPagination ¶
func (p *Payload) GetPagination() *query.PageRequest
GetPagination returns the pagination asasociated with this payload, if any
type PayloadArgs ¶
type Redelegation ¶
type Redelegation struct {
DelegatorAddress string `json:"delegator_address"`
ValidatorSrcAddress string `json:"validator_src_address"`
ValidatorDstAddress string `json:"validator_dst_address"`
RedelegationEntries []RedelegationEntry `json:"entries"`
}
type RedelegationEntry ¶
type RedelegationResponse ¶
type RedelegationResponse struct {
Redelegations []Redelegation `json:"redelegations"`
Pagination *query.PageResponse `json:"pagination"`
}
type UnbondingDelegation ¶
type UnbondingDelegation struct {
DelegatorAddress string `json:"delegator_address"`
ValidatorAddress string `json:"validator_address"`
Entries []stakingtype.UnbondingDelegationEntry `json:"entries"`
}
type UnbondingDelegationResponse ¶
type UnbondingDelegationResponse struct {
UnbondingDelegations []UnbondingDelegation `json:"unbonding_delegations"`
Pagination *query.PageResponse `json:"pagination"`
}
type ValidatorCommissionAmount ¶
type ValidatorCommissionAmount struct {
Coins []Coin `json:"coins"`
}