base

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Example usage of the base value object types

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomStringValueObject

type CustomStringValueObject struct {
	base.StringValueObject
}

CustomStringValueObject is a custom string-based value object

func NewCustomStringValueObject

func NewCustomStringValueObject(value string) (CustomStringValueObject, error)

NewCustomStringValueObject creates a new CustomStringValueObject

func (CustomStringValueObject) Equals

Equals checks if two CustomStringValueObjects are equal

func (CustomStringValueObject) EqualsIgnoreCase

func (vo CustomStringValueObject) EqualsIgnoreCase(other CustomStringValueObject) bool

EqualsIgnoreCase checks if two CustomStringValueObjects are equal, ignoring case

type CustomStructValueObject

type CustomStructValueObject struct {
	base.BaseStructValueObject
	// contains filtered or unexported fields
}

CustomStructValueObject is a custom struct-based value object

func NewCustomStructValueObject

func NewCustomStructValueObject(name string, age int) (CustomStructValueObject, error)

NewCustomStructValueObject creates a new CustomStructValueObject

func (CustomStructValueObject) Equals

Equals implements the Equatable interface

func (CustomStructValueObject) IsEmpty

func (vo CustomStructValueObject) IsEmpty() bool

IsEmpty implements the ValueObject interface

func (CustomStructValueObject) String

func (vo CustomStructValueObject) String() string

String implements the ValueObject interface

func (CustomStructValueObject) ToMap

func (vo CustomStructValueObject) ToMap() map[string]interface{}

ToMap implements the StructValueObject interface

func (CustomStructValueObject) Validate

func (vo CustomStructValueObject) Validate() error

Validate implements the Validatable interface

Jump to

Keyboard shortcuts

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