influxdb/chronograf/id/uuid.go

17 lines
300 B
Go

package id
import (
"github.com/influxdata/influxdb/chronograf"
uuid "github.com/satori/go.uuid"
)
var _ chronograf.ID = &UUID{}
// UUID generates a V4 uuid
type UUID struct{}
// Generate creates a UUID v4 string
func (i *UUID) Generate() (string, error) {
return uuid.NewV4().String(), nil
}