Documentation ¶
Index ¶
- type DataSource
- type SourceOption
- func WithContext(ctx context.Context) SourceOption
- func WithDataStore(cfg data_store.DataStoreConfig) SourceOption
- func WithMongoDBClient(dbConn *mongo.Client) SourceOption
- func WithMongoDBConfig(cfg database.DBConnectionParams) SourceOption
- func WithNodeClient(node interface{}) SourceOption
- func WithNodeWSClient(node interface{}) SourceOption
- func WithPostgresDB(dbConn *gorm.DB) SourceOption
- func WithRetryDelay(delay time.Duration) SourceOption
- func WithRosettaClient(client *client.APIClient) SourceOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataSource ¶
type DataSource struct { // data sources DatabasePostgres *gorm.DB DatabaseMongoClient *mongo.Client DatabaseMongoCfg database.DBConnectionParams RosettaClient *client.APIClient NodeClient interface{} NodeWsClient interface{} DataStore data_store.DataStoreClient // common Ctx context.Context RetryDelay time.Duration }
func NewDataSource ¶
func NewDataSource(opts ...SourceOption) DataSource
type SourceOption ¶
type SourceOption func(*DataSource)
func WithContext ¶
func WithContext(ctx context.Context) SourceOption
func WithDataStore ¶
func WithDataStore(cfg data_store.DataStoreConfig) SourceOption
func WithMongoDBClient ¶
func WithMongoDBClient(dbConn *mongo.Client) SourceOption
func WithMongoDBConfig ¶
func WithMongoDBConfig(cfg database.DBConnectionParams) SourceOption
func WithNodeClient ¶
func WithNodeClient(node interface{}) SourceOption
func WithNodeWSClient ¶ added in v1.0.3
func WithNodeWSClient(node interface{}) SourceOption
func WithPostgresDB ¶
func WithPostgresDB(dbConn *gorm.DB) SourceOption
func WithRetryDelay ¶
func WithRetryDelay(delay time.Duration) SourceOption
func WithRosettaClient ¶
func WithRosettaClient(client *client.APIClient) SourceOption
Click to show internal directories.
Click to hide internal directories.