testmodels

package
v6.3.0 Latest Latest
Warning

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

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

Documentation

Overview

Code generated by deep-gen. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Detail

type Detail struct {
	Age     int
	Address string `json:"addr"`
}

func (*Detail) Clone

func (t *Detail) Clone() *Detail

Clone returns a deep copy of t.

func (*Detail) Diff

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

Diff compares t with other and returns a Patch.

func (*Detail) Equal

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

Equal returns true if t and other are deeply equal.

func (*Detail) Patch

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

Patch applies p to t using the generated fast path.

type User

type User struct {
	ID    int            `json:"id"`
	Name  string         `json:"full_name"`
	Info  Detail         `json:"info"`
	Roles []string       `json:"roles"`
	Score map[string]int `json:"score"`
	Bio   crdt.Text      `json:"bio"`
	// contains filtered or unexported fields
}

func (*User) AgePtr

func (u *User) AgePtr() *int

AgePtr returns a pointer to the unexported age field for use in path selectors.

func (*User) Clone

func (t *User) Clone() *User

Clone returns a deep copy of t.

func (*User) Diff

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

Diff compares t with other and returns a Patch.

func (*User) Equal

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

Equal returns true if t and other are deeply equal.

func (*User) Patch

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

Patch applies p to t using the generated fast path.

Directories

Path Synopsis
Code generated by deep-gen.
Code generated by deep-gen.
Package graph holds models whose types can reach themselves: directly, and through every reference kind the generator emits code for — pointers, slices of pointers, slices of values, maps of pointers and maps of values.
Package graph holds models whose types can reach themselves: directly, and through every reference kind the generator emits code for — pointers, slices of pointers, slices of values, maps of pointers and maps of values.
Package multirun holds two types generated by two separate deep-gen runs over the same package — the documented workflow for splitting generation.
Package multirun holds two types generated by two separate deep-gen runs over the same package — the documented workflow for splitting generation.
Package record holds a document shaped like one a handful of independent services would share: a row in a store, held as a serialized blob, whose fields are each owned by a different writer.
Package record holds a document shaped like one a handful of independent services would share: a row in a store, held as a serialized blob, whose fields are each owned by a different writer.
Code generated by deep-gen.
Code generated by deep-gen.

Jump to

Keyboard shortcuts

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