libdomain

package
v0.0.0-...-437541a Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const OnDeleteCascade = OnDeleteValue("CASCADE")
View Source
const OnDeleteProtect = OnDeleteValue("PROTECT")
View Source
const OnDeleteSetNull = OnDeleteValue("SET NULL")
View Source
const RepeatedPropertyType = PropertyType("RepeatedPropertyType")
View Source
const STRING = "string"

STRING is a contains reprensenting the widely used string type.

Variables

View Source
var PrepareEntity func(*EntityDefinition)
View Source
var SetAggregateIDProperty func(string) Property

Functions

func PatchFromText

func PatchFromText(data string) []diffmatchpatch.Patch

Types

type Aggregate

type Aggregate interface {
	Definition() *AggregateDefinition
	IdentityInterface() AggregateIdentity
	UnmutatedVersion() int
	MutatingEvents() []DomainEvent
	Mutated()
	Map() map[string]interface{}
}

type AggregateDefinition

type AggregateDefinition struct {
	AggregateRoot       *EntityDefinition
	Children            []*EntityDefinition
	Enums               []*EnumDefinition
	Events              []*EventDefinition
	RepositoryFunctions []*CustomRequest
	UseTenants          bool

	ValueObjects []*ValueObjectDefinition

	Queries  []*CustomRequest
	Commands []*CustomRequest

	ExternalData []*ExternalData
	// contains filtered or unexported fields
}

Definition is used to declare the information of a model, so it can generate its code.

func (*AggregateDefinition) EntitiesWithIDFields

func (a *AggregateDefinition) EntitiesWithIDFields() []*EntityWithIDFields

func (*AggregateDefinition) GetCommandByName

func (a *AggregateDefinition) GetCommandByName(name string) *CustomRequest

func (*AggregateDefinition) GetCustomRequests

func (a *AggregateDefinition) GetCustomRequests() []*CustomRequest

func (*AggregateDefinition) GetEntities

func (a *AggregateDefinition) GetEntities() []*EntityDefinition

func (*AggregateDefinition) GetEntityByName

func (a *AggregateDefinition) GetEntityByName(name string) *EntityDefinition

func (*AggregateDefinition) GetTables

func (a *AggregateDefinition) GetTables() []TableInterface

func (*AggregateDefinition) GetValueObjectByName

func (a *AggregateDefinition) GetValueObjectByName(name string) *ValueObjectDefinition

type AggregateIdentity

type AggregateIdentity interface {
	GetIDAsString() string
	TenantID() TenantID
}

type AggregateInterface

type AggregateInterface interface {
	Definition() *AggregateDefinition
}

Definition is used to declare the information of a model, so it can generate its code.

type ApplicationContext

type ApplicationContext interface {
	Workflow() *Workflow
	Commit(error) error
	DomainEventPublisherInstance() *DomainEventPublisherInstance
}

type ArgsInterface

type ArgsInterface interface {
	GetName() string
	Title() string
	ProtoType() string
	GoType() string
	GoTypeBase() string
	GoNil() string
	GetRequired() bool
	GraphqlSchemaType() string
	GetReferenceName() string
	GetReference() TableInterface
	SetReference(e TableInterface)
	Type() PropertyType
	CollectionType() PropertyType
	IsRepeated() bool
	IsTranslatable() bool
	GetTranslatable() TranslatableType
	GetData() bool
	FromDomain() bool
	SetFromDomain(bool)
	Owner() OwnerInterface
	SetOwner(OwnerInterface)
}

type BooleanDiff

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

func NewBooleanDiff

func NewBooleanDiff(old, new bool) *BooleanDiff

func (*BooleanDiff) New

func (t *BooleanDiff) New() bool

func (*BooleanDiff) Old

func (t *BooleanDiff) Old() bool

type CustomRequest

type CustomRequest struct {
	Name       string
	Event      string
	OnFactory  bool
	Repository bool
	Args       []ArgsInterface
	Results    []ArgsInterface
	// contains filtered or unexported fields
}

func (*CustomRequest) IsCommand

func (f *CustomRequest) IsCommand() bool

func (*CustomRequest) SetCreate

func (f *CustomRequest) SetCreate()

func (*CustomRequest) SetTableDefinition

