core

package module
v0.0.0-...-61f89eb Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: MIT Imports: 7 Imported by: 2

Documentation

Overview

Package core - core types like ID and Path.

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

Types

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

func (Path) Parent

func (p Path) Parent() Path

func (Path) Valid

func (p Path) Valid() error

Source Files

  • core.go
  • id.go

Directories

Path Synopsis
Package assert - lightweight test assertion helpers.
Package assert - lightweight test assertion helpers.
Package dbi - database abstraction with transaction management and pagination helpers.
Package dbi - database abstraction with transaction management and pagination helpers.
Package iam - identity and access management interfaces for users, sessions, roles, grants, and tenants.
Package iam - identity and access management interfaces for users, sessions, roles, grants, and tenants.
Package outbox - event outbox and task queue with fan-out delivery.
Package outbox - event outbox and task queue with fan-out delivery.
Package routes - HTTP route registration with request/response type metadata.
Package routes - HTTP route registration with request/response type metadata.
Package throttle - token bucket rate limiting.
Package throttle - token bucket rate limiting.
Package tokens - temporary token storage with expiration.
Package tokens - temporary token storage with expiration.

Jump to

Keyboard shortcuts

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