influxdb/id/uuid.go

17 lines
291 B
Go
Raw Normal View History

2017-12-15 04:33:38 +00:00
package id
2017-12-15 04:33:38 +00:00
import (
"github.com/influxdata/chronograf"
uuid "github.com/satori/go.uuid"
)
2017-12-15 04:43:15 +00:00
var _ chronograf.ID = &UUID{}
2017-12-15 04:33:38 +00:00
// UUID generates a V4 uuid
type UUID struct{}
// Generate creates a UUID v4 string
2017-12-15 04:33:38 +00:00
func (i *UUID) Generate() (string, error) {
2016-10-11 00:34:05 +00:00
return uuid.NewV4().String(), nil
}