types

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: Apache-2.0 Imports: 9 Imported by: 7

Documentation

Overview

Package types contains various helper types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitmapIndexOptions

type BitmapIndexOptions struct {
	UniqueKey               string
	UniqueKeyTransformation UniqueKeyTransformation
}

type Decimal added in v1.2.0

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

Decimal is a wrapper for Hazelcast Decimal.

func NewDecimal added in v1.2.0

func NewDecimal(unscaledValue *big.Int, scale int) Decimal

NewDecimal creates and returns a Decimal value with the given big int and scale.

func (Decimal) Float64 added in v1.4.0

func (d Decimal) Float64() float64

Float64 converts the decimal to a float64 and returns it. Note that this conversion can lose information about the precision of the decimal value.

func (Decimal) Scale added in v1.2.0

func (d Decimal) Scale() int

Scale returns the scale of the decimal.

func (Decimal) String added in v1.4.0

func (d Decimal) String() string

String returns the string representation of the decimal, using scientific notation if an exponent is needed.

func (Decimal) UnscaledValue added in v1.2.0

func (d Decimal) UnscaledValue() *big.Int

UnscaledValue returns the unscaled value of the decimal.

type DistributedObjectInfo added in v1.1.0

type DistributedObjectInfo struct {
	Name        string
	ServiceName string
}

type Duration

type Duration time.Duration

func (Duration) MarshalText

func (d Duration) MarshalText() ([]byte, error)

func (Duration) String

func (d Duration) String() string

func (*Duration) ToDuration added in v1.4.0

func (d *Duration) ToDuration() time.Duration

func (*Duration) UnmarshalText

func (d *Duration) UnmarshalText(b []byte) error

type Entry

type Entry struct {
	Key   interface{}
	Value interface{}
}

func NewEntry

func NewEntry(key interface{}, value interface{}) Entry

type IndexConfig

type IndexConfig struct {
	Name               string
	Attributes         []string
	BitmapIndexOptions BitmapIndexOptions
	Type               IndexType
}

type IndexType

type IndexType int32
const (
	IndexTypeSorted IndexType = 0
	IndexTypeHash   IndexType = 1
	IndexTypeBitmap IndexType = 2
)

type LocalDate added in v1.2.0

type LocalDate time.Time

LocalDate is the date part of time.Time.

func (*LocalDate) String added in v1.4.0

func (ld *LocalDate) String() string

func (*LocalDate) ToTime added in v1.4.0

func (ld *LocalDate) ToTime() time.Time

type LocalDateTime added in v1.2.0

type LocalDateTime time.Time

LocalDateTime is the date and time with local timezone.

func (*LocalDateTime) String added in v1.4.0

func (ldt *LocalDateTime) String() string

func (*LocalDateTime) ToTime added in v1.4.0

func (ldt *LocalDateTime) ToTime() time.Time

type LocalTime added in v1.2.0

type LocalTime time.Time

LocalTime is the time part of time.Time.

func (*LocalTime) String added in v1.4.0

func (lt *LocalTime) String() string

func (*LocalTime) ToTime added in v1.4.0

func (lt *LocalTime) ToTime() time.Time

type OffsetDateTime added in v1.2.0

type OffsetDateTime time.Time

OffsetDateTime is the date and time with a timezone.

func (*OffsetDateTime) String added in v1.4.0

func (odt *OffsetDateTime) String() string

func (*OffsetDateTime) ToTime added in v1.4.0

func (odt *OffsetDateTime) ToTime() time.Time

type SimpleEntryView

type SimpleEntryView struct {
	// TODO: export fields
	Key            interface{}
	Value          interface{}
	Cost           int64
	CreationTime   int64
	ExpirationTime int64
	Hits           int64
	LastAccessTime int64
	LastStoredTime int64
	LastUpdateTime int64
	Version        int64
	TTL            int64
	MaxIdle        int64
}

SimpleEntryView represents a readonly view of a map entry.

func NewSimpleEntryView

func NewSimpleEntryView(key, value interface{}, cost, creationTime, expirationTime, hits, lastAccessTime,
	lastStoredTime, lastUpdateTime, version, ttl, maxIdle int64) *SimpleEntryView

type UUID

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

func NewUUID

func NewUUID() UUID

NewUUID is used to generate a random UUID v4 using rand.Reader as the CSRNG.

func NewUUIDWith

func NewUUIDWith(mostSigBits, leastSigBits uint64) UUID

func (UUID) Default

func (u UUID) Default() bool

func (UUID) ExtractInto

func (u UUID) ExtractInto(b []byte)

func (UUID) LeastSignificantBits

func (u UUID) LeastSignificantBits() uint64

func (UUID) MostSignificantBits

func (u UUID) MostSignificantBits() uint64

func (UUID) String

func (u UUID) String() string

type UniqueKeyTransformation

type UniqueKeyTransformation int32
const (
	UniqueKeyTransformationObject UniqueKeyTransformation = 0
	UniqueKeyTransformationLong   UniqueKeyTransformation = 1
	UniqueKeyTransformationRaw    UniqueKeyTransformation = 2
)

Jump to

Keyboard shortcuts

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