concepts

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package concepts aliases Fundamentals.Go's portable UUID and calendar scalars. Values are immutable by convention and safe to copy. They are not Chronicle event source IDs: those may be arbitrary strings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Concept

type Concept[T any] = fconcepts.Concept[T]

Concept declares a domain value's scalar representation. The value must also implement JSON and text marshalers, and its pointer JSON and text unmarshalers. Arc validates declarations without invoking ConceptValue or the codecs. T must be an exact supported primitive or shared scalar, not another concept. This alias has the same identity as Fundamentals.Go's Concept.

type DateOnly

type DateOnly = fconcepts.DateOnly

DateOnly is a Gregorian date in years 0001 through 9999, without a time zone. The zero value is 0001-01-01. JSON is the invariant yyyy-MM-dd string. It is an alias of the shared Fundamentals.Go type.

func NewDateOnly

func NewDateOnly(year int, month time.Month, day int) (DateOnly, error)

NewDateOnly validates a date; impossible dates are errors, not normalized.

func ParseDateOnly

func ParseDateOnly(text string) (DateOnly, error)

ParseDateOnly accepts invariant yyyy-MM-dd, not culture-dependent dates.

type TimeOnly

type TimeOnly = fconcepts.TimeOnly

TimeOnly is a time of day with .NET's 100-nanosecond precision and no zone. Its zero value is midnight; JSON always includes seven fractional digits. It is an alias of the shared Fundamentals.Go type.

func NewTimeOnly

func NewTimeOnly(ticks int64) (TimeOnly, error)

NewTimeOnly accepts ticks since midnight in [0, 864000000000).

func ParseTimeOnly

func ParseTimeOnly(text string) (TimeOnly, error)

ParseTimeOnly accepts HH:mm:ss with an optional one-to-seven digit fraction.

type TimeSpan

type TimeSpan = fconcepts.TimeSpan

TimeSpan is a signed .NET duration in 100-nanosecond ticks. Unlike time.Duration, it preserves the entire int64 tick range. Zero is a duration of zero. It is an alias of the shared Fundamentals.Go type.

func ParseTimeSpan

func ParseTimeSpan(text string) (TimeSpan, error)

ParseTimeSpan accepts [-][d.]HH:mm:ss[.fffffff] in invariant constant format.

type UUID

type UUID = fconcepts.UUID

UUID contains 16 bytes in RFC network order, not .NET Guid.ToByteArray order. Its zero value is Guid.Empty. JSON and text use lowercase dashed notation. It is an alias of the shared Fundamentals.Go type. A new named type based on UUID must explicitly forward its codec methods.

func NewUUID

func NewUUID() (UUID, error)

NewUUID returns a cryptographically random version 4 UUID.

func ParseUUID

func ParseUUID(text string) (UUID, error)

ParseUUID accepts the dashed Guid D format, including uppercase hex digits.

Jump to

Keyboard shortcuts

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