func (f *CustomRequest) SetTableDefinition(t TableInterface)

func (*CustomRequest) TableDefinition

func (f *CustomRequest) TableDefinition() TableInterface

func (*CustomRequest) Title

func (f *CustomRequest) Title() string

func (*CustomRequest) Type

func (f *CustomRequest) Type() string

type DBType

type DBType struct {
	Type  string
	Value string
}

type Definitions

type Definitions struct {
	Package    string
	Repository string
	// contains filtered or unexported fields
}

func (*Definitions) ControlReferences

func (ds *Definitions) ControlReferences()

func (*Definitions) GetByID

func (ds *Definitions) GetByID(id string) *AggregateDefinition

GetByID return the specified definition by its ID.

func (*Definitions) Register

func (ds *Definitions) Register(a *AggregateDefinition)

Register is used to register a new definition into the service.

func (*Definitions) RepositoryGen

func (ds *Definitions) RepositoryGen() string

func (*Definitions) Slice

func (ds *Definitions) Slice() []*AggregateDefinition

Slice return the definitions as a slice.

type DomainEvent

type DomainEvent interface {
	Type() EventType
	TypeVersion() int
	OccurredAt() time.Time
	OccurredBy() string
	Diff() DomainEventDiff
	Map() map[string]interface{}
	DispatchToStream(ApplicationContext, Aggregate) *Stream
}

type DomainEventDiff

type DomainEventDiff interface {
	Map() map[string]interface{}
}

type DomainEventPublisher

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

func NewDomainEventPublisher

func NewDomainEventPublisher() *DomainEventPublisher

func (*DomainEventPublisher) Instance

func (*DomainEventPublisher) Subscribe

func (d *DomainEventPublisher) Subscribe(aSubscriber *DomainEventSubscriber) error

type DomainEventPublisherInstance

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

func (*DomainEventPublisherInstance) Publish

func (d *DomainEventPublisherInstance) Publish(ctx ApplicationContext, aggregate interface{}, event DomainEvent) error

func (*DomainEventPublisherInstance) Subscribe

func (d *DomainEventPublisherInstance) Subscribe(aSubscriber *DomainEventSubscriber) error

type DomainEventSubscriber

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

func NewDomainEventSubscriber

func NewDomainEventSubscriber(handleEvent func(ctx ApplicationContext, aggregate interface{}, event interface{}) error, subscribedToEventType func() EventType) *DomainEventSubscriber

func (*DomainEventSubscriber) HandleEvent

func (d *DomainEventSubscriber) HandleEvent(ctx ApplicationContext, aggregate interface{}, event interface{}) error

func (*DomainEventSubscriber) SubscribedToEventType

func (d *DomainEventSubscriber) SubscribedToEventType() EventType

type EntityCommandsDefinition

type EntityCommandsDefinition struct {
	Create         *RequestConfig
	Update         *RequestConfig
	Delete         *RequestConfig
	CustomCommands []*CustomRequest
}

type EntityDefinition

type EntityDefinition struct {
	Aggregate AggregateInterface

	Name            string
	Keys            []Property
	Properties      []Property
	UniqueProperty  string
	DisableID       bool
	DisableDatetime bool
	Methods         []*CustomRequest
	Queries         *EntityQueriesDefinition
	Commands        *EntityCommandsDefinition
	UseOneOf        bool
	// useTenants bool
	DisableDatabaseStore bool
	SafeDelete           bool
	Abstract             bool
	NoCache              bool
	// contains filtered or unexported fields
}

func (*EntityDefinition) AggregateDefinition

func (t *EntityDefinition) AggregateDefinition() *AggregateDefinition

func (*EntityDefinition) DomainPackage

func (t *EntityDefinition) DomainPackage() string

func (*EntityDefinition) DomainPath

func (t *EntityDefinition) DomainPath() string

func (*EntityDefinition) GetAbstract

func (t *EntityDefinition) GetAbstract() bool

func (*EntityDefinition) GetCommands

func (t *EntityDefinition) GetCommands() *EntityCommandsDefinition

func (*EntityDefinition) GetDisableDatabaseStore

func (t *EntityDefinition) GetDisableDatabaseStore() bool

