migrations

package
v0.0.0-...-c57a2f4 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2019 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
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 */
)
View Source
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 */
)
View Source
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

View Source
var (
	Migration017PushToBefore = []string{
		"QmY8puEnVx66uEet64gAf4VZRo7oUyMCwG6KdB9KM92EGQ",
		"QmPPg2qeF3n2KvTRXRZLaTwHCw8JxzF4uZK93RfMoDvf2o",
	}

	Migration017PushToAfter = []string{
		"QmbwN82MVyBukT7WTdaQDppaACo62oUfma8dUa5R9nBFHm",
		"QmY8puEnVx66uEet64gAf4VZRo7oUyMCwG6KdB9KM92EGQ",
		"QmPPg2qeF3n2KvTRXRZLaTwHCw8JxzF4uZK93RfMoDvf2o",
	}
)
View Source
var WalletCoinType wallet.CoinType

Functions

func Migration012_GetIdentityKey

func Migration012_GetIdentityKey(repoPath, databasePassword string, testnetEnabled bool) ([]byte, error)

func Migration012_listingHasNewFeaturesAndOldVersion

func Migration012_listingHasNewFeaturesAndOldVersion(sl *pb.SignedListing) bool

func Migration013_AddressToScript

func Migration013_AddressToScript(coinType string, addr string, testmodeEnanabled bool) ([]byte, error)

func Migration013_ChainConfigParams

func Migration013_ChainConfigParams(testnet bool) *chaincfg.Params

func Migration013_ScriptToAddress

func Migration013_ScriptToAddress(coinType string, script []byte, testmodeEnanabled bool) (string, error)

func OpenDB

func OpenDB(repoPath string, dbPassword string, testnet bool) (*sql.DB, error)

Types

type Migration000

type Migration000 struct{}

func (Migration000) Down

func (Migration000) Down(repoPath string, dbPassword string, testnet bool) error

func (Migration000) Up

func (Migration000) Up(repoPath string, dbPassword string, testnet bool) error

type Migration001

type Migration001 struct{}

func (Migration001) Down

func (Migration001) Down(repoPath string, dbPassword string, testnet bool) error

func (Migration001) Up

func (Migration001) Up(repoPath string, dbPassword string, testnet bool) error

type Migration002

type Migration002 struct{}

func (Migration002) Down

func (Migration002) Down(repoPath string, dbPassword string, testnet bool) error

func (Migration002) Up

func (Migration002) Up(repoPath string, dbPassword string, testnet bool) error

type Migration003

type Migration003 struct{}

func (Migration003) Down

func (Migration003) Down(repoPath string, dbPassword string, testnet bool) error

func (Migration003) Up

func (Migration003) Up(repoPath string, dbPassword string, testnet bool) error

type Migration004

type Migration004 struct{}

func (Migration004) Down

func (Migration004) Down(repoPath string, dbPassword string, testnet bool) error

func (Migration004) Up

func (Migration004) Up(repoPath string, dbPassword string, testnet bool) error

type Migration005

type Migration005 struct{}

func (Migration005) Down

func (Migration005) Down(repoPath string, dbPassword string, testnet bool) error

func (Migration005) Up

func (Migration005) Up(repoPath string, dbPassword string, testnet bool) error

type Migration006

type Migration006 struct{}

func (Migration006) Down

func (Migration006) Down(repoPath, databasePassword string, testnetEnabled bool) error

func (Migration006) Up

func (Migration006) Up(repoPath, databasePassword string, testnetEnabled bool) error

type Migration006_configRecord

type Migration006_configRecord struct {
	StoreModerators []string `json:"storeModerators"`
}

type Migration006_listingDataAfterMigration

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

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

type Migration006_price struct {
	CurrencyCode string `json:"currencyCode"`
	Amount       uint64 `json:"amount"`
}

type Migration006_thumbnail

type Migration006_thumbnail struct {
	Tiny   string `json:"tiny"`
	Small  string `json:"small"`
	Medium string `json:"medium"`
}

type Migration007

type Migration007 struct{}

func (Migration007) Down

func (Migration007) Down(repoPath, databasePassword string, testnetEnabled bool) error

func (Migration007) Up

