utils

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserLockKeyPrefix = "user_lock_"
)

Variables

This section is empty.

Functions

func CalculateNPS

func CalculateNPS(promoters, detractors, passives int64) float64

func CoalesceInt

func CoalesceInt(values ...int) int

func CreateZip

func CreateZip(zipFilePath string, files []string) error

CreateZip creates a zip file at the specified `zipFilePath` containing the files listed in `files`.

func FormatUnixTimeMillis

func FormatUnixTimeMillis(timestamp int64) string

func KeyUserSendSurveyLock

func KeyUserSendSurveyLock(userID string) string

func KeyUserSurveySentStatus

func KeyUserSurveySentStatus(userID, surveyID string) string

func KeyUserTeamMembershipFilterCache

func KeyUserTeamMembershipFilterCache(userID, surveyID string) string

func NewID

func NewID() string

NewID is a globally unique identifier. It is a [A-Z0-9] string 26 characters long. It is a UUID version 4 Guid that is zbased32 encoded without the padding.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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