postgres

package
v2.0.4+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionHolder

type ConnectionHolder struct {
	// contains filtered or unexported fields
}

func NewConnectionHolder

func NewConnectionHolder(cfg *configuration.Configuration) *ConnectionHolder

func (*ConnectionHolder) Close

func (h *ConnectionHolder) Close() error

func (*ConnectionHolder) DB

func (h *ConnectionHolder) DB() *pg.DB

type DepositSchema

type DepositSchema struct {
	EthHash         string `sql:",pk"`
	DepositRef      []byte `sql:",notnull"`
	MemberRef       []byte `sql:",notnull"`
	TransferDate    int64  `sql:",notnull"`
	HoldReleaseDate int64  `sql:",notnull"`
	Amount          string `sql:",notnull"`
	Balance         string `sql:",notnull"`
	DepositState    []byte `sql:",notnull"`
	// contains filtered or unexported fields
}

type DepositStorage

type DepositStorage struct {
	// contains filtered or unexported fields
}

func NewDepositStorage

func NewDepositStorage(obs *observability.Observability, db orm.DB) *DepositStorage

func (*DepositStorage) Insert

func (s *DepositStorage) Insert(model *observer.Deposit) error

func (*DepositStorage) Update

func (s *DepositStorage) Update(model *observer.DepositUpdate) error

type ExtendedTransferSchema

type ExtendedTransferSchema struct {
	ID            uint                `sql:",pk_id"`
	TxID          []byte              `sql:",unique"`
	Amount        string              `sql:",notnull"`
	Fee           string              `sql:",notnull"`
	TransferDate  int64               `sql:",notnull"`
	PulseNum      insolar.PulseNumber `sql:",notnull"`
	Status        string              `sql:",notnull"`
	MemberFromRef []byte              `sql:",notnull"`
	MemberToRef   []byte              `sql:",notnull"`
	EthHash       string              `sql:",notnull"`

	TransferRequestMember  []byte
	TransferRequestWallet  []byte
	TransferRequestAccount []byte
	AcceptRequestMember    []byte
	AcceptRequestWallet    []byte
	AcceptRequestAccount   []byte
	CalcFeeRequest         []byte
	FeeMemberRequest       []byte
	CostCenterRef          []byte
	FeeMemberRef           []byte
	// contains filtered or unexported fields
}

type ExtendedTransferStorage

type ExtendedTransferStorage struct {
	// contains filtered or unexported fields
}

func NewExtendedTransferStorage

func NewExtendedTransferStorage(obs *observability.Observability, db orm.DB) *ExtendedTransferStorage

func (*ExtendedTransferStorage) Insert

type MemberSchema

type MemberSchema struct {
	MemberRef        []byte `sql:",pk"`
	Balance          string `sql:",notnull"`
	MigrationAddress string
	WalletRef        []byte
	AccountState     []byte `sql:",notnull"`
	Status           string
	// contains filtered or unexported fields
}

type MemberStorage

type MemberStorage struct {
	// contains filtered or unexported fields
}

func NewMemberStorage

func NewMemberStorage(obs *observability.Observability, db orm.DB) *MemberStorage

func (*MemberStorage) Insert

func (s *MemberStorage) Insert(model *observer.Member) error

func (*MemberStorage) Update

func (s *MemberStorage) Update(model *observer.Balance) error

type MigrationAddressSchema

type MigrationAddressSchema struct {
	Addr      string `sql:",pk"`
	Timestamp int64  `sql:",notnull"`
	Wasted    bool
	// contains filtered or unexported fields
}

type MigrationAddressStorage

type MigrationAddressStorage struct {
	// contains filtered or unexported fields
}

func NewMigrationAddressStorage

func NewMigrationAddressStorage(obs *observability.Observability, db orm.DB) *MigrationAddressStorage

func (*MigrationAddressStorage) Insert

func (*MigrationAddressStorage) Update

func (s *MigrationAddressStorage) Update(model *observer.Wasting) error

type ObjectSchema

type ObjectSchema struct {
	ObjectID  string `sql:"object_id,pk"`
	Domain    string
	Request   string
	Memory    string
	Image     string
	Parent    string
	PrevState string
	Type      string
	// contains filtered or unexported fields
}

type ObjectStorage

