common

package
v0.0.0-...-6654f9c Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DurationToTimeSpanString

func DurationToTimeSpanString(duration time.Duration) (result string)

DurationToTimeSpanString generates a time span string from a time.Duration, in the format dd.hh:mm:ss (where dd: days, hh: hours, mm: minutes, ss: seconds); the initial dd. part is added only for periods of more than 24 hours.

func TimeSpanStringToDuration

func TimeSpanStringToDuration(timeSpan string) time.Duration

Types

type Direction

type Direction int
const (
	Forward Direction = iota
	Backward
)

type ListingCursor

type ListingCursor struct {
	Direction Direction
	Cursor    string
}

type ListingSegment

type ListingSegment[T any] struct {
	Meta *struct {
		Cursor      string `json:"cursor"`
		IsTruncated bool   `json:"isTruncated"`
	} `json:"meta"`
	Data *[]T `json:"data"`
}

Jump to

Keyboard shortcuts

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