uuid

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UUID_LENGTH    int = 16
	UUID_STR_LEN   int = 36
	UUID16_LENGTH  int = 2
	UUID16_STR_LEN int = UUID16_LENGTH * 2
	UUID32_LENGTH  int = 4
	UUID32_STR_LEN int = UUID32_LENGTH * 2
)

Variables

View Source
var ErrData = errors.New("invalid data length for UUID")

error returned if UUID can not be parsed from given data

View Source
var ErrString = errors.New("can not parse UUID from input")

error returned if UUID can not be parsed from string

Functions

This section is empty.

Types

type Uuid

type Uuid [16]byte

Bluetooth Core 5.2 Vol 3, part B, ch 2.5.1

var NoneUuid Uuid

Empty UUID value

func FromBytes

func FromBytes(value []byte) (Uuid, error)

Parse UUID from given byte slice. Error is returned if the slice does not contain enough data

func FromString

func FromString(value string) (Uuid, error)

Parse UUID from given string

func (Uuid) String

func (u Uuid) String() string

type Uuid16

type Uuid16 uint16

func Uuid16FromBytes

func Uuid16FromBytes(data []byte) (Uuid16, error)

Parse UUID16 from byte slice. Error is returned if slice does not contain enough data

func Uuid16FromString

func Uuid16FromString(value string) (Uuid16, error)

Parse UUID16 from string. Error is returned if string is malformed

func (Uuid16) String

func (u Uuid16) String() string

type Uuid32

type Uuid32 uint32

func Uuid32FromBytes

func Uuid32FromBytes(data []byte) (Uuid32, error)

Parse UUID32 from byte slice. Error is returned if slice does not contain enough data

func Uuid32FromString

func Uuid32FromString(value string) (Uuid32, error)

Parse UUID32 from string. Error is returned if string is malformed

func (Uuid32) String

func (u Uuid32) String() string

Jump to

Keyboard shortcuts

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