Documentation ¶
Index ¶
- Variables
- func NewTranslation(wk libdomain.WorkflowInterface) libdomain.DomainObjectInterface
- type DummyStruct
- type PbTranslation
- type TestClientInterface
- type Translation
- func (t *Translation) Delete() error
- func (t *Translation) Entity() string
- func (t *Translation) ExternalID() string
- func (t *Translation) ExternalModule() string
- func (t *Translation) GetID() string
- func (t *Translation) ID() string
- func (t *Translation) Init(wk libdomain.WorkflowInterface, pb *pb.Translation)
- func (t *Translation) JSON() ([]byte, error)
- func (t *Translation) Lang() string
- func (t *Translation) Map() map[string]interface{}
- func (t *Translation) Pb() *pb.Translation
- func (t *Translation) Property() string
- func (t *Translation) RecordID() string
- func (t *Translation) TenantID() string
- func (t *Translation) Update(r *pb.UpdateTranslationData) error
- func (t *Translation) Value() string
- type TranslationCollection
- func (c *TranslationCollection) Aggregate() libdomain.AggregateInterface
- func (d *TranslationCollection) Delete() error
- func (c *TranslationCollection) GetByID(id string) *Translation
- func (c *TranslationCollection) GetKeys() []string
- func (d *TranslationCollection) Map() []map[string]interface{}
- func (c *TranslationCollection) Rehydrate(pbTranslations []*pb.Translation)
- func (c *TranslationCollection) Slice() []*Translation
- func (c *TranslationCollection) SlicePb() []*pb.Translation
- func (d *TranslationCollection) Update(r *pb.UpdateTranslationData) error
- type TranslationFactory
- type TranslationFactoryInterface
- type TranslationInternalLibrary
Constants ¶
This section is empty.
Variables ¶
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.
var TranslationEntity *translationEntity
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 ¶
func NewTranslation ¶
func NewTranslation(wk libdomain.WorkflowInterface) libdomain.DomainObjectInterface
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 (t *Translation) Init(wk libdomain.WorkflowInterface, pb *pb.Translation)
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 (c *TranslationCollection) Aggregate() libdomain.AggregateInterface
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 ¶
func (d *TranslationCollection) Update(r *pb.UpdateTranslationData) error
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 { }