diff options
Diffstat (limited to 'internal/id/ulid.go')
-rw-r--r-- | internal/id/ulid.go | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/internal/id/ulid.go b/internal/id/ulid.go index 1b0c2e537..d61d7fcec 100644 --- a/internal/id/ulid.go +++ b/internal/id/ulid.go @@ -1,3 +1,21 @@ +/* + GoToSocial + Copyright (C) 2021-2022 GoToSocial Authors admin@gotosocial.org + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + package id import ( @@ -8,7 +26,11 @@ import ( "github.com/oklog/ulid" ) -const randomRange = 631152381 // ~20 years in seconds +const ( + Highest = "ZZZZZZZZZZZZZZZZZZZZZZZZZZ" // Highest is the highest possible ULID + Lowest = "00000000000000000000000000" // Lowest is the lowest possible ULID + randomRange = 631152381 // ~20 years in seconds +) // ULID represents a Universally Unique Lexicographically Sortable Identifier of 26 characters. See https://github.com/oklog/ulid type ULID string |