func (*EntityDefinition) GetDisableDatetime

func (t *EntityDefinition) GetDisableDatetime() bool

func (*EntityDefinition) GetDisableID

func (t *EntityDefinition) GetDisableID() bool

func (*EntityDefinition) GetKeys

func (t *EntityDefinition) GetKeys() []Property

func (*EntityDefinition) GetName

func (t *EntityDefinition) GetName() string

func (*EntityDefinition) GetNoCache

func (t *EntityDefinition) GetNoCache() bool

func (*EntityDefinition) GetProperties

func (t *EntityDefinition) GetProperties() []Property

func (*EntityDefinition) GetType

func (t *EntityDefinition) GetType() string

func (*EntityDefinition) GetUseOneOf

func (t *EntityDefinition) GetUseOneOf() bool

func (*EntityDefinition) HasTranslatable

func (t *EntityDefinition) HasTranslatable() bool

func (*EntityDefinition) IsAggregateRoot

func (t *EntityDefinition) IsAggregateRoot() bool

func (*EntityDefinition) IsEntity

func (t *EntityDefinition) IsEntity() bool

func (*EntityDefinition) NestedProperties

func (t *EntityDefinition) NestedProperties() []Property

func (*EntityDefinition) Snake

func (t *EntityDefinition) Snake() string

func (*EntityDefinition) StoredProperties

func (t *EntityDefinition) StoredProperties() []Property
func (t *EntityDefinition) setUseTenants(useTenants bool) {
	t.useTenants = useTenants
}

func (*EntityDefinition) Title

func (t *EntityDefinition) Title() string

func (*EntityDefinition) UniquePropertyID

func (t *EntityDefinition) UniquePropertyID() TableInterface

func (*EntityDefinition) UniquePropertyName

func (t *EntityDefinition) UniquePropertyName() string

func (*EntityDefinition) UniquePropertyTitle

func (t *EntityDefinition) UniquePropertyTitle() string

func (*EntityDefinition) Upper

func (f *EntityDefinition) Upper() string

func (*EntityDefinition) UseTenants

func (t *EntityDefinition) UseTenants() bool

type EntityQueriesDefinition

type EntityQueriesDefinition struct {
	Get            *RequestConfig
	List           *RequestConfig
	GetFromEvents  *RequestConfig
	CustomCommands []*CustomRequest
}

type EntityWithIDFields

type EntityWithIDFields struct {
	Entity TableInterface
	Fields []string
}

type EnumDefinition

type EnumDefinition struct {
	Package string
	Path    string
	Name    string
	Values  []string
}

func (*EnumDefinition) AggregateDefinition

func (t *EnumDefinition) AggregateDefinition() *AggregateDefinition

func (*EnumDefinition) DomainPackage

func (t *EnumDefinition) DomainPackage() string

func (*EnumDefinition) DomainPath

func (t *EnumDefinition) DomainPath() string

func (*EnumDefinition) GetAbstract

func (t *EnumDefinition) GetAbstract() bool

func (*EnumDefinition) GetCommands

func (t *EnumDefinition) GetCommands() *EntityCommandsDefinition

func (*EnumDefinition) GetDisableDatabaseStore

func (t *EnumDefinition) GetDisableDatabaseStore() bool

func (*EnumDefinition) GetDisableDatetime

func (t *EnumDefinition) GetDisableDatetime() bool

func (*EnumDefinition) GetDisableID

func (t *EnumDefinition) GetDisableID() bool

func (*EnumDefinition) GetKeys

func (t *EnumDefinition) GetKeys() []Property

func (*EnumDefinition) GetName

func (t *EnumDefinition) GetName() string

func (*EnumDefinition) GetNoCache

func (t *EnumDefinition) GetNoCache() bool

func (*EnumDefinition) GetProperties

func (t *EnumDefinition) GetProperties() []Property

func (*EnumDefinition) GetType

func (t *EnumDefinition) GetType() string

func (*EnumDefinition) GetUseOneOf

func (t *EnumDefinition) GetUseOneOf() bool

func (*EnumDefinition) HasTranslatable

func (t *EnumDefinition) HasTranslatable() bool

func (*EnumDefinition) IsAggregateRoot

func (t *EnumDefinition) IsAggregateRoot() bool

