domain

package module
v0.0.0-...-7e42cdb Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

README

go-domain

Domain base objects in go inspired by domain driven design from Eric Evans

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateId

func GenerateId() string

Types

type Entity

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

func New

func New() *Entity

func NewEntity

func NewEntity(id string,
	createdAt, modifiedAt time.Time,
	createdBy, modifiedBy string,
	deletedDate time.Time,
	deletedBy string,
) *Entity

func NewEntityWithId

func NewEntityWithId(id string) *Entity

func (*Entity) CreatedAt

func (e *Entity) CreatedAt() time.Time

func (*Entity) CreatedBy

func (e *Entity) CreatedBy() string

func (*Entity) Delete

func (e *Entity) Delete(userId string)

func (*Entity) DeletedBy

func (e *Entity) DeletedBy() string

func (*Entity) DeletedDate

func (e *Entity) DeletedDate() time.Time

func (*Entity) Id

func (e *Entity) Id() string

func (*Entity) IsDeleted

func (e *Entity) IsDeleted() bool

func (*Entity) IsNew

func (e *Entity) IsNew() bool

func (*Entity) ModifiedAt

func (e *Entity) ModifiedAt() time.Time

func (*Entity) ModifiedBy

func (e *Entity) ModifiedBy() string

func (*Entity) Restore

func (e *Entity) Restore()

Jump to

Keyboard shortcuts

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