-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
44 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,21 @@ | ||
package model | ||
|
||
type GlobalParamsDocument struct { | ||
Type string `bson:"type"` | ||
Version uint32 `bson:"version"` | ||
Params interface{} `bson:"params"` | ||
import "github.com/babylonlabs-io/babylon-staking-indexer/internal/clients/bbnclient" | ||
|
||
// Base document for common fields | ||
type BaseParamsDocument struct { | ||
Type string `bson:"type"` | ||
Version uint32 `bson:"version"` | ||
} | ||
|
||
// Specific document for staking params | ||
type StakingParamsDocument struct { | ||
BaseParamsDocument `bson:",inline"` | ||
Params *bbnclient.StakingParams `bson:"params"` | ||
} | ||
|
||
// Specific document for checkpoint params | ||
type CheckpointParamsDocument struct { | ||
BaseParamsDocument `bson:",inline"` | ||
Params *bbnclient.CheckpointParams `bson:"params"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters