bunutil

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fill

func Fill[T any](
	values []T,
	timeCol []time.Time,
	value T,
	gte, lt time.Time,
	interval time.Duration,
) []T

func FillHoles

func FillHoles(m map[string]any, gte, lt time.Time, interval time.Duration)

func FillTime

func FillTime(
	timeCol []time.Time,
	gte, lt time.Time,
	interval time.Duration,
) []time.Time

func FillUnixNum added in v1.6.2

func FillUnixNum[T constraints.Integer | constraints.Float](
	values []T,
	timeCol []unixtime.Seconds,
	value float64,
	gte, lt time.Time,
	interval time.Duration,
) []float64

func FillUnixTime added in v1.6.2

func FillUnixTime(
	timeCol []unixtime.Seconds,
	gte, lt time.Time,
	interval time.Duration,
) []unixtime.Seconds

func IsJSON

func IsJSON(s string) (map[string]any, bool)

Types

type Debouncer

type Debouncer struct {
	// contains filtered or unexported fields
}

func NewDebouncer

func NewDebouncer() *Debouncer

func (*Debouncer) Run

func (d *Debouncer) Run(after time.Duration, f func())

type NullFloat64

type NullFloat64 sql.NullFloat64

func Float64

func Float64(f float64) NullFloat64

func (NullFloat64) MarshalJSON

func (f NullFloat64) MarshalJSON() ([]byte, error)

func (NullFloat64) MarshalYAML added in v1.6.2

func (f NullFloat64) MarshalYAML() (interface{}, error)

func (*NullFloat64) Scan

func (f *NullFloat64) Scan(value any) error

func (*NullFloat64) UnmarshalJSON

func (f *NullFloat64) UnmarshalJSON(data []byte) error

func (*NullFloat64) UnmarshalYAML

func (f *NullFloat64) UnmarshalYAML(value *yaml.Node) error

func (NullFloat64) Value

func (f NullFloat64) Value() (driver.Value, error)

type OnceMap

type OnceMap struct {
	// contains filtered or unexported fields
}

func (*OnceMap) Do

func (m *OnceMap) Do(key string, fn func())

type Params

type Params struct {
	Any any
}

func (*Params) Decode

func (p *Params) Decode(dest any) error

func (*Params) MarshalJSON

func (p *Params) MarshalJSON() ([]byte, error)

func (*Params) Scan

func (p *Params) Scan(src any) error

func (*Params) Value

func (p *Params) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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