func (*EnumDefinition) IsEntity

func (t *EnumDefinition) IsEntity() bool

func (*EnumDefinition) NestedProperties

func (t *EnumDefinition) NestedProperties() []Property

func (*EnumDefinition) Snake

func (t *EnumDefinition) Snake() string

func (*EnumDefinition) StoredProperties

func (t *EnumDefinition) StoredProperties() []Property
func (t *EntityDefinition) setUseTenants(useTenants bool) {
	t.useTenants = useTenants
}

func (*EnumDefinition) Title

func (t *EnumDefinition) Title() string

func (*EnumDefinition) UniquePropertyID

func (t *EnumDefinition) UniquePropertyID() TableInterface

func (*EnumDefinition) UniquePropertyName

func (t *EnumDefinition) UniquePropertyName() string

func (*EnumDefinition) UniquePropertyTitle

func (t *EnumDefinition) UniquePropertyTitle() string

func (*EnumDefinition) Upper

func (f *EnumDefinition) Upper() string

func (*EnumDefinition) UseTenants

func (t *EnumDefinition) UseTenants() bool

type EventDefinition

type EventDefinition struct {
	Name     string
	Versions []*EventVersionDefinition
}

func (*EventDefinition) Title

func (r *EventDefinition) Title() string

type EventDispatcher

type EventDispatcher interface {
	DispatchEvent(ctx context.Context, aggregate string, payload []byte) error
	Subscribe(ctx context.Context, consumer string, stream string, subject string, function func([]byte) error) (interface{}, error)
	Publish(string, []byte) error
	NewInbox() string
	SubscribeSync(string) (EventDispatcherSubscription, error)
}

type EventDispatcherSubscription

type EventDispatcherSubscription interface {
	NextMsg(time.Duration) ([]byte, error)
}

type EventHistory

type EventHistory struct {
	ID           string
	Version      int
	Event        string
	EventVersion int
	Diff         string
	Payload      string
	OccurredAt   time.Time
	OccurredBy   string
}

type EventOld

type EventOld struct {
	ID          string
	Aggregate   interface{}
	AggregateID string
	Name        string
	Payload     map[string]interface{}
}

type EventSourcedRootEntity

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

func NewEventSourcedRootEntity

func NewEventSourcedRootEntity(version int, when func(DomainEvent)) *EventSourcedRootEntity

func (*EventSourcedRootEntity) Apply

func (e *EventSourcedRootEntity) Apply(event DomainEvent)

func (*EventSourcedRootEntity) Mutated

func (e *EventSourcedRootEntity) Mutated()

func (*EventSourcedRootEntity) MutatingEvents

func (e *EventSourcedRootEntity) MutatingEvents() []DomainEvent

func (*EventSourcedRootEntity) UnmutatedVersion

func (e *EventSourcedRootEntity) UnmutatedVersion() int

func (*EventSourcedRootEntity) Version

func (e *EventSourcedRootEntity) Version() int

type EventType

type EventType string

type EventVersionDefinition

type EventVersionDefinition struct {
	Version    int
	Properties []Property
	// contains filtered or unexported fields
}

func (*EventVersionDefinition) IsLast

func (r *EventVersionDefinition) IsLast() bool

type ExternalData

type ExternalData struct {
	Aggregate AggregateInterface
	TenantID  string
	Module    string
	Data      []map[string]string
}

type File

type File struct {
	Filename    string
	Content     []byte
	ContentType string
	Size        int
}

type FloatDiff

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

func NewFloatDiff

func NewFloatDiff(old, new float64) *FloatDiff

func (*FloatDiff) New

func (t *FloatDiff) New() float64

func (*FloatDiff) Old

func (t *FloatDiff) Old() float64

type GetWYSIWYGProperties

type GetWYSIWYGProperties struct {
	TranslatedTerms bool
	Assets          bool
}

type IDType

type IDType string

type IntegerDiff

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

func NewIntegerDiff

func NewIntegerDiff(old, new int) *IntegerDiff

func (*IntegerDiff) New

func (t *IntegerDiff) New() int

func (*IntegerDiff) Old

func (t *IntegerDiff) Old() int

type JWTClaims

