Documentation ¶
Index ¶
- func AddArchiveFlags(objectName string, flags *pflag.FlagSet)
- func AddBucketFlags(objectName string, flags *pflag.FlagSet)
- func AddCloudStorageFlags(flags *pflag.FlagSet)
- func AddCommonFlags(flags *pflag.FlagSet)
- func AddCoreFlags(flags *pflag.FlagSet, defaultFolder string)
- func AddExportTypeFlags(flags *pflag.FlagSet)
- func AddLPOperations(txMeta []xdr.OperationMeta, AssetA, AssetB xdr.Asset) []xdr.OperationMeta
- func ConvertStroopValueToReal(input xdr.Int64) float64
- func CreateBackend(start, end uint32, archiveURLs []string) (historyArchiveBackend, error)
- func CreateHistoryArchiveClient(archiveURLS []string) (historyarchive.ArchiveInterface, error)
- func CreateSampleResultMeta(successful bool, subOperationCount int) xdr.TransactionResultMeta
- func CreateSampleResultPair(successful bool, subOperationCount int) xdr.TransactionResultPair
- func CreateSampleTx(sequence int64, operationCount int) xdr.TransactionEnvelope
- func CreateSampleTxMeta(subOperationCount int, AssetA, AssetB xdr.Asset) *xdr.TransactionMetaV1
- func ExtractEntryFromChange(change ingest.Change) (xdr.LedgerEntry, xdr.LedgerEntryChangeType, bool, error)
- func ExtractLedgerCloseTime(ledger xdr.LedgerHeaderHistoryEntry) (time.Time, error)
- func GetAccountAddressFromMuxedAccount(account xdr.MuxedAccount) (string, error)
- func GetCheckpointNum(seq, maxSeq uint32) (uint32, error)
- func GetCloseTime(lcm xdr.LedgerCloseMeta) (time.Time, error)
- func GetLatestLedgerSequence(archiveURLs []string) (uint32, error)
- func GetMostRecentCheckpoint(seq uint32) uint32
- func HashToHexString(inputHash xdr.Hash) string
- func LedgerEntryToLedgerKeyHash(ledgerEntry xdr.LedgerEntry) string
- func MustArchiveFlags(flags *pflag.FlagSet, logger *EtlLogger) (startNum uint32, path string, limit int64)
- func MustBucketFlags(flags *pflag.FlagSet, logger *EtlLogger) (path string)
- func MustCloudStorageFlags(flags *pflag.FlagSet, logger *EtlLogger) (bucket, credentials, provider string)
- func MustCommonFlags(flags *pflag.FlagSet, logger *EtlLogger) (endNum uint32, strictExport, isTest bool, isFuture bool, ...)
- func MustCoreFlags(flags *pflag.FlagSet, logger *EtlLogger) (execPath, configPath string, startNum, batchSize uint32, path string)
- func MustExportTypeFlags(flags *pflag.FlagSet, logger *EtlLogger) map[string]bool
- func PanicOnError(err error)
- func TimePointToUTCTimeStamp(providedTime xdr.TimePoint) (time.Time, error)
- func ValidateLedgerRange(start, end, latestNum uint32) error
- type CaptiveCore
- type EnvironmentDetails
- type EtlLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddArchiveFlags ¶
AddArchiveFlags adds the history archive specific flags: start-ledger, output, and limit
func AddBucketFlags ¶
AddBucketFlags adds the bucket list specifc flags: output
func AddCloudStorageFlags ¶
AddCloudStorageFlags adds the cloud storage releated flags: cloud-storage-bucket, cloud-credentials
func AddCommonFlags ¶
AddCommonFlags adds the flags common to all commands: end-ledger, stdout, and strict-export
func AddCoreFlags ¶
AddCoreFlags adds the captive core specific flags: core-executable, core-config, batch-size, and output flags
func AddExportTypeFlags ¶
AddExportTypeFlags adds the captive core specifc flags: export-{type} flags
func AddLPOperations ¶
func AddLPOperations(txMeta []xdr.OperationMeta, AssetA, AssetB xdr.Asset) []xdr.OperationMeta
func ConvertStroopValueToReal ¶
ConvertStroopValueToReal converts a value in stroops, the smallest amount unit, into real units
func CreateBackend ¶
func CreateHistoryArchiveClient ¶
func CreateHistoryArchiveClient(archiveURLS []string) (historyarchive.ArchiveInterface, error)
func CreateSampleResultMeta ¶
func CreateSampleResultMeta(successful bool, subOperationCount int) xdr.TransactionResultMeta
CreateSampleResultMeta creates Transaction results with the desired success flag and number of sub operation results
func CreateSampleResultPair ¶
func CreateSampleResultPair(successful bool, subOperationCount int) xdr.TransactionResultPair
func CreateSampleTx ¶
func CreateSampleTx(sequence int64, operationCount int) xdr.TransactionEnvelope
CreateSampleTx creates a transaction with a single operation (BumpSequence), the min base fee, and infinite timebounds
func CreateSampleTxMeta ¶
func CreateSampleTxMeta(subOperationCount int, AssetA, AssetB xdr.Asset) *xdr.TransactionMetaV1
func ExtractEntryFromChange ¶
func ExtractEntryFromChange(change ingest.Change) (xdr.LedgerEntry, xdr.LedgerEntryChangeType, bool, error)
ExtractEntryFromChange gets the most recent state of an entry from an ingestio change, as well as if the entry was deleted
func ExtractLedgerCloseTime ¶
func ExtractLedgerCloseTime(ledger xdr.LedgerHeaderHistoryEntry) (time.Time, error)
ExtractLedgerCloseTime gets the close time of the provided ledger
func GetAccountAddressFromMuxedAccount ¶
func GetAccountAddressFromMuxedAccount(account xdr.MuxedAccount) (string, error)
GetAccountAddressFromMuxedAccount takes in a muxed account and returns the address of the account
func GetCheckpointNum ¶
GetCheckpointNum gets the ledger sequence number of the checkpoint containing the provided ledger. If the checkpoint does not exist, an error is returned
func GetCloseTime ¶
func GetCloseTime(lcm xdr.LedgerCloseMeta) (time.Time, error)
func GetLatestLedgerSequence ¶
GetLatestLedgerSequence returns the latest ledger sequence
func GetMostRecentCheckpoint ¶
GetMostRecentCheckpoint returns the most recent checkpoint before the provided ledger
func HashToHexString ¶
HashToHexString is utility function that converts and xdr.Hash type to a hex string
func LedgerEntryToLedgerKeyHash ¶
func LedgerEntryToLedgerKeyHash(ledgerEntry xdr.LedgerEntry) string
func MustArchiveFlags ¶
func MustArchiveFlags(flags *pflag.FlagSet, logger *EtlLogger) (startNum uint32, path string, limit int64)
MustArchiveFlags gets the values of the the history archive specific flags: start-ledger, output, and limit
func MustBucketFlags ¶
MustBucketFlags gets the values of the bucket list specific flags: output
func MustCloudStorageFlags ¶
func MustCloudStorageFlags(flags *pflag.FlagSet, logger *EtlLogger) (bucket, credentials, provider string)
MustCloudStorageFlags gets the values of the bucket list specific flags: cloud-storage-bucket, cloud-credentials
func MustCommonFlags ¶
func MustCommonFlags(flags *pflag.FlagSet, logger *EtlLogger) (endNum uint32, strictExport, isTest bool, isFuture bool, extra map[string]string)
MustCommonFlags gets the values of the the flags common to all commands: end-ledger and strict-export. If any do not exist, it stops the program fatally using the logger
func MustCoreFlags ¶
func MustCoreFlags(flags *pflag.FlagSet, logger *EtlLogger) (execPath, configPath string, startNum, batchSize uint32, path string)
MustCoreFlags gets the values for the core-executable, core-config, start ledger batch-size, and output flags. If any do not exist, it stops the program fatally using the logger
func MustExportTypeFlags ¶
MustExportTypeFlags gets the values for the export-accounts, export-offers, and export-trustlines flags. If any do not exist, it stops the program fatally using the logger func MustExportTypeFlags(flags *pflag.FlagSet, logger *EtlLogger) (exportAccounts, exportOffers, exportTrustlines, exportPools, exportBalances, exportContractCode, exportContractData, exportConfigSettings, exportTtl bool) {
func PanicOnError ¶
func PanicOnError(err error)
PanicOnError is a function that panics if the provided error is not nil
func TimePointToUTCTimeStamp ¶
TimePointToUTCTimeStamp takes in an xdr TimePoint and converts it to a time.Time struct in UTC. It returns an error for negative timepoints
func ValidateLedgerRange ¶
ValidateLedgerRange validates the given ledger range
Types ¶
type CaptiveCore ¶
type CaptiveCore interface {
CreateCaptiveCoreBackend() (ledgerbackend.CaptiveStellarCore, error)
}
type EnvironmentDetails ¶
type EnvironmentDetails struct { NetworkPassphrase string ArchiveURLs []string BinaryPath string CoreConfig string }
func GetEnvironmentDetails ¶
func GetEnvironmentDetails(isTest bool, isFuture bool) (details EnvironmentDetails)
GetPassphrase returns the correct Network Passphrase based on env preference
func (EnvironmentDetails) CreateCaptiveCoreBackend ¶
func (e EnvironmentDetails) CreateCaptiveCoreBackend() (*ledgerbackend.CaptiveStellarCore, error)
func (EnvironmentDetails) GetUnboundedLedgerCloseMeta ¶
func (e EnvironmentDetails) GetUnboundedLedgerCloseMeta(end uint32) (xdr.LedgerCloseMeta, error)