fixtures

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Code generated by construct, DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Donut

type Donut struct {
	Flavor string
	Size   int
}

type MyEmbeddedType

type MyEmbeddedType struct {
	Fizz bool
	Buzz bool
}

MyEmbeddedType will be embedded in MyType

func (MyEmbeddedType) Equal added in v2.2.0

func (t MyEmbeddedType) Equal(other MyEmbeddedType) bool

type MyOtherType

type MyOtherType struct {
	ID uuid.UUID `read_col:"my_other_type.id" write_col:"id"`
}

type MyTargetTypeChangeSet added in v2.0.1

type MyTargetTypeChangeSet struct {
	ID         *uuid.UUID
	Foo        *string
	Bar        []byte
	Baz        *MyEmbeddedType
	LastTime   **time.Time
	LastUpdate *time.Time
	Donuts     []Donut
}

func DiffMyTargetType added in v2.2.0

func DiffMyTargetType(source MyType, target MyType) (c MyTargetTypeChangeSet)

func MyTargetTypeToChangeSet added in v2.0.1

func MyTargetTypeToChangeSet(r MyType) (c MyTargetTypeChangeSet)

func (MyTargetTypeChangeSet) Empty added in v2.2.0

func (c MyTargetTypeChangeSet) Empty() bool

type MyType

type MyType struct {
	construct.Table `table_name:"my_type"`

	// ID is readable and writable
	ID uuid.UUID `read_col:"my_type.id" write_col:"id"`
	// Foo is readable and sortable
	Foo string `read_col:"my_type.foo,sortable" write_col:"foo"`
	// Bar is readable and writable (from a column with different name)
	Bar []byte `read_col:"my_type.the_bar" write_col:"the_bar"`
	// Baz should be embedded as JSON
	Baz MyEmbeddedType `read_col:"my_type.baz" write_col:"baz,json"`
	// LastTime is a readable, sortable and writable pointer column
	LastTime *time.Time `read_col:"my_type.last_time,sortable" write_col:"last_time"`
	// LastUpdate is a readable, sortable and writable non-pointer time.Time column that is also named differently
	LastUpdate time.Time `read_col:"my_type.updated_at,sortable" write_col:"updated_at,nodiff"`
	// Donuts is a readable and writable slice of non-pointer Donut structs
	Donuts []Donut `read_col:"my_type.donuts" write_col:"donuts,json"`
}

MyType is a fixture struct type

type NoStructMappingType

type NoStructMappingType struct {
	ID uuid.UUID
}

Directories

Path Synopsis
Code generated by construct, DO NOT EDIT.
Code generated by construct, DO NOT EDIT.

Jump to

Keyboard shortcuts

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