utils

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package utils contains various helpers and utility functions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoolConverter

type BoolConverter struct{}

func (BoolConverter) Convert

func (BoolConverter) Convert(in bool) (uint8, error)

type BytesConverter

type BytesConverter struct{}

func (BytesConverter) Convert

func (BytesConverter) Convert(in []byte) ([]byte, error)

type Counter

type Counter[T number] struct {
	// contains filtered or unexported fields
}

func NewCounter

func NewCounter[T number]() *Counter[T]

func (*Counter[T]) Add

func (c *Counter[T]) Add(delta T)

func (*Counter[T]) MakeChild

func (c *Counter[T]) MakeChild() *Counter[T]

func (*Counter[T]) Value

func (c *Counter[T]) Value() T

type DateConverter

type DateConverter struct{}

func (DateConverter) Convert

func (DateConverter) Convert(in time.Time) (uint16, error)

type DateToStringConverter

type DateToStringConverter struct{}

func (DateToStringConverter) Convert

func (DateToStringConverter) Convert(in time.Time) (string, error)

type DatetimeConverter

type DatetimeConverter struct{}

func (DatetimeConverter) Convert

func (DatetimeConverter) Convert(in time.Time) (uint32, error)

type DatetimeToStringConverter

type DatetimeToStringConverter struct{}

func (DatetimeToStringConverter) Convert

type Float32Converter

type Float32Converter struct{}

func (Float32Converter) Convert

func (Float32Converter) Convert(in float32) (float32, error)

type Float64Converter

type Float64Converter struct{}

func (Float64Converter) Convert

func (Float64Converter) Convert(in float64) (float64, error)

type Int16Converter

type Int16Converter struct{}

func (Int16Converter) Convert

func (Int16Converter) Convert(in int16) (int16, error)

type Int32Converter

type Int32Converter struct{}

func (Int32Converter) Convert

func (Int32Converter) Convert(in int32) (int32, error)

type Int64Converter

type Int64Converter struct{}

func (Int64Converter) Convert

func (Int64Converter) Convert(in int64) (int64, error)

type Int8Converter

type Int8Converter struct{}

func (Int8Converter) Convert

func (Int8Converter) Convert(in int8) (int8, error)

type StringConverter

type StringConverter struct{}

func (StringConverter) Convert

func (StringConverter) Convert(in string) (string, error)

type StringToBytesConverter

type StringToBytesConverter struct{}

func (StringToBytesConverter) Convert

func (StringToBytesConverter) Convert(in string) ([]byte, error)

type TimestampConverter

type TimestampConverter struct{}

func (TimestampConverter) Convert

func (TimestampConverter) Convert(in time.Time) (uint64, error)

type TimestampToStringConverter

type TimestampToStringConverter struct{}

func (TimestampToStringConverter) Convert

type Uint16Converter

type Uint16Converter struct{}

func (Uint16Converter) Convert

func (Uint16Converter) Convert(in uint16) (uint16, error)

type Uint32Converter

type Uint32Converter struct{}

func (Uint32Converter) Convert

func (Uint32Converter) Convert(in uint32) (uint32, error)

type Uint64Converter

type Uint64Converter struct{}

func (Uint64Converter) Convert

func (Uint64Converter) Convert(in uint64) (uint64, error)

type Uint8Converter

type Uint8Converter struct{}

func (Uint8Converter) Convert

func (Uint8Converter) Convert(in uint8) (uint8, error)

type ValueConverter

type ValueConverter[IN common.ValueType, OUT common.ValueType] interface {
	Convert(in IN) (OUT, error)
}

Jump to

Keyboard shortcuts

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