utils

package
v0.0.0-...-aab178e Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const APPRAISE int = 0

Process Steps

View Source
const BADTAGS int = 4
View Source
const BUILD int = 2
View Source
const CALLS int = int(HOUR / INTERVAL)
View Source
const COMPUTETAGS int = 5
View Source
const DAY int64 = 60 * 60 * 24

Time constants

View Source
const FOLLOWS int = 60

Process Limits

View Source
const GOODTAGS int = 3
View Source
const GRABCOUNT int = 50
View Source
const HOUR float64 = 60 * 60
View Source
const INTERVAL float64 = 60 * 5 // In seconds. Should match Cron Job
View Source
const LIKES int = 100
View Source
const MAX int = 5000
View Source
const MAXPEOPLEGRAB int = int(MAXREQUESTS / GRABCOUNT)
View Source
const MAXPOSTGRAB int = 4
View Source
const MAXREQUESTS int = int(MAX / CALLS)
View Source
const SCORN int = 1
View Source
const SHARE int = 6
View Source
const SIXHOURS float64 = HOUR * 6

Variables

This section is empty.

Functions

func ComputeHmac256

func ComputeHmac256(message string, secret string) string

func FloatToString

func FloatToString(f float64) string

func FollowerDecay

func FollowerDecay(followed_by, follows int64, magic, target float64) int64

func IntToString

func IntToString(i int) string

func Intervals

func Intervals() (intervals int)

func IsLocal

func IsLocal() bool

func Limit

func Limit(value *int, intervals int, bound int)

func SixHoursAgo

func SixHoursAgo() string

func StringToFloat

func StringToFloat(s string) float64

Types

This section is empty.

Jump to

Keyboard shortcuts

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