code.vegaprotocol.io/vega@v0.79.0/datanode/service/stubs.go (about)

     1  // Copyright (C) 2023 Gobalsky Labs Limited
     2  //
     3  // This program is free software: you can redistribute it and/or modify
     4  // it under the terms of the GNU Affero General Public License as
     5  // published by the Free Software Foundation, either version 3 of the
     6  // License, or (at your option) any later version.
     7  //
     8  // This program is distributed in the hope that it will be useful,
     9  // but WITHOUT ANY WARRANTY; without even the implied warranty of
    10  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    11  // GNU Affero General Public License for more details.
    12  //
    13  // You should have received a copy of the GNU Affero General Public License
    14  // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    15  
    16  package service
    17  
    18  import (
    19  	"code.vegaprotocol.io/vega/datanode/sqlstore"
    20  	"code.vegaprotocol.io/vega/datanode/sqlsubscribers"
    21  )
    22  
    23  type (
    24  	Asset               struct{ *sqlstore.Assets }
    25  	Block               struct{ *sqlstore.Blocks }
    26  	Party               struct{ *sqlstore.Parties }
    27  	PartyActivityStreak struct{ *sqlstore.PartyActivityStreaks }
    28  	FundingPayment      struct{ *sqlstore.FundingPayments }
    29  	NetworkLimits       struct{ *sqlstore.NetworkLimits }
    30  	Epoch               struct{ *sqlstore.Epochs }
    31  	Deposit             struct{ *sqlstore.Deposits }
    32  	Withdrawal          struct{ *sqlstore.Withdrawals }
    33  	RiskFactor          struct{ *sqlstore.RiskFactors }
    34  	NetworkParameter    struct{ *sqlstore.NetworkParameters }
    35  	Checkpoint          struct{ *sqlstore.Checkpoints }
    36  	OracleSpec          struct{ *sqlstore.OracleSpec }
    37  	OracleData          struct{ *sqlstore.OracleData }
    38  	LiquidityProvision  struct{ *sqlstore.LiquidityProvision }
    39  	Transfer            struct{ *sqlstore.Transfers }
    40  	StakeLinking        struct{ *sqlstore.StakeLinking }
    41  	Notary              struct{ *sqlstore.Notary }
    42  	MultiSig            struct {
    43  		*sqlstore.ERC20MultiSigSignerEvent
    44  	}
    45  	FundingPeriods         struct{ *sqlstore.FundingPeriods }
    46  	ReferralPrograms       struct{ *sqlstore.ReferralPrograms }
    47  	ReferralSets           struct{ *sqlstore.ReferralSets }
    48  	Teams                  struct{ *sqlstore.Teams }
    49  	VestingStats           struct{ *sqlstore.VestingStats }
    50  	VolumeDiscountStats    struct{ *sqlstore.VolumeDiscountStats }
    51  	VolumeRebateStats      struct{ *sqlstore.VolumeRebateStats }
    52  	FeesStats              struct{ *sqlstore.FeesStats }
    53  	VolumeDiscountPrograms struct {
    54  		*sqlstore.VolumeDiscountPrograms
    55  	}
    56  	VolumeRebatePrograms struct {
    57  		*sqlstore.VolumeRebatePrograms
    58  	}
    59  	PaidLiquidityFeesStats struct {
    60  		*sqlstore.PaidLiquidityFeesStats
    61  	}
    62  	PartyLockedBalances struct {
    63  		*sqlstore.PartyLockedBalance
    64  	}
    65  	PartyVestingBalances struct {
    66  		*sqlstore.PartyVestingBalance
    67  	}
    68  	TransactionResults struct {
    69  		*sqlsubscribers.TransactionResults
    70  	}
    71  	Games                        struct{ *sqlstore.Games }
    72  	MarginModes                  struct{ *sqlstore.MarginModes }
    73  	TimeWeightedNotionalPosition struct {
    74  		*sqlstore.TimeWeightedNotionalPosition
    75  	}
    76  )
    77  
    78  type (
    79  	KeyRotations struct{ *sqlstore.KeyRotations }
    80  	Node         struct{ *sqlstore.Node }
    81  )
    82  
    83  func NewAsset(store *sqlstore.Assets) *Asset {
    84  	return &Asset{Assets: store}
    85  }
    86  
    87  func NewBlock(store *sqlstore.Blocks) *Block {
    88  	return &Block{Blocks: store}
    89  }
    90  
    91  func NewParty(store *sqlstore.Parties) *Party {
    92  	return &Party{Parties: store}
    93  }
    94  
    95  func NewPartyActivityStreak(store *sqlstore.PartyActivityStreaks) *PartyActivityStreak {
    96  	return &PartyActivityStreak{PartyActivityStreaks: store}
    97  }
    98  
    99  func NewFundingPayment(store *sqlstore.FundingPayments) *FundingPayment {
   100  	return &FundingPayment{FundingPayments: store}
   101  }
   102  
   103  func NewNetworkLimits(store *sqlstore.NetworkLimits) *NetworkLimits {
   104  	return &NetworkLimits{NetworkLimits: store}
   105  }
   106  
   107  func NewEpoch(store *sqlstore.Epochs) *Epoch {
   108  	return &Epoch{Epochs: store}
   109  }
   110  
   111  func NewDeposit(store *sqlstore.Deposits) *Deposit {
   112  	return &Deposit{Deposits: store}
   113  }
   114  
   115  func NewWithdrawal(store *sqlstore.Withdrawals) *Withdrawal {
   116  	return &Withdrawal{Withdrawals: store}
   117  }
   118  
   119  func NewRiskFactor(store *sqlstore.RiskFactors) *RiskFactor {
   120  	return &RiskFactor{RiskFactors: store}
   121  }
   122  
   123  func NewNetworkParameter(store *sqlstore.NetworkParameters) *NetworkParameter {
   124  	return &NetworkParameter{NetworkParameters: store}
   125  }
   126  
   127  func NewCheckpoint(store *sqlstore.Checkpoints) *Checkpoint {
   128  	return &Checkpoint{Checkpoints: store}
   129  }
   130  
   131  func NewOracleSpec(store *sqlstore.OracleSpec) *OracleSpec {
   132  	return &OracleSpec{OracleSpec: store}
   133  }
   134  
   135  func NewOracleData(store *sqlstore.OracleData) *OracleData {
   136  	return &OracleData{OracleData: store}
   137  }
   138  
   139  func NewLiquidityProvision(store *sqlstore.LiquidityProvision) *LiquidityProvision {
   140  	return &LiquidityProvision{LiquidityProvision: store}
   141  }
   142  
   143  func NewTransfer(store *sqlstore.Transfers) *Transfer {
   144  	return &Transfer{Transfers: store}
   145  }
   146  
   147  func NewStakeLinking(store *sqlstore.StakeLinking) *StakeLinking {
   148  	return &StakeLinking{StakeLinking: store}
   149  }
   150  
   151  func NewNotary(store *sqlstore.Notary) *Notary {
   152  	return &Notary{Notary: store}
   153  }
   154  
   155  func NewMultiSig(store *sqlstore.ERC20MultiSigSignerEvent) *MultiSig {
   156  	return &MultiSig{ERC20MultiSigSignerEvent: store}
   157  }
   158  
   159  func NewKeyRotations(store *sqlstore.KeyRotations) *KeyRotations {
   160  	return &KeyRotations{KeyRotations: store}
   161  }
   162  
   163  func NewNode(store *sqlstore.Node) *Node {
   164  	return &Node{Node: store}
   165  }
   166  
   167  func NewFundingPeriods(store *sqlstore.FundingPeriods) *FundingPeriods {
   168  	return &FundingPeriods{FundingPeriods: store}
   169  }
   170  
   171  func NewReferralPrograms(store *sqlstore.ReferralPrograms) *ReferralPrograms {
   172  	return &ReferralPrograms{ReferralPrograms: store}
   173  }
   174  
   175  func NewReferralSets(store *sqlstore.ReferralSets) *ReferralSets {
   176  	return &ReferralSets{ReferralSets: store}
   177  }
   178  
   179  func NewTeams(store *sqlstore.Teams) *Teams {
   180  	return &Teams{Teams: store}
   181  }
   182  
   183  func NewVestingStats(store *sqlstore.VestingStats) *VestingStats {
   184  	return &VestingStats{VestingStats: store}
   185  }
   186  
   187  func NewVolumeDiscountStats(store *sqlstore.VolumeDiscountStats) *VolumeDiscountStats {
   188  	return &VolumeDiscountStats{VolumeDiscountStats: store}
   189  }
   190  
   191  func NewVolumeRebateStats(store *sqlstore.VolumeRebateStats) *VolumeRebateStats {
   192  	return &VolumeRebateStats{VolumeRebateStats: store}
   193  }
   194  
   195  func NewFeesStats(store *sqlstore.FeesStats) *FeesStats {
   196  	return &FeesStats{FeesStats: store}
   197  }
   198  
   199  func NewVolumeDiscountPrograms(store *sqlstore.VolumeDiscountPrograms) *VolumeDiscountPrograms {
   200  	return &VolumeDiscountPrograms{VolumeDiscountPrograms: store}
   201  }
   202  
   203  func NewVolumeRebatePrograms(store *sqlstore.VolumeRebatePrograms) *VolumeRebatePrograms {
   204  	return &VolumeRebatePrograms{VolumeRebatePrograms: store}
   205  }
   206  
   207  func NewPaidLiquidityFeesStats(store *sqlstore.PaidLiquidityFeesStats) *PaidLiquidityFeesStats {
   208  	return &PaidLiquidityFeesStats{PaidLiquidityFeesStats: store}
   209  }
   210  
   211  func NewPartyLockedBalances(store *sqlstore.PartyLockedBalance) *PartyLockedBalances {
   212  	return &PartyLockedBalances{PartyLockedBalance: store}
   213  }
   214  
   215  func NewPartyVestingBalances(store *sqlstore.PartyVestingBalance) *PartyVestingBalances {
   216  	return &PartyVestingBalances{PartyVestingBalance: store}
   217  }
   218  
   219  func NewTransactionResults(subscriber *sqlsubscribers.TransactionResults) *TransactionResults {
   220  	return &TransactionResults{TransactionResults: subscriber}
   221  }
   222  
   223  func NewGames(store *sqlstore.Games) *Games {
   224  	return &Games{Games: store}
   225  }
   226  
   227  func NewMarginModes(store *sqlstore.MarginModes) *MarginModes {
   228  	return &MarginModes{MarginModes: store}
   229  }
   230  
   231  func NewTimeWeightedNotionalPosition(store *sqlstore.TimeWeightedNotionalPosition) *TimeWeightedNotionalPosition {
   232  	return &TimeWeightedNotionalPosition{TimeWeightedNotionalPosition: store}
   233  }
   234  
   235  func NewAMMPools(store *sqlstore.AMMPools) *AMMPools {
   236  	return &AMMPools{AMMPools: store}
   237  }