func (Migration007) Up(repoPath, databasePassword string, testnetEnabled bool) error

type Migration008

type Migration008 struct{}

func (Migration008) Down

func (Migration008) Down(repoPath, databasePassword string, testnetEnabled bool) error

func (Migration008) Up

func (Migration008) Up(repoPath, databasePassword string, testnetEnabled bool) error

type Migration009

type Migration009 struct{}

func (Migration009) Down

func (Migration009) Down(repoPath string, dbPassword string, testnet bool) error

func (Migration009) Up

func (Migration009) Up(repoPath string, dbPassword string, testnet bool) (err error)

type Migration009_listing

type Migration009_listing struct {
	Listing Migration009_listing_listing `json:"listing"`
}

type Migration009_listingDataAfterMigration

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

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

type Migration009_listing_listing struct {
	Metadata Migration009_listing_listing_metadata `json:"metadata"`
}

type Migration009_listing_listing_metadata

type Migration009_listing_listing_metadata struct {
	AcceptedCurrencies []string `json:"acceptedCurrencies"`
}

type Migration009_price

type Migration009_price struct {
	CurrencyCode string `json:"currencyCode"`
	Amount       uint64 `json:"amount"`
}

type Migration009_thumbnail

type Migration009_thumbnail struct {
	Tiny   string `json:"tiny"`
	Small  string `json:"small"`
	Medium string `json:"medium"`
}

type Migration010

type Migration010 struct{}

func (Migration010) Down

func (Migration010) Down(repoPath string, dbPassword string, testnet bool) error

func (Migration010) Up

func (Migration010) Up(repoPath string, dbPassword string, testnet bool) (err error)

type Migration011

type Migration011 struct{}

func (Migration011) Down

func (Migration011) Down(repoPath string, dbPassword string, testnet bool) error

func (Migration011) Up

func (Migration011) Up(repoPath string, dbPassword string, testnet bool) error

type Migration011_listing

type Migration011_listing struct {
	Listing Migration011_listing_listing `json:"listing"`
}

type Migration011_listing_listing

type Migration011_listing_listing struct {
	ModeratorIDs []string `json:"moderators"`
}

type Migration012

type Migration012 struct{}

func (Migration012) Down

func (Migration012) Down(repoPath, databasePassword string, testnetEnabled bool) error

func (Migration012) Up

func (Migration012) Up(repoPath, databasePassword string, testnetEnabled bool) error

type Migration012_ListingData

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

type Migration013 struct{}

func (Migration013) Down

func (Migration013) Down(repoPath string, dbPassword string, testnet bool) (err error)

func (Migration013) Up

func (Migration013) Up(repoPath string, dbPassword string, testnet bool) (err error)

type Migration013_TransactionRecord_afterMigration

type Migration013_TransactionRecord_afterMigration struct {
	Txid      string
	Index     uint32
	Value     int64
	Address   string
	Spent     bool
	Timestamp time.Time
}

type Migration013_TransactionRecord_beforeMigration

type Migration013_TransactionRecord_beforeMigration struct {
	Txid         string
	Index        uint32
	Value        int64
	ScriptPubKey string
	Spent        bool
	Timestamp    time.Time
}

type Migration014

type Migration014 struct{}

func (Migration014) Down

func (Migration014) Down(repoPath, databasePassword string, testnetEnabled bool) error

func (Migration014) Up

func (Migration014) Up(repoPath, databasePassword string, testnetEnabled bool) error

type Migration015

type Migration015 struct{}

func (Migration015) Down

func (Migration015) Down(repoPath, dbPassword string, testnet bool) error

func (Migration015) Up

func (Migration015) Up(repoPath, dbPassword string, testnet bool) error

type Migration016

type Migration016 struct{}

func (Migration016) Down

func (Migration016) Down(repoPath, dbPassword string, testnet bool) error

func (Migration016) Up

func (Migration016) Up(repoPath, dbPassword string, testnet bool) error

type Migration016WalletsConfig

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

type Migration017 struct{}

func (Migration017) Down

func (Migration017) Down(repoPath, dbPassword string, testnet bool) error

func (Migration017) Up

func (Migration017) Up(repoPath, dbPassword string, testnet bool) error

Jump to

Keyboard shortcuts

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