libpersistence

package
v0.0.0-...-5aeeab1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const OPERATOR_TYPE_CONTAINS = OperatorType("CONTAINS")
View Source
const OPERATOR_TYPE_DOES_NOT_CONTAIN = OperatorType("DOES_NOT_CONTAIN")
View Source
const OPERATOR_TYPE_IS_AFTER = OperatorType("IS_AFTER")
View Source
const OPERATOR_TYPE_IS_BEFORE = OperatorType("IS_BEFORE")
View Source
const OPERATOR_TYPE_IS_DIFFERENT_TO = OperatorType("IS_DIFFERENT_TO")
View Source
const OPERATOR_TYPE_IS_EQUAL_TO = OperatorType("IS_EQUAL_TO")
View Source
const OPERATOR_TYPE_IS_FALSE = OperatorType("IS_FALSE")
View Source
const OPERATOR_TYPE_IS_GREATER_THAN = OperatorType("IS_GREATER_THAN")
View Source
const OPERATOR_TYPE_IS_GREATER_THAN_OR_EQUAL_TO = OperatorType("IS_GREATER_THAN_OR_EQUAL_TO")
View Source
const OPERATOR_TYPE_IS_IN = OperatorType("IS_IN")
View Source
const OPERATOR_TYPE_IS_LESS_THAN = OperatorType("IS_LESS_THAN")
View Source
const OPERATOR_TYPE_IS_LESS_THAN_OR_EQUAL_TO = OperatorType("IS_LESS_THAN_OR_EQUAL_TO")
View Source
const OPERATOR_TYPE_IS_NOT_IN = OperatorType("IS_NOT_IN")
View Source
const OPERATOR_TYPE_IS_NOT_NULL = OperatorType("IS_NOT_NULL")
View Source
const OPERATOR_TYPE_IS_NULL = OperatorType("IS_NULL")
View Source
const OPERATOR_TYPE_IS_TRUE = OperatorType("IS_TRUE")
View Source
const OPERATOR_TYPE_NATIVE_OR = OperatorType("NATIVE_OR")
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 AddEntitiesProperties func(*TableDefinition)
View Source
var ExternalIDProperty = &baserepositorypb.BaseProperty{Snake: "external_id"}
View Source
var ExternalModuleProperty = &baserepositorypb.BaseProperty{Snake: "external_module"}
View Source
var IDProperty = &baserepositorypb.BaseProperty{Snake: "id"}
View Source
var SetAggregateIDProperty func(string) Property
View Source
var TenantIDProperty = &baserepositorypb.BaseProperty{Snake: "tenant_id"}

Functions

func GetIdsFromRecordList

func GetIdsFromRecordList(records []DomainObjectInterface) []string

GetIdsFromRecordList will return the id from a list of records.

Types

type AddPropertiesDefinition

type AddPropertiesDefinition struct {
	Entity     string
	Keys       []Property
	Properties []Property
}

type AggregateDefinition

type AggregateDefinition struct {
	AggregateRoot *TableDefinition
	Children      []*TableDefinition
	UseTenants    bool

	ValueObjects []*ValueObjectDefinition

	Queries  []*CustomRequest
	Commands []*CustomRequest

	EventStoreClient      EventStoreClient
	EventDispatchClient   EventDispatchClient
	AddEntitiesProperties []*AddPropertiesDefinition
	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) GetAggregate

func (a *AggregateDefinition) GetAggregate() AggregateInterface

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() []*TableDefinition

func (*AggregateDefinition) GetTableByName

func (a *AggregateDefinition) GetTableByName(name string) *TableDefinition

func (*AggregateDefinition) GetTables

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

func (*AggregateDefinition) GetValueObjectByName

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

func (*AggregateDefinition) SetAggregate

func (a *AggregateDefinition) SetAggregate(aggregate AggregateInterface)

type AggregateInterface

type AggregateInterface interface {
	Definition() *AggregateDefinition
	RepositoryInterface() RepositoryInterface
	// SetRepository(RepositoryInterface)
	AggregateRootInterface() AggregateRootInterface
}

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

type AggregateRootInterface

type AggregateRootInterface interface {
	CheckIDExist(*libapplication.ApplicationContext, string) error
}

type ArgsInterface

type ArgsInterface interface {
	GetName() string
	Title() string
	ProtoType() string
	GoType() string
	GoNil() string
	GraphqlSchemaType() string
	GetReferenceName() string
	GetReference() TableInterface
	SetReference(e TableInterface)
	Type() PropertyType
	IsRepeated() bool
}

