Documentation ¶
Index ¶
- Constants
- Variables
- func IPNSKeysForID(id peer.ID) (name, ipns string)
- func MakePutRecord(sk ci.PrivKey, key string, value []byte, sign bool) (*dhtpb.Migration020RecordOldFormat, error)
- func Migration012_GetIdentityKey(repoPath, databasePassword string, testnetEnabled bool) ([]byte, error)
- func Migration012_listingHasNewFeaturesAndOldVersion(sl *pb.SignedListing) bool
- func Migration013_AddressToScript(coinType string, addr string, testmodeEnanabled bool) ([]byte, error)
- func Migration013_ChainConfigParams(testnet bool) *chaincfg.Params
- func Migration013_ScriptToAddress(coinType string, script []byte, testmodeEnanabled bool) (string, error)
- func OpenDB(repoPath string, dbPassword string, testnet bool) (*sql.DB, error)
- func RecordBlobForSig(r *dhtpb.Migration020RecordOldFormat) []byte
- type ListingData
- type Migration000
- type Migration001
- type Migration002
- type Migration003
- type Migration004
- type Migration005
- type Migration006
- type Migration006_configRecord
- type Migration006_listingDataAfterMigration
- type Migration006_listingDataBeforeMigration
- type Migration006_price
- type Migration006_thumbnail
- type Migration007
- type Migration008
- type Migration009
- type Migration009_listing
- type Migration009_listingDataAfterMigration
- type Migration009_listingDataBeforeMigration
- type Migration009_listing_listing
- type Migration009_listing_listing_metadata
- type Migration009_price
- type Migration009_thumbnail
- type Migration010
- type Migration011
- type Migration011_listing
- type Migration011_listing_listing
- type Migration012
- type Migration012_ListingData
- type Migration013
- type Migration013_TransactionRecord_afterMigration
- type Migration013_TransactionRecord_beforeMigration
- type Migration014
- type Migration015
- type Migration016
- type Migration016WalletsConfig
- type Migration017
- type Migration018
- type Migration019
- type Migration020
- type Migration021
- type Migration022
Constants ¶
const ( Migration007_casesCreateSQL = "" /* 351-byte string literal not displayed */ Migration007_purchasesCreateSQL = "" /* 293-byte string literal not displayed */ Migration007_salesCreateSQL = "" /* 306-byte string literal not displayed */ )
const ( Migration008_OrderState_PENDING = 0 Migration008_OrderState_AWAITING_PAYMENT = 1 Migration008_OrderState_DISPUTED = 10 Migration008_casesCreateSQL = "" /* 394-byte string literal not displayed */ Migration008_purchasesCreateSQL = "" /* 336-byte string literal not displayed */ Migration008_salesCreateSQL = "" /* 349-byte string literal not displayed */ )
const ( Migration009CreatePreviousCasesTable = "" /* 407-byte string literal not displayed */ Migration009CreatePreviousSalesTable = "" /* 363-byte string literal not displayed */ Migration009CreatePreviousSalesIndex = "create index index_sales on sales (paymentAddr, timestamp);" Migration009CreatePreviousPurchasesTable = "" /* 445-byte string literal not displayed */ )
Variables ¶
var ( Migration017PushToBefore = []string{ "QmY8puEnVx66uEet64gAf4VZRo7oUyMCwG6KdB9KM92EGQ", "QmPPg2qeF3n2KvTRXRZLaTwHCw8JxzF4uZK93RfMoDvf2o", } Migration017PushToAfter = []string{ "QmbwN82MVyBukT7WTdaQDppaACo62oUfma8dUa5R9nBFHm", "QmY8puEnVx66uEet64gAf4VZRo7oUyMCwG6KdB9KM92EGQ", "QmPPg2qeF3n2KvTRXRZLaTwHCw8JxzF4uZK93RfMoDvf2o", } )
var WalletCoinType wallet.CoinType
Functions ¶
func IPNSKeysForID ¶ added in v0.13.1
func IPNSKeysForID(id peer.ID) (name, ipns string)
func MakePutRecord ¶ added in v0.13.1
func MakePutRecord(sk ci.PrivKey, key string, value []byte, sign bool) (*dhtpb.Migration020RecordOldFormat, error)
MakePutRecord creates and signs a dht record for the given key/value pair
func Migration012_GetIdentityKey ¶ added in v0.12.3
func Migration012_listingHasNewFeaturesAndOldVersion ¶ added in v0.12.3
func Migration012_listingHasNewFeaturesAndOldVersion(sl *pb.SignedListing) bool
func Migration013_AddressToScript ¶ added in v0.12.4
func Migration013_ChainConfigParams ¶ added in v0.12.4
func Migration013_ScriptToAddress ¶ added in v0.12.4
func RecordBlobForSig ¶ added in v0.13.1
func RecordBlobForSig(r *dhtpb.Migration020RecordOldFormat) []byte
RecordBlobForSig returns the blob protected by the record signature
Types ¶
type ListingData ¶ added in v0.13.1
type ListingData struct { Hash string `json:"hash"` Slug string `json:"slug"` Title string `json:"title"` Categories []string `json:"categories"` NSFW bool `json:"nsfw"` ContractType string `json:"contractType"` Description string `json:"description"` Thumbnail thumbnail `json:"thumbnail"` Price price `json:"price"` ShipsTo []string `json:"shipsTo"` FreeShipping []string `json:"freeShipping"` Language string `json:"language"` AverageRating float32 `json:"averageRating"` RatingCount uint32 `json:"ratingCount"` ModeratorIDs []string `json:"moderators"` AcceptedCurrencies []string `json:"acceptedCurrencies"` CoinType string `json:"coinType"` }
type Migration000 ¶
type Migration000 struct{}
type Migration001 ¶ added in v0.9.3
type Migration001 struct{}
type Migration002 ¶ added in v0.9.3
type Migration002 struct{}
type Migration003 ¶ added in v0.9.3
type Migration003 struct{}
type Migration004 ¶ added in v0.9.4
type Migration004 struct{}
type Migration005 ¶ added in v0.11.0
type Migration005 struct{}
type Migration006 ¶ added in v0.11.1
type Migration006 struct{}
type Migration006_configRecord ¶ added in v0.12.1
type Migration006_configRecord struct {
StoreModerators []string `json:"storeModerators"`
}
type Migration006_listingDataAfterMigration ¶ added in v0.12.1
type Migration006_listingDataAfterMigration struct { Hash string `json:"hash"` Slug string `json:"slug"` Title string `json:"title"` Categories []string `json:"categories"` NSFW bool `json:"nsfw"` ContractType string `json:"contractType"` Description string `json:"description"` Thumbnail Migration006_thumbnail `json:"thumbnail"` Price Migration006_price `json:"price"` ShipsTo []string `json:"shipsTo"` FreeShipping []string `json:"freeShipping"` Language string `json:"language"` AverageRating float32 `json:"averageRating"` RatingCount uint32 `json:"ratingCount"` // Adding ModeratorIDs ModeratorIDs []string `json:"moderators"` }
type Migration006_listingDataBeforeMigration ¶ added in v0.12.1
type Migration006_listingDataBeforeMigration struct { Hash string `json:"hash"` Slug string `json:"slug"` Title string `json:"title"` Categories []string `json:"categories"` NSFW bool `json:"nsfw"` ContractType string `json:"contractType"` Description string `json:"description"` Thumbnail Migration006_thumbnail `json:"thumbnail"` Price Migration006_price `json:"price"` ShipsTo []string `json:"shipsTo"` FreeShipping []string `json:"freeShipping"` Language string `json:"language"` AverageRating float32 `json:"averageRating"` RatingCount uint32 `json:"ratingCount"` }
type Migration006_price ¶ added in v0.12.1
type Migration006_thumbnail ¶ added in v0.12.1
type Migration007 ¶ added in v0.12.1
type Migration007 struct{}
type Migration008 ¶ added in v0.12.1
type Migration008 struct{}
type Migration009 ¶ added in v0.12.1
type Migration009 struct{}
type Migration009_listing ¶ added in v0.12.1
type Migration009_listing struct {
Listing Migration009_listing_listing `json:"listing"`
}
type Migration009_listingDataAfterMigration ¶ added in v0.12.1
type Migration009_listingDataAfterMigration struct { Hash string `json:"hash"` Slug string `json:"slug"` Title string `json:"title"` Categories []string `json:"categories"` NSFW bool `json:"nsfw"` CoinType string `json:"coinType"` ContractType string `json:"contractType"` Description string `json:"description"` Thumbnail Migration009_thumbnail `json:"thumbnail"` Price Migration009_price `json:"price"` ShipsTo []string `json:"shipsTo"` FreeShipping []string `json:"freeShipping"` Language string `json:"language"` AverageRating float32 `json:"averageRating"` RatingCount uint32 `json:"ratingCount"` ModeratorIDs []string `json:"moderators"` // Adding AcceptedCurrencies AcceptedCurrencies []string `json:"acceptedCurrencies"` }
type Migration009_listingDataBeforeMigration ¶ added in v0.12.1
type Migration009_listingDataBeforeMigration struct { Hash string `json:"hash"` Slug string `json:"slug"` Title string `json:"title"` Categories []string `json:"categories"` NSFW bool `json:"nsfw"` CoinType string `json:"coinType"` ContractType string `json:"contractType"` Description string `json:"description"` Thumbnail Migration009_thumbnail `json:"thumbnail"` Price Migration009_price `json:"price"` ShipsTo []string `json:"shipsTo"` FreeShipping []string `json:"freeShipping"` Language string `json:"language"` AverageRating float32 `json:"averageRating"` RatingCount uint32 `json:"ratingCount"` ModeratorIDs []string `json:"moderators"` }
type Migration009_listing_listing ¶ added in v0.12.1
type Migration009_listing_listing struct {
Metadata Migration009_listing_listing_metadata `json:"metadata"`
}
type Migration009_listing_listing_metadata ¶ added in v0.12.1
type Migration009_listing_listing_metadata struct {
AcceptedCurrencies []string `json:"acceptedCurrencies"`
}
type Migration009_price ¶ added in v0.12.1
type Migration009_thumbnail ¶ added in v0.12.1
type Migration010 ¶ added in v0.12.1
type Migration010 struct{}
type Migration011 ¶ added in v0.12.3
type Migration011 struct{}
type Migration011_listing ¶ added in v0.12.3
type Migration011_listing struct {
Listing Migration011_listing_listing `json:"listing"`
}
type Migration011_listing_listing ¶ added in v0.12.3
type Migration011_listing_listing struct {
ModeratorIDs []string `json:"moderators"`
}
type Migration012 ¶ added in v0.12.3
type Migration012 struct{}
type Migration012_ListingData ¶ added in v0.12.3
type Migration012_ListingData struct { Hash string `json:"hash"` Slug string `json:"slug"` Title string `json:"title"` Categories []string `json:"categories"` NSFW bool `json:"nsfw"` ContractType string `json:"contractType"` Description string `json:"description"` Thumbnail struct { Tiny string `json:"tiny"` Small string `json:"small"` Medium string `json:"medium"` } `json:"thumbnail"` Price struct { CurrencyCode string `json:"currencyCode"` Amount uint64 `json:"amount"` Modifier float32 `json:"modifier"` } `json:"price"` ShipsTo []string `json:"shipsTo"` FreeShipping []string `json:"freeShipping"` Language string `json:"language"` AverageRating float32 `json:"averageRating"` RatingCount uint32 `json:"ratingCount"` ModeratorIDs []string `json:"moderators"` AcceptedCurrencies []string `json:"acceptedCurrencies"` CoinType string `json:"coinType"` }
type Migration013 ¶ added in v0.12.4
type Migration013 struct{}
type Migration013_TransactionRecord_afterMigration ¶ added in v0.12.4
type Migration013_TransactionRecord_beforeMigration ¶ added in v0.12.4
type Migration014 ¶ added in v0.12.4
type Migration014 struct{}
type Migration015 ¶ added in v0.13.0
type Migration015 struct{}
type Migration016 ¶ added in v0.13.0
type Migration016 struct{}
type Migration016WalletsConfig ¶ added in v0.13.0
type Migration016WalletsConfig struct { BTC *migration016CoinConfig `json:"BTC"` BCH *migration016CoinConfig `json:"BCH"` LTC *migration016CoinConfig `json:"LTC"` ZEC *migration016CoinConfig `json:"ZEC"` ETH *migration016CoinConfig `json:"ETH"` }
type Migration017 ¶ added in v0.13.0
type Migration017 struct{}
type Migration018 ¶ added in v0.13.1
type Migration018 struct{}
Migration018 migrates the config file to be compatible with the latest version of IPFS. We've also removed the resolvers config as we aren't using that any more and added an IpnsExtra config which contains fields we previously patched into the IPNS config.
type Migration019 ¶ added in v0.13.1
type Migration019 struct{}
Migration019 migrates the listing index file to use the new style (Qm) hashes for listings rather than the old CID (z) style hashes.
type Migration020 ¶ added in v0.13.1
type Migration020 struct{}
Migration020 runs an IPFS migration which migrates the IPNS records in the datastore.
type Migration021 ¶ added in v0.13.3
type Migration021 struct{}
Migration021 migrates the config file to set the Swarm: EnableAutoRelay option to true.
type Migration022 ¶ added in v0.13.3
type Migration022 struct{}
Migration022 migrates the config file to set the IPNSExtra: APIRouter option in the config file. Also deletes IPNSExtra: FallbackAPI if it exists.
Source Files ¶
- Migration000.go
- Migration001.go
- Migration002.go
- Migration003.go
- Migration004.go
- Migration005.go
- Migration006.go
- Migration007.go
- Migration008.go
- Migration009.go
- Migration010.go
- Migration011.go
- Migration012.go
- Migration013.go
- Migration014.go
- Migration015.go
- Migration016.go
- Migration017.go
- Migration018.go
- Migration019.go
- Migration020.go
- Migration021.go
- Migration022.go
- migration_helpers.go