gendomain

package
v0.0.0-...-86e84b6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TranslationAggregate *translationAggregate

TranslationAggregate contain the definition of the translation object.

*It is also used to generate the factory containing the main functions with the environnement.
View Source
var TranslationEntity *translationEntity
View Source
var TranslationShouldBe func(
	t *testing.T, ctx context.Context, client TestClientInterface, tenantID string, checkEvents bool,
	translationFrom *pb.Translation,
	want *pb.Translation,
) func(t *testing.T)

Functions

Types

type DummyStruct

type DummyStruct struct{}

type PbTranslation

type PbTranslation = pb.Translation

type TestClientInterface

type TestClientInterface interface {
}

type Translation

type Translation struct {
	Workflow libdomain.WorkflowInterface
	// contains filtered or unexported fields
}

Translation is the main struct for operating a translation object, which shall

*be used in custom code because it contains the environnement informations and
*the easy-to-use functions.

func (*Translation) Delete

func (t *Translation) Delete() error

Delete will delete the translation from the database.

func (*Translation) Entity

func (t *Translation) Entity() string

func (*Translation) ExternalID

func (t *Translation) ExternalID() string

func (*Translation) ExternalModule

func (t *Translation) ExternalModule() string

func (*Translation) GetID

func (t *Translation) GetID() string

func (*Translation) ID

func (t *Translation) ID() string

SetID is a function to set the ID of the translation.

func (*Translation) Init

func (*Translation) JSON

func (t *Translation) JSON() ([]byte, error)

JSON is a function to return the translation data in JSON format.

func (*Translation) Lang

func (t *Translation) Lang() string

func (*Translation) Map

func (t *Translation) Map() map[string]interface{}

Map is a function to return the translation data in JSON format.

func (*Translation) Pb

func (t *Translation) Pb() *pb.Translation

SetID is a function to set the ID of the translation.

func (*Translation) Property

func (t *Translation) Property() string

func (*Translation) RecordID

func (t *Translation) RecordID() string

func (*Translation) TenantID

func (t *Translation) TenantID() string

func (*Translation) Update

func (t *Translation) Update(r *pb.UpdateTranslationData) error

Delete will delete the translation from the database.

func (*Translation) Value

func (t *Translation) Value() string

type TranslationCollection

type TranslationCollection struct {
	//*libdomain.Collection
	// TranslationCollectionInterface
	Workflow libdomain.WorkflowInterface
	// contains filtered or unexported fields
}

TranslationCollection is the main struct for operating a list translation object, which shall

*be used in custom code because it contains the environnement informations and
*the easy-to-use functions.

func (*TranslationCollection) Aggregate

func (*TranslationCollection) Delete

func (d *TranslationCollection) Delete() error

Delete will delete all the translations in the collection.

func (*TranslationCollection) GetByID

func (c *TranslationCollection) GetByID(id string) *Translation

GetByID return the translation in this collection, by id.

func (*TranslationCollection) GetKeys

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

GetByID return the translation in this collection, by id.

func (*TranslationCollection) Map

func (d *TranslationCollection) Map() []map[string]interface{}

func (*TranslationCollection) Rehydrate

func (c *TranslationCollection) Rehydrate(pbTranslations []*pb.Translation)

func (*TranslationCollection) Slice

func (c *TranslationCollection) Slice() []*Translation

GetSlice return all translations in this collection, as a slice.

func (*TranslationCollection) SlicePb

func (c *TranslationCollection) SlicePb() []*pb.Translation

GetSlice return all translations in this collection, as a slice.

func (*TranslationCollection) Update

Update will update all the translations in the collection with the specified data.

type TranslationFactory

type TranslationFactory struct {
	*libdomain.Factory
	TranslationFactoryInterface
}

TranslationFactory is the main struct for operating translation objects, which shall

*be used in custom code because it contains the environnement informations and
*the easy-to-use functions.

func (*TranslationFactory) Create

func (d *TranslationFactory) Create(
	translations []*pb.CreateTranslationCommand, parentAggregate *libdomain.AggregateDefinition,
) (*TranslationCollection, error)

Create create a new translation from the factory, and return it.

func (*TranslationFactory) New

func (d *TranslationFactory) New() *Translation

New return a new instance of a translation object.

func (*TranslationFactory) NewCollection

func (d *TranslationFactory) NewCollection(translations []*Translation) *TranslationCollection

NewCollection return a new instance of a translation collection object.

type TranslationFactoryInterface

type TranslationFactoryInterface interface {
}

type TranslationInternalLibrary

type TranslationInternalLibrary struct {
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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