Documentation ¶
Index ¶
- Variables
- func DoInit(repoRoot string, nBitsForKeypair int, testnet bool, password string, ...) error
- func GetAPICORS(cfgPath string) (bool, error)
- func GetAPIEnabled(cfgPath string) (bool, error)
- func GetAPIHeaders(cfgPath string) (map[string][]string, error)
- func GetAPIUsernameAndPw(cfgPath string) (username, password string, err error)
- func GetDefaultFees(cfgPath string) (Low uint64, Medium uint64, High uint64, err error)
- func GetDropboxApiToken(cfgPath string) (string, error)
- func GetFeeAPI(cfgPath string) (string, error)
- func GetMaxFee(cfgPath string) (uint64, error)
- func GetResolverUrl(cfgPath string) (string, error)
- func InitConfig(repoRoot string) (*config.Config, error)
- type Config
- type Datastore
- type Followers
- type Following
- type Inventory
- type OfflineMessages
- type Pointers
- type SMTPSettings
- type Settings
- type SettingsData
- type ShippingAddress
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultBootstrapAddresses = []string{
"/ip4/107.170.133.32/tcp/4001/ipfs/QmSwHSqtUi9GhHTegi8gA5n2fsjP7LcnxGQeedj8ScLi8q",
"/ip4/139.59.174.197/tcp/4001/ipfs/Qmf6ZASu56X3iS9zBh5CQRDCLHttDY41637qn87gzSGybs",
"/ip4/139.59.6.222/tcp/4001/ipfs/QmZAZYJ5MvqkdoTuaFaoeyHkHLd8muENfr9JTo7ikQZPSG",
}
View Source
var ErrRepoExists = errors.New(`ipfs configuration file already exists!
Reinitializing would overwrite your keys.
(use -f to force overwrite)
`)
Functions ¶
func GetAPICORS ¶
func GetAPIEnabled ¶
func GetAPIUsernameAndPw ¶
func GetDefaultFees ¶
func GetDropboxApiToken ¶
func GetResolverUrl ¶
Types ¶
type Config ¶
type Config interface { // Initialize the database with the node's mnemonic seed and // identity key. This will be called during repo init Init(mnemonic string, identityKey []byte, password string) error // Return the mnemonic string GetMnemonic() (string, error) // Return the identity key GetIdentityKey() ([]byte, error) // Returns true if the db has failed to decrypt properly ex) wrong pw IsEncrypted() bool }
type Followers ¶
type Followers interface { // Put a B58 encoded follower ID to the database Put(follower string) error // Get followers from the database. // The offset and limit arguments can be used to for lazy loading. Get(offset int, limit int) ([]string, error) // Delete a follower from the databse. Delete(follower string) error // Return the number of followers in the database. Count() int }
type Following ¶
type Following interface { // Put a B58 encoded peer ID to the database Put(peer string) error // Get a list of following peers from the database. // The offset and limit arguments can be used to for lazy loading. Get(offset int, limit int) ([]string, error) // Delete a peer from the databse. Delete(peer string) error // Return the number of peers in the database. Count() int }
type Inventory ¶
type Inventory interface { // Put an inventory count for a listing // Override the existing count if it exists Put(slug string, count int) error // Return the count for a listing Get(slug string) (int, error) // Fetch all inventory countes GetAll() (map[string]int, error) // Delete a listing and related count Delete(slug string) error }
type OfflineMessages ¶
type SMTPSettings ¶
type Settings ¶
type Settings interface { // Put settings to the database // Override all fields Put(settings SettingsData) error // Update all non-nil fields Update(settings SettingsData) error // Return the settings object Get() (SettingsData, error) }
type SettingsData ¶
type SettingsData struct { PaymentDataInQR *bool `json:"paymentDataInQR"` ShowNotifications *bool `json:"showNotificatons"` ShowNsfw *bool `json:"showNsfw"` ShippingAddresses *[]ShippingAddress `json:"shippingAddresses"` LocalCurrency *string `json:"localCurrency"` Country *string `json:"country"` Language *string `json:"language"` TermsAndConditions *string `json:"termsAndConditions"` RefundPolicy *string `json:"refundPolicy"` BlockedNodes *[]string `json:"blockedNodes"` StoreModerators *[]string `json:"storeModerators"` SMTPSettings *SMTPSettings `json:"smtpSettings"` }
type ShippingAddress ¶
type ShippingAddress struct { Name string `json:"name"` Company string `json:"company"` AddressLineOne string `json:"addressLineOne"` AddressLineTwo string `json:"addressLineTwo"` City string `json:"city"` State string `json:"state"` Country string `json:"country"` PostalCode string `json:"postalCode"` AddressNotes string `json:"addressNotes"` }
Click to show internal directories.
Click to hide internal directories.