Documentation ¶
Overview ¶
*
- spork/spork.go
- Copyright (c) 2021 Alvin(Xinyao) Sun <asun@matrixworld.org> *
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
*
- spork/sporkstore.go
- Copyright (c) 2021 Alvin(Xinyao) Sun <asun@matrixworld.org> *
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
Index ¶
- func BlockEventsToJSON(e []client.BlockEvents) []map[string]interface{}
- func EventToJSON(e *cadence.Event) []map[string]interface{}
- func IterQueryEventByBlockRange(ctx context.Context, ss *client.Client, event string, start uint64, end uint64, ...) ([]client.BlockEvents, error)
- type EventResult
- type FlowClient
- type ResolvedAccessNodeList
- type Spork
- type SporkAlchemy
- func (alchemy *SporkAlchemy) Close() error
- func (alchemy *SporkAlchemy) QueryEventByBlockRange(event string, start uint64, end uint64) ([]client.BlockEvents, error)
- func (alchemy *SporkAlchemy) QueryLatestBlockHeight() (uint64, error)
- func (alchemy *SporkAlchemy) String() string
- func (alchemy *SporkAlchemy) SyncSpork() error
- type SporkStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlockEventsToJSON ¶
func BlockEventsToJSON(e []client.BlockEvents) []map[string]interface{}
func EventToJSON ¶
Types ¶
type EventResult ¶
type EventResult struct {
BlockEvents []client.BlockEvents
}
func (*EventResult) JSON ¶
func (e *EventResult) JSON() interface{}
type FlowClient ¶ added in v1.0.0
type ResolvedAccessNodeList ¶
type Spork ¶
type Spork struct { Name string `json:"name"` RootHeight uint64 `json:"rootHeight"` AccessNode string `json:"accessNode"` }
func ReadJSONFromUrl ¶
type SporkAlchemy ¶ added in v1.0.0
func NewSporkAlchemy ¶ added in v1.0.0
func NewSporkAlchemy(endPoint string, apiKey string, maxQueryBlocks uint64, queryBatchSize uint64) *SporkAlchemy
func (*SporkAlchemy) Close ¶ added in v1.0.1
func (alchemy *SporkAlchemy) Close() error
close the spork alchemy
func (*SporkAlchemy) QueryEventByBlockRange ¶ added in v1.0.0
func (alchemy *SporkAlchemy) QueryEventByBlockRange(event string, start uint64, end uint64) ([]client.BlockEvents, error)
queryEventByBlockRange
func (*SporkAlchemy) QueryLatestBlockHeight ¶ added in v1.0.0
func (alchemy *SporkAlchemy) QueryLatestBlockHeight() (uint64, error)
QueryLatestBlockHeight
func (*SporkAlchemy) String ¶ added in v1.0.0
func (alchemy *SporkAlchemy) String() string
String method return the string representation of the spork alchemy
func (*SporkAlchemy) SyncSpork ¶ added in v1.0.0
func (alchemy *SporkAlchemy) SyncSpork() error
SyncSpork with not implementation log
type SporkStore ¶
func NewSporkStore ¶ added in v1.0.0
func NewSporkStore(url string, maxQueryBlocks uint64, queryBatchSize uint64) *SporkStore
func (*SporkStore) QueryEventByBlockRange ¶
func (ss *SporkStore) QueryEventByBlockRange(event string, start uint64, end uint64) ([]client.BlockEvents, error)
func (*SporkStore) QueryLatestBlockHeight ¶
func (ss *SporkStore) QueryLatestBlockHeight() (uint64, error)
func (*SporkStore) String ¶
func (ss *SporkStore) String() string
func (*SporkStore) SyncSpork ¶
func (ss *SporkStore) SyncSpork() error
Click to show internal directories.
Click to hide internal directories.