type ObjectStorage struct {
	// contains filtered or unexported fields
}

func NewObjectStorage

func NewObjectStorage(obs *observability.Observability, db orm.DB) *ObjectStorage

func (*ObjectStorage) Insert

func (s *ObjectStorage) Insert(model interface{}) error

type PulseSchema

type PulseSchema struct {
	Pulse     uint32 `sql:",pk"`
	PulseDate int64  `sql:",notnull"`
	Entropy   []byte `sql:",notnull"`
	// contains filtered or unexported fields
}

type PulseStorage

type PulseStorage struct {
	// contains filtered or unexported fields
}

func (*PulseStorage) Insert

func (s *PulseStorage) Insert(model *observer.Pulse) error

func (*PulseStorage) Last

func (s *PulseStorage) Last() *observer.Pulse

type RecordSchema

type RecordSchema struct {
	Key   []byte `sql:",pk"`
	Value []byte
	Pulse uint32 `sql:",notnull"`
	// contains filtered or unexported fields
}

type RecordStorage

type RecordStorage struct {
	// contains filtered or unexported fields
}

func (*RecordStorage) Count

func (s *RecordStorage) Count(by insolar.PulseNumber) uint32

func (*RecordStorage) Insert

func (s *RecordStorage) Insert(model *observer.Record) error

func (*RecordStorage) Last

func (s *RecordStorage) Last() *observer.Record

type RequestSchema

type RequestSchema struct {
	RequestID  string `sql:"request_id,pk"`
	Caller     string
	ReturnMode string
	Base       string
	Object     string
	Prototype  string
	Method     string
	Arguments  string
	Reason     string
	// contains filtered or unexported fields
}

type RequestStorage

type RequestStorage struct {
	// contains filtered or unexported fields
}

func NewRequestStorage

func NewRequestStorage(obs *observability.Observability, db orm.DB) *RequestStorage

func (*RequestStorage) Insert

func (s *RequestStorage) Insert(model *observer.Request) error

type ResultSchema

type ResultSchema struct {
	ResultID string `sql:"result_id,pk"`
	Request  string
	Payload  string
	// contains filtered or unexported fields
}

type ResultStorage

type ResultStorage struct {
	// contains filtered or unexported fields
}

func NewResultStorage

func NewResultStorage(obs *observability.Observability, db orm.DB) *ResultStorage

func (*ResultStorage) Insert

func (s *ResultStorage) Insert(model *observer.Result) error

type StatisticSchema

type StatisticSchema struct {
	Pulse              insolar.PulseNumber `sql:"pulse_num, pk"`
	Transfers          int                 `sql:"count_transactions, notnull"`
	TotalTransfers     int                 `sql:"total_transactions, notnull"`
	TotalMembers       int                 `sql:"total_accounts, notnull"`
	MaxTransfers       int                 `sql:"max_transactions, notnull"`
	LastMonthTransfers int                 `sql:"last_month_transactions, notnull"`
	Nodes              int                 `sql:",notnull"`
	// contains filtered or unexported fields
}

type StatisticStorage

type StatisticStorage struct {
	// contains filtered or unexported fields
}

func (*StatisticStorage) Insert

func (s *StatisticStorage) Insert(model *observer.Statistic) error

func (*StatisticStorage) Last

func (s *StatisticStorage) Last() *observer.Statistic

type TransferSchema

type TransferSchema struct {
	ID            uint                `sql:",pk_id"`
	TxID          []byte              `sql:",unique"`
	Amount        string              `sql:",notnull"`
	Fee           string              `sql:",notnull"`
	TransferDate  int64               `sql:",notnull"`
	PulseNum      insolar.PulseNumber `sql:",notnull"`
	Status        string              `sql:",notnull"`
	MemberFromRef []byte              `sql:",notnull"`
	MemberToRef   []byte              `sql:",notnull"`
	EthHash       string              `sql:",notnull"`
	// contains filtered or unexported fields
}

type TransferStorage

type TransferStorage struct {
	// contains filtered or unexported fields
}

func NewTransferStorage

func NewTransferStorage(obs *observability.Observability, db orm.DB) *TransferStorage

func (*TransferStorage) Insert

func (s *TransferStorage) Insert(model *observer.DepositTransfer) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL