Documentation ¶
Index ¶
Constants ¶
View Source
const (
// LetterBytes are the letters of an alphabet used to generate a random number
LetterBytes = "abcdefghijklmnopqrstuvwxyz"
)
Variables ¶
This section is empty.
Functions ¶
func CalculateGarbageCollectDate ¶
CalculateGarbageCollectDate is used to calculate the date at which a file will be removed from our inventory. To prepare data for input use `strconv.Atoi(fmt.Sprintf("%v", .....")"`
func GenerateMultiAddrFromString ¶
GenerateMultiAddrFromString is used to take a string, and convert it to a multiformat based address
func ParseMultiAddrForIPFSPeer ¶ added in v1.0.6
ParseMultiAddrForIPFSPeer is used to parse a multiaddress to determine whether its a valid ipfs address
Types ¶
type RandomUtils ¶
RandomUtils is our helper struct for random related utilities
func GenerateRandomUtils ¶
func GenerateRandomUtils() *RandomUtils
GenerateRandomUtils is used to generate our random utils struct
func (*RandomUtils) GenerateString ¶
func (u *RandomUtils) GenerateString(length int, charset string) string
GenerateString is used to generate a fixed length random string from the specified charset, using a fresh seed each time
Click to show internal directories.
Click to hide internal directories.