valueobject

package
v0.0.0-...-30d05de Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDescriptionCannotBeEmpty = errors.New("Description cannot be empty")
)
View Source
var (
	ErrInvalidAllocation = errors.New("invalid allocation")
)
View Source
var (
	ErrNameCannotBeEmpty = errors.New("Name cannot be empty")
)

Functions

This section is empty.

Types

type Allocation

type Allocation struct {
	// contains filtered or unexported fields
}

func NewAllocation

func NewAllocation(value int) (*Allocation, error)

func (*Allocation) Equals

func (a *Allocation) Equals(value ValueObject) bool

func (*Allocation) GetValue

func (a *Allocation) GetValue() int

func (*Allocation) Scan

func (n *Allocation) Scan(value interface{}) error

func (*Allocation) Value

func (n *Allocation) Value() (driver.Value, error)

type Description

type Description struct {
	// contains filtered or unexported fields
}

func NewDescription

func NewDescription(value string) (*Description, error)

func (*Description) Equals

func (n *Description) Equals(value ValueObject) bool

func (*Description) GetValue

func (n *Description) GetValue() string

func (*Description) Scan

func (n *Description) Scan(value interface{}) error

func (*Description) Value

func (n *Description) Value() (driver.Value, error)

type Name

type Name struct {
	// contains filtered or unexported fields
}

func NewName

func NewName(value string) (*Name, error)

func (*Name) Equals

func (n *Name) Equals(value ValueObject) bool

func (*Name) GetValue

func (n *Name) GetValue() string

func (*Name) Scan

func (n *Name) Scan(value interface{}) error

func (*Name) Value

func (n *Name) Value() (driver.Value, error)

type ValueObject

type ValueObject interface {
	Equals(value ValueObject) bool
	Scan(value interface{}) error
	Value() (driver.Value, error)
}

Jump to

Keyboard shortcuts

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