type BooleanDiffInterface

type BooleanDiffInterface interface {
	Old() bool
	New() bool
}

type Collection

type Collection struct {
	Aggregate AggregateInterface
	Workflow  *libapplication.ApplicationContext

	Update func(interface{}) ([]DomainObjectInterface, error)
	Delete func() error
	// contains filtered or unexported fields
}

Collection contains several objects of a same model.

func (*Collection) GetByID

func (c *Collection) GetByID(id string) interface{}

GetByID will return the specified record in the collection, by ID.

func (*Collection) GetKeys

func (c *Collection) GetKeys() []string

GetByID will return the specified record in the collection, by ID.

func (*Collection) Init

func (c *Collection) Init(records []DomainObjectInterface)

Init will initialize the collection with the specified records.

func (*Collection) Slice

func (c *Collection) Slice() []DomainObjectInterface

Slice will return the records in the collection, as a slice.

type Contains

type Contains struct {
	Value string
}

func (*Contains) Type

func (o *Contains) Type() OperatorType

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) Title

func (f *CustomRequest) Title() string

type DBType

type DBType struct {
	Type  string
	Value string
}

type DatasourceClient

type DatasourceClient interface {
	GenerateSchema([]*TableDefinition) string
	MigrateTables(map[*TableDefinition]*TableDefinition, bool) error
	// InitDB(writeInfo *libdata.ClusterInfo, readInfo *libdata.ClusterInfo) (*libdata.Cluster, error)
	// CreateTenant(*libdata.Workflow, []*libdata.ModelDefinition, *libdata.Tenant) error
	// GetTenant(*libdata.Workflow, *libdata.Tenant) (*libdata.Tenant, error)
	GetImportRepository() string
	GetScanType() string
	GetDriverName() string
	GenerateInsertBuildArgsFunc(DatasourceClient, TableInterface) string
	GenerateScanFunc(DatasourceClient, string, TableInterface) string
	Get(*TableDefinition, *libapplication.ApplicationContext, string) (interface{}, error)
	Select(TableInterface, *libapplication.ApplicationContext, []*Filter, []string, *OptionsListQuery) (interface{}, error)
	Insert(
		TableInterface, *libapplication.ApplicationContext, []interface{},
		[]string, map[string]interface{},
		[]string,
	) (interface{}, error)
	Update(
		TableInterface, *libapplication.ApplicationContext, []*Filter, interface{},
		[]string, map[string]interface{}, []string,
	) (interface{}, error)
	Delete(TableInterface, *libapplication.ApplicationContext, []*Filter) error
	BeginTransaction(*libapplication.ApplicationContext, bool) error
	RollbackTransaction(*libapplication.ApplicationContext) error
	CommitTransaction(*libapplication.ApplicationContext) error
	// CheckIDExist(*libpersistence.TableDefinition, *libpersistence.Workflow, string) error
	// SupportTransaction() bool
	RegisterEvents(*libapplication.ApplicationContext, interface{}, []*libapplication.Event) error
	MarkDispatchedEvent(*libapplication.ApplicationContext, *libapplication.Event) error
	GetAggregateHistory(*libapplication.ApplicationContext, *libdomain.AggregateDefinition, string) ([]*libdomain.EventHistory, error)
	GetAggregateEvents(*libapplication.ApplicationContext, *libdomain.AggregateDefinition, string) ([]*libapplication.Event, error)
}

Driver is an interface for the drivers providing crud operations.

type Definitions

type Definitions struct {
	Repository       string
	Prefix           string
	GitRepository    string
	DatasourceClient DatasourceClient
	CacheClient      libapplication.CacheClient
	Libraries        []*Definitions
	// contains filtered or unexported fields
}

func (*Definitions) GetByID

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

GetByID return the specified definition by its ID.

func (*Definitions) MigrateAggregates

func (ds *Definitions) MigrateAggregates() error

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) Slice

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

Slice return the definitions as a slice.

type DoesNotContain

type DoesNotContain struct {
	Value string
}

func (*DoesNotContain) Type

func (o *DoesNotContain) Type() OperatorType

type DomainObjectInterface

type DomainObjectInterface interface {
	GetID() string
}

type EntityCommandsDefinition

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

type EntityQueriesDefinition

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

type Event

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

