uuid

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2018 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Size represents number of bytes in a UUID
	Size = 16
	// UExample is a example of a string UUID
	UExample = "01234567-89AB-CDEF-0123-456789ABCDEF"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type UUID

type UUID [Size]byte

UUID represents a unique identifier.

func MustParse

func MustParse(s string) *UUID

MustParse parses a uuid string or panics.

func Parse

func Parse(s string) (*UUID, error)

Parse parses a uuid string.

func (*UUID) MarshalJSON

func (u *UUID) MarshalJSON() ([]byte, error)

MarshalJSON implements the marshaller interface. This allows us to actually read and edit the json file

func (UUID) String

func (u UUID) String() string

func (*UUID) UnmarshalJSON

func (u *UUID) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the unmarshaller interface. This allows us to actually read and edit the json file

Jump to

Keyboard shortcuts

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