1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-24 23:59:47 +02:00

Change RefID field size from 16 to 20 with updated algo

Xid dependency updated.

Moved to 20 length ID values.

Added new revision number to version and meta information. Revision number is timestamp format.
This commit is contained in:
Harvey Kandola 2018-10-04 21:03:47 +01:00
parent 7860bc1808
commit 391c143483
25 changed files with 2123 additions and 878 deletions

View file

@ -9,13 +9,29 @@
//
// https://documize.com
// Package uniqueid provides utility functions specific to the http-end-point component of Documize.
// Package uniqueid provides randomly generated string 16 characters long.
package uniqueid
import "github.com/documize/community/core/uniqueid/xid"
import (
"github.com/documize/community/core/uniqueid/xid"
"github.com/documize/community/core/uniqueid/xid16"
)
// Generate creates a randomly generated string suitable for use as part of an URI.
// It returns a string that is always 16 characters long.
func Generate() string {
return xid.New().String()
}
// Generate16 creates a randomly generated 16 character length string suitable for use as part of an URI.
// It returns a string that is always 16 characters long.
func Generate16() string {
return xid16.New().String()
}
// beqassjmvbajrivsc0eg
// beqat1bmvbajrivsc0f0
// beqat1bmvbajrivsc1ag
// beqat1bmvbajrivsc1g0
// beqat1bmvbajrivsc1ug