type EventDispatchClient

type EventDispatchClient interface {
	DispatchEvent(

		event *Event) error
}

type EventStoreClient

type EventStoreClient interface {
	RegisterEvents(libdomain.ApplicationContext, AggregateInterface, []*Event) error
	MarkDispatchedEvent(libdomain.ApplicationContext, *Event) error
	GetAggregateEvents(libdomain.ApplicationContext, *libdomain.AggregateDefinition, string, string) ([]*Event, error)
}

type ExternalData

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

type Factory

type Factory struct {
	Aggregate                AggregateInterface
	Workflow                 *libapplication.ApplicationContext
	New                      func() DomainObjectInterface
	Scan                     func(interface{}, *Collection) ([]DomainObjectInterface, error)
	CheckExternalForeignKeys func([]DomainObjectInterface) error
	Select                   func(
		filters []FilterInterface, with []string,
		offset *uint, limit *uint, orderByArg *string,
	) ([]DomainObjectInterface, error)
	// Create                  func(records interface{}) ([]DomainObjectInterface, error)
	PostCreate              func(records *Collection) error
	PostCreateSelectFilters func([]FilterInterface, []DomainObjectInterface) []FilterInterface
	Upsert                  func([]FilterInterface, interface{}, bool) (interface{}, bool, error)
}

Pool represent a Model within the current environnement, so we can easily make operation on it.

func (*Factory) Init

func (d *Factory) Init()

Init will initialize the pool.

type FactoryInterface

type FactoryInterface interface {
}

type Filter

type Filter struct {
	Field    string
	JSONKey  string
	Operator Operator
}

type FilterInterface

type FilterInterface interface{}

type FloatDiffInterface

type FloatDiffInterface interface {
	Old() float64
	New() float64
}

type GetWYSIWYGProperties

type GetWYSIWYGProperties struct {
	TranslatedTerms bool
	Assets          bool
}

type Index

type Index struct {
	DatasourceClient
	Name       string
	Properties []string
}

type IntegerDiffInterface

type IntegerDiffInterface interface {
	Old() int
	New() int
}

type IsAfter

type IsAfter struct {
	Value time.Time
}

func (*IsAfter) Type

func (o *IsAfter) Type() OperatorType

type IsBefore

type IsBefore struct {
	Value time.Time
}

func (*IsBefore) Type

func (o *IsBefore) Type() OperatorType

type IsDifferentTo

type IsDifferentTo struct {
	Value string
}

func (*IsDifferentTo) Type

func (o *IsDifferentTo) Type() OperatorType

type IsEqualTo

type IsEqualTo struct {
	Value string
}

func (*IsEqualTo) Type

func (o *IsEqualTo) Type() OperatorType

type IsFalse

type IsFalse struct{}

func (*IsFalse) Type

func (o *IsFalse) Type() OperatorType

type IsGreaterThan

type IsGreaterThan struct {
	Value float64
}

func (*IsGreaterThan) Type

func (o *IsGreaterThan) Type() OperatorType

type IsGreaterThanOrEqualTo

type IsGreaterThanOrEqualTo struct {
	Value float64
}

func (*IsGreaterThanOrEqualTo) Type

type IsIn

type IsIn struct {
	Values []string
}

func (*IsIn) Type

func (o *IsIn) Type() OperatorType

type IsLessThan

type IsLessThan struct {
	Value float64
}

func (*IsLessThan) Type

func (o *IsLessThan) Type() OperatorType

type IsLessThanOrEqualTo

type IsLessThanOrEqualTo struct {
	Value float64
}

func (*IsLessThanOrEqualTo) Type

type IsNotIn

type IsNotIn struct {
	Values []string
}

func (*IsNotIn) Type

func (o *IsNotIn) Type() OperatorType

type IsNotNull

type IsNotNull struct{}

func (*IsNotNull) Type

func (o *IsNotNull) Type() OperatorType

type IsNull

type IsNull struct{}

func (*IsNull) Type

func (o *IsNull) Type() OperatorType

type IsTrue

type IsTrue struct{}

func (*IsTrue) Type

func (o *IsTrue) Type() OperatorType

type JWTClaims

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

type ListQueryInterface

type ListQueryInterface interface {
	GetOptions() *OptionsListQuery
}

type Model

type Model struct{}

Model represent a single record.

type ModelInterface

