types

package
v0.1.0-dev.23 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package types is a package that contains some generic data types.

Package types is a package that contains some generic data types.

Package types is a package that contains some generic data types.

Package types is a package that contains some generic data types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBoolType

func NewBoolType(value any) (data.Type, error)

func NewIntegerType

func NewIntegerType(value any) (data.Type, error)

func NewStringType

func NewStringType(value any) (data.Type, error)

Types

type ArrayType

type ArrayType struct {
	data.BaseValueType
	// contains filtered or unexported fields
}

ArrayType is a generic array type that can hold any array data type. It implements the data.ValueType interface.

func (*ArrayType) GetTypeKind

func (t *ArrayType) GetTypeKind() data.Kind

GetTypeKind returns the data.Kind of the ArrayType.

func (*ArrayType) GetTypeName

func (t *ArrayType) GetTypeName() string

func (*ArrayType) GetTypeSize

func (t *ArrayType) GetTypeSize() uint64

func (*ArrayType) GetValue

func (t *ArrayType) GetValue() any

func (*ArrayType) GetValueSize

func (t *ArrayType) GetValueSize() uint64

func (*ArrayType) Parse

func (t *ArrayType) Parse(v any) error

Parse parses the given value and sets it to the ArrayType. It returns an error if the given value is not of type []any.

type BoolType

type BoolType struct {
	data.BaseValueType
	// contains filtered or unexported fields
}

func (*BoolType) GetTypeKind

func (t *BoolType) GetTypeKind() data.Kind

func (*BoolType) GetTypeName

func (t *BoolType) GetTypeName() string

func (*BoolType) GetValue

func (t *BoolType) GetValue() any

func (*BoolType) GetValueSize

func (t *BoolType) GetValueSize() uint64

func (*BoolType) Parse

func (t *BoolType) Parse(p any) error

type IntegerType

type IntegerType struct {
	data.BaseValueType
	// contains filtered or unexported fields
}

func (*IntegerType) GetTypeKind

func (t *IntegerType) GetTypeKind() data.Kind

func (*IntegerType) GetTypeName

func (t *IntegerType) GetTypeName() string

func (*IntegerType) GetValue

func (t *IntegerType) GetValue() any

func (*IntegerType) GetValueSize

func (t *IntegerType) GetValueSize() uint64

func (*IntegerType) Parse

func (t *IntegerType) Parse(v any) error

type StringType

type StringType struct {
	data.BaseValueType
	// contains filtered or unexported fields
}

func (*StringType) GetTypeKind

func (t *StringType) GetTypeKind() data.Kind

func (*StringType) GetTypeName

func (t *StringType) GetTypeName() string

func (*StringType) GetValue

func (t *StringType) GetValue() any

func (*StringType) GetValueSize

func (t *StringType) GetValueSize() uint64

func (*StringType) Parse

func (t *StringType) Parse(p any) error

Jump to

Keyboard shortcuts

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