Documentation ¶
Index ¶
- func BuildFeedContext(ctx sdk.Context, k Keeper, feed types.Feed) (feedCtx types.FeedContext)
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
- type Keeper
- func (k Keeper) CreateFeed(ctx sdk.Context, msg *types.MsgCreateFeed) error
- func (k Keeper) Dequeue(ctx sdk.Context, feedName string, state servicetypes.RequestContextState)
- func (k Keeper) EditFeed(ctx sdk.Context, msg *types.MsgEditFeed) error
- func (k Keeper) Enqueue(ctx sdk.Context, feedName string, state servicetypes.RequestContextState)
- func (k Keeper) Feed(c context.Context, req *types.QueryFeedRequest) (*types.QueryFeedResponse, error)
- func (k Keeper) FeedValue(c context.Context, req *types.QueryFeedValueRequest) (*types.QueryFeedValueResponse, error)
- func (k Keeper) Feeds(c context.Context, req *types.QueryFeedsRequest) (*types.QueryFeedsResponse, error)
- func (k Keeper) GetFeed(ctx sdk.Context, feedName string) (feed types.Feed, found bool)
- func (k Keeper) GetFeedByReqCtxID(ctx sdk.Context, requestContextID tmbytes.HexBytes) (feed types.Feed, found bool)
- func (k Keeper) GetFeedValues(ctx sdk.Context, feedName string) (result types.FeedValues)
- func (k Keeper) GetRequestContext(ctx sdk.Context, requestContextID tmbytes.HexBytes) (serviceexported.RequestContext, bool)
- func (k Keeper) GetServiceKeeper() types.ServiceKeeper
- func (k Keeper) HandlerResponse(ctx sdk.Context, requestContextID tmbytes.HexBytes, responseOutput []string, ...)
- func (k Keeper) HandlerStateChanged(ctx sdk.Context, requestContextID tmbytes.HexBytes, _ string)
- func (k Keeper) IteratorFeeds(ctx sdk.Context, fn func(feed types.Feed))
- func (k Keeper) IteratorFeedsByState(ctx sdk.Context, state servicetypes.RequestContextState, ...)
- func (k Keeper) ModuleServiceRequest(ctx sdk.Context, input string) (result string, output string)
- func (k Keeper) PauseFeed(ctx sdk.Context, msg *types.MsgPauseFeed) error
- func (k Keeper) ResetFeedEntryState(ctx sdk.Context) error
- func (k Keeper) SetFeed(ctx sdk.Context, feed types.Feed)
- func (k Keeper) SetFeedValue(ctx sdk.Context, feedName string, batchCounter uint64, latestHistory uint64, ...)
- func (k Keeper) StartFeed(ctx sdk.Context, msg *types.MsgStartFeed) error
- type ValidateOracleAuthDecorator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildFeedContext ¶
func NewMsgServerImpl ¶ added in v1.2.0
NewMsgServerImpl returns an implementation of the oracle MsgServer interface for the provided Keeper.
func NewQuerier ¶
func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
NewQuerier creates a querier for the oracle module
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper defines a struct for the oracle keeper
func NewKeeper ¶
func NewKeeper( cdc codec.Codec, storeKey sdk.StoreKey, paramSpace paramtypes.Subspace, sk types.ServiceKeeper, ) Keeper
NewKeeper returns an instance of the oracle Keeper
func (Keeper) CreateFeed ¶
CreateFeed creates a stopped feed
func (Keeper) Dequeue ¶
func (k Keeper) Dequeue(ctx sdk.Context, feedName string, state servicetypes.RequestContextState)
Dequeue removes the specified feed from the 'state' queue
func (Keeper) Enqueue ¶
func (k Keeper) Enqueue(ctx sdk.Context, feedName string, state servicetypes.RequestContextState)
Enqueue puts the feed name to a 'state' queue
func (Keeper) Feed ¶
func (k Keeper) Feed(c context.Context, req *types.QueryFeedRequest) (*types.QueryFeedResponse, error)
Feed queries a feed by the feed name
func (Keeper) FeedValue ¶
func (k Keeper) FeedValue(c context.Context, req *types.QueryFeedValueRequest) (*types.QueryFeedValueResponse, error)
func (Keeper) Feeds ¶
func (k Keeper) Feeds(c context.Context, req *types.QueryFeedsRequest) (*types.QueryFeedsResponse, error)
func (Keeper) GetFeedByReqCtxID ¶
func (k Keeper) GetFeedByReqCtxID(ctx sdk.Context, requestContextID tmbytes.HexBytes) (feed types.Feed, found bool)
GetFeedByReqCtxID returns the feed by the request context ID
func (Keeper) GetFeedValues ¶
GetFeedValues returns all feed values by the feed name
func (Keeper) GetRequestContext ¶
func (k Keeper) GetRequestContext(ctx sdk.Context, requestContextID tmbytes.HexBytes) (serviceexported.RequestContext, bool)
func (Keeper) GetServiceKeeper ¶ added in v1.5.0
func (k Keeper) GetServiceKeeper() types.ServiceKeeper
func (Keeper) HandlerResponse ¶
func (k Keeper) HandlerResponse( ctx sdk.Context, requestContextID tmbytes.HexBytes, responseOutput []string, err error, )
HandlerResponse is responsible for processing the data returned from the service module, processed by the aggregation function, and then saved
func (Keeper) HandlerStateChanged ¶
HandlerStateChanged is responsible for update feed state
func (Keeper) IteratorFeeds ¶
IteratorFeeds iterates through all feeds
func (Keeper) IteratorFeedsByState ¶
func (k Keeper) IteratorFeedsByState( ctx sdk.Context, state servicetypes.RequestContextState, fn func(feed types.Feed), )
IteratorFeedsByState iterates through all feeds by state
func (Keeper) ModuleServiceRequest ¶
type ValidateOracleAuthDecorator ¶
type ValidateOracleAuthDecorator struct {
// contains filtered or unexported fields
}
func NewValidateOracleAuthDecorator ¶
func NewValidateOracleAuthDecorator(k Keeper, ak types.AuthKeeper) ValidateOracleAuthDecorator
func (ValidateOracleAuthDecorator) AnteHandle ¶
func (dtf ValidateOracleAuthDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error)
AnteHandle returns an AnteHandler that checks if the creator is authorized