type ModelInterface interface {
	// Select(
	// 	*WorkflowInterface, []*libdata.Filter,
	// 	[]string, *uint, *string, *string,
	// ) (*Collection, error)
	// Create(*WorkflowInterface, []interface{}) (*Collection, error)
	// Delete(
	// 	*WorkflowInterface, []*libdata.Filter, []string,
	// ) (*Collection, error)
	// SetStore(interface{}) error
	// SetNew(func() interface{}) error
	GetID() string
}

ModelInterface force to define the function relative to Model.

type NativeOR

type NativeOR struct {
	Filters []*Filter
}

func (*NativeOR) Type

func (o *NativeOR) Type() OperatorType

type OnDeleteValue

type OnDeleteValue string

type Operator

type Operator interface {
	Type() OperatorType
}

type OperatorType

type OperatorType string

type OptionsListQuery

type OptionsListQuery struct {
	Lang    string
	Offset  int
	Limit   int
	OrderBy string
	// After string
	// Before string
	// First int
	// Last int
	GlobalIgnoreTenants bool
	AllowFiltering      bool
}

type Property

type Property interface {
	GetName() string
	NameWithoutID() string
	Title() string
	TitleWithoutID() string
	Snake() string
	Upper() string
	Type() PropertyType
	GoType() string
	GoTypeID() string
	GoNil() string
	JSONType() string
	ProtoType() string
	ProtoTypeArg() string
	ProtoTypeOptional() string
	DBType() *DBType
	DiffTypeInterface() string
	GraphqlType() string
	GraphqlSchemaType() string
	GetReferenceName() string
	GetReference() TableInterface
	// GetReferenceDefinition() *ModelDefinition
	SetReference(TableInterface)
	GetInverseProperty() string
	GetRequired() bool
	GetPrimaryKey() bool
	GetWithEntity() bool
	// GetFieldData() *FieldData
	IsStored() bool
	IsNested() bool
	SetPosition(int)
	GetPosition() int
	IsRepeated() bool
	IsTranslatable() bool
	IsIndexed() bool
	GetReturnDetailsInTests() bool
	GetLoadedPosition() int
	GetLoadedPositionEntity() int
	GetPositionEntity() int
	GetExternalDatasource() DatasourceClient
	GetExcludeFromInterface() bool
}

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) DBType

func (r *RepeatedProperty) DBType() *DBType

func (*RepeatedProperty) GetInverseProperty

func (r *RepeatedProperty) GetInverseProperty() string

func (*RepeatedProperty) GetLoadedPosition

func (r *RepeatedProperty) GetLoadedPosition() int

func (*RepeatedProperty) GetLoadedPositionEntity

func (r *RepeatedProperty) GetLoadedPositionEntity() int

func (*RepeatedProperty) GetName

func (r *RepeatedProperty) GetName() string

func (*RepeatedProperty) GetPosition

func (r *RepeatedProperty) GetPosition() int

func (*RepeatedProperty) GetPositionEntity

func (r *RepeatedProperty) GetPositionEntity() 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) GoNil

func (r *RepeatedProperty) GoNil() string

func (*RepeatedProperty) GoType

func (r *RepeatedProperty) GoType() 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) LoadedPositionEntity

func (r *RepeatedProperty) LoadedPositionEntity() int

func (*RepeatedProperty) NameWithoutID

func (r *RepeatedProperty) NameWithoutID() string

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) 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 RepositoryInterface

type RepositoryInterface interface {
	// Insert(WorkflowInterface, interface{}) ([]DomainObjectInterface, error)
	// // Select(TableInterface, WorkflowInterface, *baserepositorypb.ListQuery) ([]DomainObjectInterface, error)
	// Update(*AggregateDefinition, WorkflowInterface, []FilterInterface, interface{}) ([]DomainObjectInterface, error)
	// Delete(*AggregateDefinition, WorkflowInterface, []FilterInterface) error
	GetCache(string) ([]byte, error)
	SetCache(string, []byte) error
	GetRecordCache(string, string) ([]byte, error)
	SetRecordCache(string, string, []byte) error
	InvalidateRecordCache(string, string)
	DefinitionInterface() interface{}
}

type RequestConfig

type RequestConfig struct {
	Groups *[]*baserepositorypb.GetByExternalIDQuery
}

type TableDefinition

