constants

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: Apache-2.0, MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const AutoretrieveProviderBatchSize = uint64(25000)

how many contents to include per advertisement for autoretrieve

View Source
const CacheDuration = time.Second * 10
View Source
const CachePurgeEveryDuration = time.Minute * 5
View Source
const CacheSize = 256 * 1024 * 1024 // 256MB
View Source
const ContentLocationLocal = "local"
View Source
const DealDuration = 1555200 - (2880 * 21)

DealDuration Making default deal duration be three weeks less than the maximum to ensure miners who start their deals early don't run into issues

View Source
const DefaultIndexerURL = "https://cid.contact"
View Source
const ExtendedCacheDuration = time.Minute * 60
View Source
const ExtendedCachePurgeEveryDuration = time.Minute * 120
View Source
const ExtendedCacheSize = 16 * 1024 * 1024 // 16MB
View Source
const MaxDealContentSize = int64(34_000_000_000)

MaxDealContentSize 31.66 GB

View Source
const MinDealContentSize = int64(1_100_000_000)

MinDealContentSize 1 GB

View Source
const MinSafeDealLifetime = 2880 * 21 // three weeks
View Source
const TokenExpiryDurationAdmin = time.Hour * 24 * 365 // 1 year
View Source
const TokenExpiryDurationDefault = time.Hour * 24 * 30 // 30 days
View Source
const TokenExpiryDurationLogin = time.Hour * 24 * 30 // 30 days
View Source
const TokenExpiryDurationPermanent = time.Hour * 24 * 365 * 100 // 100 years
View Source
const TokenExpiryDurationRegister = time.Hour * 24 * 7 // 1 week
View Source
const TopMinerSel = 15

Variables

View Source
var AdminPasswordContainsAlphaRegex = regexp.MustCompile(`[A-Za-z]`)
View Source
var AdminPasswordContainsNumericRegex = regexp.MustCompile(`\d`)
View Source
var AdminPasswordLengthAndAlphanumericRegex = regexp.MustCompile(`^[A-Za-z\d]{8,}$`)
View Source
var AdminUsernameAlphanumericRegex = regexp.MustCompile(`^[A-Za-z\d]{1,32}$`)
View Source
var DealMaxPrice abi.TokenAmount
View Source
var VerifiedDealMaxPrice = abi.NewTokenAmount(0)

Functions

func IsAdminPasswordValid added in v0.4.0

func IsAdminPasswordValid(password string) bool

func IsAdminUsernameValid added in v0.4.0

func IsAdminUsernameValid(username string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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