Documentation
¶
Overview ¶
JSON Pointer utilities see: https://datatracker.ietf.org/doc/html/rfc6901
This implementation does not strive to be a perfect implementation of RFC6901. Is is only good enough for the needs of uniond.
Index ¶
Constants ¶
View Source
const ( UlidByteSize = 16 UlidStringSize = 26 CrockfordCodec = "0123456789ABCDEFGHJKMNPQRSTVWXYZ" )
Variables ¶
View Source
var ( ErrUnknown = errors.New("unknown") ErrNotFound = errors.New("not found") ErrConflict = errors.New("conflict") ErrBadInput = errors.New("bad input") ErrNotAllowed = errors.New("not allowed") ErrInvalidState = errors.New("invalid state") )
View Source
var (
CrockfordEncoding = base32.NewEncoding(CrockfordCodec).WithPadding(base32.NoPadding)
)
Functions ¶
Types ¶
type Set ¶
type Set[A comparable] interface { Has(a A) bool Add(a A) AddAll(a ...A) Remove(a A) Count() int Values() []A }
func NewSet ¶
func NewSet[A comparable]() Set[A]
type Ulid ¶ added in v1.2.0
type Ulid interface {
TimeBytes() []byte
EntropyBytes() []byte
Bytes() []byte
String() string
Time() *time.Time
BitString() string
Equals(other Ulid) bool
MarshalJSON() ([]byte, error)
UnmarshalJSON([]byte) error
}
func MustUlidFromString ¶ added in v1.2.0
func NewMonotonicUlid ¶ added in v1.2.0
func NewMonotonicUlid() Ulid
func NewZeroUlid ¶ added in v1.2.0
func NewZeroUlid() Ulid
func UlidFromBytes ¶ added in v1.2.0
func UlidFromString ¶ added in v1.2.0
func UlidFromTime ¶ added in v1.2.0
Click to show internal directories.
Click to hide internal directories.