type JWTClaims struct {
	*jwt.StandardClaims
	TenantID  TenantID
	UserID    string
	UserEmail string
	Groups    []interface{}
}

type OnDeleteValue

type OnDeleteValue string

type OwnerInterface

type OwnerInterface interface {
	Title() string
}

type PackageLocation

type PackageLocation struct {
	Package string
	Path    string
}

type Property

type Property interface {
	GetName() string
	NameWithoutID() string
	Title() string
	TitleWithoutID() string
	Snake() string
	Upper() string
	Type() PropertyType
	GoType() string
	GoTypeWithPackage() string
	GoTypeID() string
	GoTypeIDWithPackage() string
	GoTypeBase() string
	GoNil() string
	JSONType() string
	ProtoType() string
	ProtoTypeArg() string
	ProtoTypeOptional() string
	DBType() *DBType
	DiffType(string) string
	DiffTypeNew(string) string
	GraphqlType() string
	GraphqlSchemaType() string
	GetReferenceName() string
	GetReference() TableInterface
	// GetReferenceDefinition() *ModelDefinition
	SetReference(TableInterface)
	GetInverseProperty() string
	GetRequired() bool
	GetPrimaryKey() bool
	// GetFieldData() *FieldData
	IsStored() bool
	IsNested() bool
	GetWithEntity() bool
	SetPosition(int)
	GetPosition() int
	IsRepeated() bool
	IsTranslatable() bool
	GetTranslatable() TranslatableType
	GetData() bool
	GetReturnDetailsInTests() bool
	GetLoadedPosition() int
	GetLoadedPositionMany2one() int
	GetPositionMany2one() int
	CollectionType() PropertyType
	FromDomain() bool
	SetFromDomain(bool)
	Owner() OwnerInterface
	SetOwner(OwnerInterface)
}

Field is an interface to get the data from the field.

type PropertyType

type PropertyType string

FieldType is the generic type for a data field.

type RepeatedProperty

type RepeatedProperty struct {
	Property Property
}

func (*RepeatedProperty) CollectionType

func (r *RepeatedProperty) CollectionType() PropertyType

func (*RepeatedProperty) DBType

func (r *RepeatedProperty) DBType() *DBType

func (*RepeatedProperty) DiffType

func (r *RepeatedProperty) DiffType(pack string) string

func (*RepeatedProperty) DiffTypeNew

func (r *RepeatedProperty) DiffTypeNew(pack string) string

func (*RepeatedProperty) FromDomain

func (r *RepeatedProperty) FromDomain() bool

func (*RepeatedProperty) GetData

func (r *RepeatedProperty) GetData() bool

func (*RepeatedProperty) GetInverseProperty

func (r *RepeatedProperty) GetInverseProperty() string

func (*RepeatedProperty) GetLoadedPosition

func (r *RepeatedProperty) GetLoadedPosition() int

func (*RepeatedProperty) GetLoadedPositionMany2one

func (r *RepeatedProperty) GetLoadedPositionMany2one() int

func (*RepeatedProperty) GetName

func (r *RepeatedProperty) GetName() string

func (*RepeatedProperty) GetPosition

func (r *RepeatedProperty) GetPosition() int

func (*RepeatedProperty) GetPositionMany2one

func (r *RepeatedProperty) GetPositionMany2one() int

func (*RepeatedProperty) GetPrimaryKey

func (r *RepeatedProperty) GetPrimaryKey() bool

func (*RepeatedProperty) GetReference

func (r *RepeatedProperty) GetReference() TableInterface

func (*RepeatedProperty) GetReferenceName

func (r *RepeatedProperty) GetReferenceName() string

func (*RepeatedProperty) GetRequired

func (r *RepeatedProperty) GetRequired() bool

func (*RepeatedProperty) GetReturnDetailsInTests

func (r *RepeatedProperty) GetReturnDetailsInTests() bool

func (*RepeatedProperty) GetTranslatable

func (r *RepeatedProperty) GetTranslatable() TranslatableType

func (*RepeatedProperty) GoNil

func (r *RepeatedProperty) GoNil() string

func (*RepeatedProperty) GoType

func (r *RepeatedProperty) GoType() string

func (*RepeatedProperty) GoTypeBase

