convert

package
v0.0.0-...-4a740ba Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyValue = er.New("urn:giti:convert.protocol:error:empty-value").SetDetail(protocol.LanguageEnglish, domainEnglish, "Empty Value",
		"Empty value pass to convert function that it is illegal",
		"",
		"").Save()

	ErrValueOutOfRange = er.New("urn:giti:convert.protocol:error:value out of range").SetDetail(protocol.LanguageEnglish, domainEnglish, "Value Out of Range",
		"indicates that a value is out of range for the target type, e.g. 270 for uint8",
		"",
		"").Save()

	ErrBadValue = er.New("urn:giti:convert.protocol:error:bad-value").SetDetail(protocol.LanguageEnglish, domainEnglish, "Bad Value",
		"Bad value pass to convert function that it is illegal e.g. pass '1b2' to convert to number",
		"",
		"").Save()
)

Errors

Functions

func StringToUint16Base10

func StringToUint16Base10(str string) (num uint16, err protocol.Error)

StringToUint16Base10 Parse given string and returns uint16

func StringToUint32Base10

func StringToUint32Base10(str string) (num uint32, err protocol.Error)

StringToUint32Base10 Parse given string and returns uint32

func StringToUint64Base10

func StringToUint64Base10(str string) (num uint64, err protocol.Error)

StringToUint64Base10 Parse given string and returns uint64

func StringToUint8Base10

func StringToUint8Base10(str string) (num uint8, err protocol.Error)

StringToUint8Base10 Parse given string and returns uint8

func Unsafe16ByteArraySliceToByteSlice

func Unsafe16ByteArraySliceToByteSlice(req [][16]byte) (res []byte)

Unsafe16ByteArraySliceToByteSlice returns ...

func Unsafe32ByteArraySliceToByteSlice

func Unsafe32ByteArraySliceToByteSlice(req [][32]byte) (res []byte)

Unsafe32ByteArraySliceToByteSlice returns ...

func UnsafeBoolSliceToByteSlice

func UnsafeBoolSliceToByteSlice(req []bool) (res []byte)

UnsafeBoolSliceToByteSlice returns ...

func UnsafeByteSliceTo16ByteArraySlice

func UnsafeByteSliceTo16ByteArraySlice(req []byte) (res [][16]byte)

UnsafeByteSliceTo16ByteArraySlice returns ...

func UnsafeByteSliceTo32ByteArraySlice

func UnsafeByteSliceTo32ByteArraySlice(req []byte) (res [][32]byte)

UnsafeByteSliceTo32ByteArraySlice returns ...

func UnsafeByteSliceToBoolSlice

func UnsafeByteSliceToBoolSlice(req []byte) (res []bool)

UnsafeByteSliceToBoolSlice returns ...

func UnsafeByteSliceToComplex128Slice

func UnsafeByteSliceToComplex128Slice(req []byte) (res []complex128)

UnsafeByteSliceToComplex128Slice returns ...

func UnsafeByteSliceToComplex64Slice

func UnsafeByteSliceToComplex64Slice(req []byte) (res []complex64)

UnsafeByteSliceToComplex64Slice returns ...

func UnsafeByteSliceToFloat32Slice

func UnsafeByteSliceToFloat32Slice(req []byte) (res []float32)

UnsafeByteSliceToFloat32Slice returns ...

func UnsafeByteSliceToFloat64Slice

func UnsafeByteSliceToFloat64Slice(req []byte) (res []float64)

UnsafeByteSliceToFloat64Slice returns ...

func UnsafeByteSliceToInt16Slice

func UnsafeByteSliceToInt16Slice(req []byte) (res []int16)

UnsafeByteSliceToInt16Slice returns ...

func UnsafeByteSliceToInt32Slice

func UnsafeByteSliceToInt32Slice(req []byte) (res []int32)

UnsafeByteSliceToInt32Slice returns ...

func UnsafeByteSliceToInt64Slice

func UnsafeByteSliceToInt64Slice(req []byte) (res []int64)

UnsafeByteSliceToInt64Slice returns ...

func UnsafeByteSliceToInt8Slice

func UnsafeByteSliceToInt8Slice(req []byte) (res []int8)

UnsafeByteSliceToInt8Slice returns ...

func UnsafeByteSliceToString

func UnsafeByteSliceToString(req []byte) (res string)

UnsafeByteSliceToString returns ...

func UnsafeByteSliceToUInt16Slice

func UnsafeByteSliceToUInt16Slice(req []byte) (res []uint16)

UnsafeByteSliceToUInt16Slice returns ...

func UnsafeByteSliceToUInt32Slice

func UnsafeByteSliceToUInt32Slice(req []byte) (res []uint32)

UnsafeByteSliceToUInt32Slice returns ...

func UnsafeByteSliceToUInt64Slice

func UnsafeByteSliceToUInt64Slice(req []byte) (res []uint64)

UnsafeByteSliceToUInt64Slice returns ...

func UnsafeByteSliceToUInt8Slice

func UnsafeByteSliceToUInt8Slice(req []byte) (res []uint8)

UnsafeByteSliceToUInt8Slice returns ...

func UnsafeComplex128SliceToByteSlice

func UnsafeComplex128SliceToByteSlice(req []complex128) (res []byte)

UnsafeComplex128SliceToByteSlice returns ...

func UnsafeComplex64SliceToByteSlice

func UnsafeComplex64SliceToByteSlice(req []complex64) (res []byte)

UnsafeComplex64SliceToByteSlice returns ...

func UnsafeFloat32SliceToByteSlice

func UnsafeFloat32SliceToByteSlice(req []float32) (res []byte)

UnsafeFloat32SliceToByteSlice returns ...

func UnsafeFloat64SliceToByteSlice

func UnsafeFloat64SliceToByteSlice(req []float64) (res []byte)

UnsafeFloat64SliceToByteSlice returns ...

func UnsafeInt16SliceToByteSlice

func UnsafeInt16SliceToByteSlice(req []int16) (res []byte)

UnsafeInt16SliceToByteSlice returns ...

func UnsafeInt32SliceToByteSlice

func UnsafeInt32SliceToByteSlice(req []int32) (res []byte)

UnsafeInt32SliceToByteSlice returns ...

func UnsafeInt64SliceToByteSlice

func UnsafeInt64SliceToByteSlice(req []int64) (res []byte)

UnsafeInt64SliceToByteSlice returns ...

func UnsafeInt8SliceToByteSlice

func UnsafeInt8SliceToByteSlice(req []int8) (res []byte)

UnsafeInt8SliceToByteSlice returns ...

func UnsafeStringToByteSlice

func UnsafeStringToByteSlice(req string) (res []byte)

UnsafeStringToByteSlice returns ...

func UnsafeUInt16SliceToByteSlice

func UnsafeUInt16SliceToByteSlice(req []uint16) (res []byte)

UnsafeUInt16SliceToByteSlice returns ...

func UnsafeUInt32SliceToByteSlice

func UnsafeUInt32SliceToByteSlice(req []uint32) (res []byte)

UnsafeUInt32SliceToByteSlice returns ...

func UnsafeUInt64SliceToByteSlice

func UnsafeUInt64SliceToByteSlice(req []uint64) (res []byte)

UnsafeUInt64SliceToByteSlice returns ...

func UnsafeUInt8SliceToByteSlice

func UnsafeUInt8SliceToByteSlice(req []uint8) (res []byte)

UnsafeUInt8SliceToByteSlice returns ...

Types

This section is empty.

Jump to

Keyboard shortcuts

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