uuid

package
v0.0.0-...-d0b943e Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2016 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmptyUUID = &UUID{}

EmptyUUID is the zero-UUID.

Functions

func Equal

func Equal(u1, u2 UUID) bool

Equal delegates to "github.com/satori/go.uuid".Equal.

Types

type UUID

type UUID struct {
	uuid.UUID
}

UUID is a thin wrapper around "github.com/satori/go.uuid".UUID that can be used as a gogo/protobuf customtype.

func FromBytes

func FromBytes(input []byte) (*UUID, error)

FromBytes delegates to "github.com/satori/go.uuid".FromBytes and wraps the result in a UUID.

func FromString

func FromString(input string) (*UUID, error)

FromString delegates to "github.com/satori/go.uuid".FromString and wraps the result in a UUID.

func MakeV4

func MakeV4() UUID

MakeV4 delegates to "github.com/satori/go.uuid".NewV4 and wraps the result in a UUID.

func NewV4

func NewV4() *UUID

NewV4 delegates to "github.com/satori/go.uuid".NewV4 and wraps the result in a UUID.

func (UUID) Bytes

func (u UUID) Bytes() error

Bytes shadows (*github.com/satori/go.uuid.UUID).Bytes() to prevent confusing our default proto stringer. TODO(tschottdorf): fix upstream.

func (UUID) GetBytes

func (u UUID) GetBytes() []byte

GetBytes returns the UUID as a byte slice.

func (UUID) MarshalTo

func (u UUID) MarshalTo(data []byte) (int, error)

MarshalTo marshals u to data.

func (*UUID) Short

func (u *UUID) Short() string

Short returns the first eight characters of the output of String().

func (UUID) Size

func (u UUID) Size() int

Size returns the marshalled size of u, in bytes.

func (*UUID) String

func (u *UUID) String() string

String returns the canonical representation of the UUID. For nil UUIDs, returns <nil>.

func (*UUID) Unmarshal

func (u *UUID) Unmarshal(data []byte) error

Unmarshal unmarshals data to u.

Jump to

Keyboard shortcuts

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