func (r *RepeatedProperty) GoTypeBase() string

func (*RepeatedProperty) GoTypeID

func (r *RepeatedProperty) GoTypeID() string

func (*RepeatedProperty) GraphqlSchemaType

func (r *RepeatedProperty) GraphqlSchemaType() string

func (*RepeatedProperty) GraphqlType

func (r *RepeatedProperty) GraphqlType() string

func (*RepeatedProperty) IsNested

func (r *RepeatedProperty) IsNested() bool

func (*RepeatedProperty) IsRepeated

func (r *RepeatedProperty) IsRepeated() bool

func (*RepeatedProperty) IsStored

func (r *RepeatedProperty) IsStored() bool

func (*RepeatedProperty) IsTranslatable

func (r *RepeatedProperty) IsTranslatable() bool

func (*RepeatedProperty) JSONType

func (r *RepeatedProperty) JSONType() string

func (*RepeatedProperty) LoadedPosition

func (r *RepeatedProperty) LoadedPosition() int

func (*RepeatedProperty) LoadedPositionMany2one

func (r *RepeatedProperty) LoadedPositionMany2one() int

func (*RepeatedProperty) NameWithoutID

func (r *RepeatedProperty) NameWithoutID() string

func (*RepeatedProperty) Owner

func (r *RepeatedProperty) Owner() OwnerInterface

func (*RepeatedProperty) Position

func (r *RepeatedProperty) Position() int

func (*RepeatedProperty) PositionMany2one

func (r *RepeatedProperty) PositionMany2one() int

func (*RepeatedProperty) ProtoType

func (r *RepeatedProperty) ProtoType() string

func (*RepeatedProperty) ProtoTypeArg

func (r *RepeatedProperty) ProtoTypeArg() string

func (*RepeatedProperty) ProtoTypeOptional

func (r *RepeatedProperty) ProtoTypeOptional() string

func (*RepeatedProperty) SetFromDomain

func (r *RepeatedProperty) SetFromDomain(d bool)

func (*RepeatedProperty) SetOwner

func (r *RepeatedProperty) SetOwner(d OwnerInterface)

func (*RepeatedProperty) SetPosition

func (r *RepeatedProperty) SetPosition(position int)

func (*RepeatedProperty) SetReference

func (r *RepeatedProperty) SetReference(e TableInterface)

func (*RepeatedProperty) Snake

func (r *RepeatedProperty) Snake() string

func (*RepeatedProperty) Title

func (r *RepeatedProperty) Title() string

func (*RepeatedProperty) TitleWithoutID

func (r *RepeatedProperty) TitleWithoutID() string

func (*RepeatedProperty) Type

func (r *RepeatedProperty) Type() PropertyType

func (*RepeatedProperty) Upper

func (r *RepeatedProperty) Upper() string

type RepositoryDefinition

type RepositoryDefinition struct {
	Package             string
	Path                string
	Name                string
	AggregateName       string
	AggregateDefinition *AggregateDefinition
}

func (*RepositoryDefinition) AggregateTitle

func (r *RepositoryDefinition) AggregateTitle() string

func (*RepositoryDefinition) Title

func (r *RepositoryDefinition) Title() string

type RequestConfig

type RequestConfig struct {
}

type SliceDiff

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

func NewSliceDiff

func NewSliceDiff(old, new []string) *SliceDiff

func (*SliceDiff) New

func (t *SliceDiff) New() []string

func (*SliceDiff) Old

func (t *SliceDiff) Old() []string

type Stream

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

func NewStream

func NewStream(eventDispatcher EventDispatcher, streamName string) *Stream

func (*Stream) EventDispatcher

func (s *Stream) EventDispatcher() EventDispatcher

func (*Stream) StreamName

func (s *Stream) StreamName() string

type TableInterface

type TableInterface interface {
	GetName() string
	Title() string
	Snake() string
	Upper() string
	GetType() string
	IsEntity() bool
	UseTenants() bool
	GetDisableID() bool
	GetDisableDatetime() bool
	GetDisableDatabaseStore() bool
	GetUseOneOf() bool
	StoredProperties() []Property
	NestedProperties() []Property
	GetCommands() *EntityCommandsDefinition
	GetKeys() []Property
	GetProperties() []Property
	AggregateDefinition() *AggregateDefinition
	IsAggregateRoot() bool
	HasTranslatable() bool
	GetAbstract() bool
	GetNoCache() bool
	UniquePropertyName() string
	UniquePropertyTitle() string
	DomainPackage() string
	DomainPath() string
}

type TenantID

type TenantID IDType

type TextDiff

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

func NewTextDiff

func NewTextDiff(old, new string) *TextDiff

func (*TextDiff) New

func (t *TextDiff) New() string

func (*TextDiff) Old

func (t *TextDiff) Old() string

type TextPatchDiff

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

func NewTextPatchDiff

func NewTextPatchDiff(old string, patch []diffmatchpatch.Patch, pretty string, new string) *TextPatchDiff

func (*TextPatchDiff) New

func (t *TextPatchDiff) New() string

func (*TextPatchDiff) Old

func (t *TextPatchDiff) Old() string

func (*TextPatchDiff) Patch

func (t *TextPatchDiff) Patch() string

func (*TextPatchDiff) Pretty

func (t *TextPatchDiff) Pretty() string

type TimeDiff

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

func NewTimeDiff

func NewTimeDiff(old, new time.Time) *TimeDiff

func (*TimeDiff) New

func (t *TimeDiff) New() time.Time

func (*TimeDiff) Old

func (t *TimeDiff) Old() time.Time

type TranslatableType

type TranslatableType string

type ValueObjectDefinition

type ValueObjectDefinition struct {
	Aggregate AggregateInterface

	Name       string
	Keys       []Property
	Properties []Property
	Abstract   bool
	// contains filtered or unexported fields
}

func (*ValueObjectDefinition) AggregateDefinition

func (t *ValueObjectDefinition) AggregateDefinition() *AggregateDefinition

func (*ValueObjectDefinition) DomainPackage

func (t *ValueObjectDefinition) DomainPackage() string

func (*ValueObjectDefinition) DomainPath

func (t *ValueObjectDefinition) DomainPath() string

func (*ValueObjectDefinition) GetAbstract

func (t *ValueObjectDefinition) GetAbstract() bool

func (*ValueObjectDefinition) GetCommands

func (*ValueObjectDefinition) GetDisableDatabaseStore

func (t *ValueObjectDefinition) GetDisableDatabaseStore() bool

func (*ValueObjectDefinition) GetDisableDatetime

func (t *ValueObjectDefinition) GetDisableDatetime() bool

func (*ValueObjectDefinition) GetDisableID

func (t *ValueObjectDefinition) GetDisableID() bool

func (*ValueObjectDefinition) GetKeys

func (t *ValueObjectDefinition) GetKeys() []Property

func (*ValueObjectDefinition) GetName

func (t *ValueObjectDefinition) GetName() string

func (*ValueObjectDefinition) GetNoCache

func (t *ValueObjectDefinition) GetNoCache() bool

func (*ValueObjectDefinition) GetProperties

func (t *ValueObjectDefinition) GetProperties() []Property

func (*ValueObjectDefinition) GetType

func (t *ValueObjectDefinition) GetType() string

func (*ValueObjectDefinition) GetUseOneOf

func (t *ValueObjectDefinition) GetUseOneOf() bool

func (*ValueObjectDefinition) HasTranslatable

func (t *ValueObjectDefinition) HasTranslatable() bool

func (*ValueObjectDefinition) IsAggregateRoot

func (t *ValueObjectDefinition) IsAggregateRoot() bool

func (*ValueObjectDefinition) IsEntity

func (t *ValueObjectDefinition) IsEntity() bool

func (*ValueObjectDefinition) NestedProperties

func (t *ValueObjectDefinition) NestedProperties() []Property

func (*ValueObjectDefinition) Snake

func (t *ValueObjectDefinition) Snake() string

func (*ValueObjectDefinition) StoredProperties

func (t *ValueObjectDefinition) StoredProperties() []Property

func (*ValueObjectDefinition) Title

func (t *ValueObjectDefinition) Title() string

func (*ValueObjectDefinition) UniquePropertyName

func (t *ValueObjectDefinition) UniquePropertyName() string

func (*ValueObjectDefinition) UniquePropertyTitle

func (t *ValueObjectDefinition) UniquePropertyTitle() string

func (*ValueObjectDefinition) Upper

func (f *ValueObjectDefinition) Upper() string

func (*ValueObjectDefinition) UseTenants

func (t *ValueObjectDefinition) UseTenants() bool

type WYSIWYG

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

func NewWYSIWYG

func NewWYSIWYG(translatedTerms map[string]map[string]string, translatedTermsLoaded bool, assets []*WYSIWYGAsset, assetsLoaded bool) *WYSIWYG

func (*WYSIWYG) AllPropertiesLoaded

func (t *WYSIWYG) AllPropertiesLoaded()

func (*WYSIWYG) Assets

func (t *WYSIWYG) Assets() []*WYSIWYGAsset

func (*WYSIWYG) AssetsLoaded

func (t *WYSIWYG) AssetsLoaded() bool

func (*WYSIWYG) TranslatedTerms

func (t *WYSIWYG) TranslatedTerms() map[string]map[string]string

func (*WYSIWYG) TranslatedTermsLoaded

func (t *WYSIWYG) TranslatedTermsLoaded() bool

type WYSIWYGAsset

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

func NewWYSIWYGAsset

func NewWYSIWYGAsset(id string, filename string, contentType string, size int, url string) *WYSIWYGAsset

func (*WYSIWYGAsset) ContentType

func (t *WYSIWYGAsset) ContentType() string

func (*WYSIWYGAsset) Filename

func (t *WYSIWYGAsset) Filename() string

func (*WYSIWYGAsset) ID

func (t *WYSIWYGAsset) ID() string

func (*WYSIWYGAsset) Size

func (t *WYSIWYGAsset) Size() int

func (*WYSIWYGAsset) URL

func (t *WYSIWYGAsset) URL() string

type WYSIWYGAssetInput

type WYSIWYGAssetInput struct {
	ID          string `json:"id"`
	Filename    string `json:"filename"`
	ContentType string `json:"contentType"`
	Content     []byte `json:"content"`
	Size        int    `json:"size"`
	URL         string `json:"url"`
}

type WYSIWYGDiff

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

func NewWYSIWYGDiff

func NewWYSIWYGDiff(old *WYSIWYG, diff *WYSIWYGDiffInside, new *WYSIWYG) *WYSIWYGDiff

func (*WYSIWYGDiff) Diff

func (t *WYSIWYGDiff) Diff() *WYSIWYGDiffInside

func (*WYSIWYGDiff) New

func (t *WYSIWYGDiff) New() *WYSIWYG

func (*WYSIWYGDiff) Old

func (t *WYSIWYGDiff) Old() *WYSIWYG

type WYSIWYGDiffInside

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

func NewWYSIWYGDiffInside

func NewWYSIWYGDiffInside(translatedTerms map[string]map[string]*TextDiff, assetsAdded []*WYSIWYGAssetInput, assetIdsRemoved []string) *WYSIWYGDiffInside

func (*WYSIWYGDiffInside) AssetIdsRemoved

func (t *WYSIWYGDiffInside) AssetIdsRemoved() []string

func (*WYSIWYGDiffInside) AssetsAdded

func (t *WYSIWYGDiffInside) AssetsAdded() []*WYSIWYGAssetInput

func (*WYSIWYGDiffInside) TranslatedTerms

func (t *WYSIWYGDiffInside) TranslatedTerms() map[string]map[string]*TextDiff

type WYSIWYGInput

type WYSIWYGInput struct {
	TranslatedTerms  map[string]map[string]string `json:"translatedTerms"`
	AssetsToAdd      []*WYSIWYGAssetInput         `json:"assetsToAdd"`
	AssetIdsToRemove []string                     `json:"assetIdsToRemove"`
}

type Workflow

type Workflow struct {
	Context context.Context
	// WorkflowID string
	// WorkflowStep int
	TenantID     TenantID
	Locale       string
	JWT          string
	JWTDecrypted *JWTClaims
	// contains filtered or unexported fields
}

func (*Workflow) AddEvent

func (w *Workflow) AddEvent(event *DomainEvent)

func (*Workflow) GetEvents

func (w *Workflow) GetEvents() []*DomainEvent

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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