type TableDefinition struct {
	Aggregate AggregateInterface

	Name            string
	Keys            []Property
	Properties      []Property
	DisableID       bool
	DisableDatetime bool
	Queries         *EntityQueriesDefinition
	Commands        *EntityCommandsDefinition
	UseOneOf        bool
	// useTenants bool
	DisableDatabaseStore bool
	SafeDelete           bool
	Abstract             bool
	NoCache              bool

	Indexes            []*Index
	PrimaryKey         string
	UniqueConstraints  []UniqueConstraint
	ExternalDatasource DatasourceClient
	// contains filtered or unexported fields
}

func (*TableDefinition) AggregateDefinition

func (t *TableDefinition) AggregateDefinition() *AggregateDefinition

func (*TableDefinition) DomainPath

func (t *TableDefinition) DomainPath() string

func (*TableDefinition) GetAbstract

func (t *TableDefinition) GetAbstract() bool

func (*TableDefinition) GetCommands

func (t *TableDefinition) GetCommands() *EntityCommandsDefinition

func (*TableDefinition) GetDisableDatabaseStore

func (t *TableDefinition) GetDisableDatabaseStore() bool

func (*TableDefinition) GetDisableDatetime

func (t *TableDefinition) GetDisableDatetime() bool

func (*TableDefinition) GetDisableID

func (t *TableDefinition) GetDisableID() bool

func (*TableDefinition) GetExternalDatasource

func (t *TableDefinition) GetExternalDatasource() DatasourceClient

func (*TableDefinition) GetExternalDatasources

func (t *TableDefinition) GetExternalDatasources() map[DatasourceClient][]Property

func (*TableDefinition) GetIndexes

func (t *TableDefinition) GetIndexes() []*Index

func (*TableDefinition) GetKeys

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

func (*TableDefinition) GetName

func (t *TableDefinition) GetName() string

func (*TableDefinition) GetNoCache

func (t *TableDefinition) GetNoCache() bool

func (*TableDefinition) GetPrimaryKey

func (t *TableDefinition) GetPrimaryKey() string

func (*TableDefinition) GetPropertyExternalDatasource

func (t *TableDefinition) GetPropertyExternalDatasource(propertyName string) DatasourceClient

func (*TableDefinition) GetType

func (t *TableDefinition) GetType() string

func (*TableDefinition) GetUseOneOf

func (t *TableDefinition) GetUseOneOf() bool

func (*TableDefinition) HasTranslatable

func (t *TableDefinition) HasTranslatable() bool

func (*TableDefinition) IsAggregateRoot

func (t *TableDefinition) IsAggregateRoot() bool

func (*TableDefinition) IsEntity

func (t *TableDefinition) IsEntity() bool

func (*TableDefinition) NestedProperties

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

func (*TableDefinition) Snake

func (t *TableDefinition) Snake() string

func (*TableDefinition) StoredProperties

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

func (*TableDefinition) Title

func (t *TableDefinition) Title() string

func (*TableDefinition) Upper

func (f *TableDefinition) Upper() string

func (*TableDefinition) UseTenants

func (t *TableDefinition) UseTenants() bool

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
	GetIndexes() []*Index
	GetPrimaryKey() string
	IsAggregateRoot() bool
	HasTranslatable() bool
	GetAbstract() bool
	GetNoCache() bool
	DomainPath() string
	GetExternalDatasource() DatasourceClient
}

type TextDiffInterface

type TextDiffInterface interface {
	Old() string
	New() string
}

type TimeDiffInterface

type TimeDiffInterface interface {
	Old() time.Time
	New() time.Time
}

type UniqueConstraint

type UniqueConstraint struct {
	Name    string
	Columns []string
}

type ValueObjectDefinition

type ValueObjectDefinition struct {
	Aggregate AggregateInterface

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

func (*ValueObjectDefinition) AggregateDefinition

func (t *ValueObjectDefinition) AggregateDefinition() *AggregateDefinition

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) GetExternalDatasource

func (t *ValueObjectDefinition) GetExternalDatasource() DatasourceClient

func (*ValueObjectDefinition) GetIndexes

func (t *ValueObjectDefinition) GetIndexes() []*Index

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) GetPrimaryKey

func (t *ValueObjectDefinition) GetPrimaryKey() string

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) Upper

func (f *ValueObjectDefinition) Upper() string

func (*ValueObjectDefinition) UseTenants

func (t *ValueObjectDefinition) UseTenants() bool

type Workflow

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

func (*Workflow) AddEvent

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

func (*Workflow) GetEvents

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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