external

package
v6.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Code generated by deep-gen. DO NOT EDIT.

Package external holds models whose fields refer to types declared outside the generated package. It exercises deep-gen's type resolution and import emission; the checked-in job_deep.go is compiled as part of the build, so a generator that emits invalid code for these types breaks the build.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job struct {
	StartAt  *time.Time            `json:"startAt"`
	Deadline time.Time             `json:"deadline"`
	Timeout  time.Duration         `json:"timeout"`
	Window   []time.Time           `json:"window"`
	Retries  map[string]*time.Time `json:"retries"`
	Stages   []Stage               `json:"stages"`
	Owners   map[string]*Stage     `json:"owners"`
	Priority Priority              `json:"priority"`
	Notes    crdt.Text             `json:"notes"`
	Title    crdt.LWW[string]      `json:"title"`
	History  crdt.LWW[[]int]       `json:"history"`
	Checked  clock.Time            `json:"checked"`
	Grid     [2]int                `json:"grid"`
	Done     chan struct{}         `json:"done"`
}

func (*Job) Clone

func (t *Job) Clone() *Job

Clone returns a deep copy of t.

Job values can hold two references to the same value — through a cycle, or through two routes to one pointer — so the copy keeps track of what it has already copied: a value reached more than once is copied once, every reference to it in the result points at that one copy, and a reference cycle is rebuilt rather than followed forever.

func (*Job) Diff

func (t *Job) Diff(other *Job) deep.Patch[Job]

Diff compares t with other and returns a Patch.

Job values can hold two references to the same value, so a pair of values is diffed once, at the first path that reaches it. Every later route to a changed pair becomes one alias operation — "make this path hold the object that path holds" — appended after the rest. That keeps the patch linear where listing every route could be exponential, and applying it rebuilds the sharing whatever the target looked like before.

func (*Job) Equal

func (t *Job) Equal(other *Job) bool

Equal returns true if t and other are deeply equal.

Job values can hold two references to the same value, so a pair of values is compared once however many routes lead to it, and a cycle is followed only until it repeats.

func (*Job) Patch

func (t *Job) Patch(p deep.Patch[Job], logger *slog.Logger) error

Patch applies p to t using the generated fast path.

type Priority

type Priority int

Priority is a named type over a builtin: it has no generated methods.

type Stage

type Stage struct {
	Name string    `json:"name"`
	At   time.Time `json:"at"`
}

Stage is a struct in this package, so it does have generated methods.

func (*Stage) Clone

func (t *Stage) Clone() *Stage

Clone returns a deep copy of t.

func (*Stage) Diff

func (t *Stage) Diff(other *Stage) deep.Patch[Stage]

Diff compares t with other and returns a Patch.

func (*Stage) Equal

func (t *Stage) Equal(other *Stage) bool

Equal returns true if t and other are deeply equal.

func (*Stage) Patch

func (t *Stage) Patch(p deep.Patch[Stage], logger *slog.Logger) error

Patch applies p to t using the generated fast path.

Jump to

Keyboard shortcuts

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