core

package module
v0.0.0-...-0ff5b8e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2026 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

This section is empty.

Types

type Clock

type Clock interface {
	Now() time.Time
}

type ID

type ID struct {
	// contains filtered or unexported fields
}

func NewID

func NewID() ID

func ParseID

func ParseID(s string) (ID, error)

ParseID parses a string into an ID

func (ID) Compare

func (id ID) Compare(other ID) int

Compare returns -1 if id < other, 0 if id == other, 1 if id > other. IDs are compared lexicographically, which matches byte-order comparison because the encoding preserves sort order.

func (ID) Equal

func (id ID) Equal(other ID) bool

Equal returns true if this ID equals the other ID

func (ID) IsZero

func (id ID) IsZero() bool

IsZero returns true if the ID is the zero value

func (ID) MarshalBinary

func (id ID) MarshalBinary() ([]byte, error)

func (ID) MarshalText

func (id ID) MarshalText() ([]byte, error)

func (*ID) Scan

func (id *ID) Scan(src any) error

Scan implements sql.Scanner for SQL retrieval (reads from text)

func (ID) String

func (id ID) String() string

func (*ID) UnmarshalBinary

func (id *ID) UnmarshalBinary(data []byte) error

func (*ID) UnmarshalText

func (id *ID) UnmarshalText(data []byte) error

func (ID) Value

func (id ID) Value() (driver.Value, error)

Value implements driver.Valuer for SQL storage (stores as text)

type Page

type Page[T any] struct {
	Items  []T
	Cursor string
}

type PageReq

type PageReq struct {
	Limit  int
	Cursor string
}

type Path

type Path string

Source Files

  • clock.go
  • core.go
  • id.go

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL