testmodels

package
v5.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 8 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.

Jump to

Keyboard shortcuts

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