Documentation ¶
Index ¶
- Variables
- func NewTenant(wk libdomain.WorkflowInterface) libdomain.DomainObjectInterface
- func NewTenantSetting(wk libdomain.WorkflowInterface) libdomain.DomainObjectInterface
- type DummyStruct
- type PbTenant
- type PbTenantSetting
- type Tenant
- func (t *Tenant) Delete() error
- func (t *Tenant) ExternalID() string
- func (t *Tenant) ExternalModule() string
- func (t *Tenant) GetID() string
- func (t *Tenant) ID() string
- func (t *Tenant) IncludeSettings() error
- func (t *Tenant) Init(wk libdomain.WorkflowInterface, pb *pb.Tenant)
- func (t *Tenant) JSON() ([]byte, error)
- func (t *Tenant) Map() map[string]interface{}
- func (t *Tenant) Name() string
- func (t *Tenant) Parent() *Tenant
- func (t *Tenant) ParentID() string
- func (t *Tenant) Pb() *pb.Tenant
- func (t *Tenant) Settings() []*TenantSetting
- func (t *Tenant) Update(r *pb.UpdateTenantData) error
- type TenantCollection
- func (c *TenantCollection) Aggregate() libdomain.AggregateInterface
- func (d *TenantCollection) Delete() error
- func (c *TenantCollection) GetByID(id string) *Tenant
- func (c *TenantCollection) GetKeys() []string
- func (t *TenantCollection) IncludeSettings() error
- func (d *TenantCollection) Map() []map[string]interface{}
- func (t *TenantCollection) ParentsByTenantID() (map[string]*Tenant, error)
- func (c *TenantCollection) Rehydrate(pbTenants []*pb.Tenant)
- func (t *TenantCollection) Settings() (map[string]*TenantSettingCollection, error)
- func (c *TenantCollection) Slice() []*Tenant
- func (c *TenantCollection) SlicePb() []*pb.Tenant
- func (d *TenantCollection) Update(r *pb.UpdateTenantData) error
- type TenantFactory
- type TenantFactoryInterface
- type TenantInternalLibrary
- type TenantSetting
- func (t *TenantSetting) Aggregate() *Tenant
- func (t *TenantSetting) AggregateID() string
- func (t *TenantSetting) ExternalID() string
- func (t *TenantSetting) ExternalModule() string
- func (t *TenantSetting) GetID() string
- func (t *TenantSetting) ID() string
- func (t *TenantSetting) Init(wk libdomain.WorkflowInterface, pb *pb.TenantSetting)
- func (t *TenantSetting) JSON() ([]byte, error)
- func (t *TenantSetting) Key() string
- func (t *TenantSetting) Map() map[string]interface{}
- func (t *TenantSetting) Pb() *pb.TenantSetting
- func (t *TenantSetting) Value() string
- type TenantSettingCollection
- func (c *TenantSettingCollection) Aggregate() libdomain.AggregateInterface
- func (t *TenantSettingCollection) AggregatesByTenantID() (map[string]*Tenant, error)
- func (c *TenantSettingCollection) GetByID(id string) *TenantSetting
- func (c *TenantSettingCollection) GetKeys() []string
- func (d *TenantSettingCollection) Map() []map[string]interface{}
- func (c *TenantSettingCollection) Rehydrate(pbTenantSettings []*pb.TenantSetting)
- func (c *TenantSettingCollection) Slice() []*TenantSetting
- func (c *TenantSettingCollection) SlicePb() []*pb.TenantSetting
- type TestClientInterface
Constants ¶
This section is empty.
Variables ¶
var TenantAggregate *tenantAggregate
TenantAggregate contain the definition of the tenant object.
*It is also used to generate the factory containing the main functions with the environnement.
var TenantEntity *tenantEntity
var TenantSettingEntity *tenantSettingEntity
var TenantSettingShouldBe func( t *testing.T, ctx context.Context, client TestClientInterface, tenantID string, checkEvents bool, tenantSettingFrom *pb.TenantSetting, want *pb.TenantSetting, ) func(t *testing.T)
var TenantShouldBe func( t *testing.T, ctx context.Context, client TestClientInterface, tenantID string, checkEvents bool, tenantFrom *pb.Tenant, want *pb.Tenant, ) func(t *testing.T)
result := &tenantSettingCollection{ Collection: records, } result.Collection.NewFactory = result.newFactory // TenantSettingAggregate.PostNewCollection(result) return result }
type tenantSettingCollection struct { *libdomain.Collection // tenantSettingCollectionInterface }
func (c *tenantSettingCollection) Slice() []*TenantSetting { var tenantSettings []*TenantSetting for _, record := range c.Collection.Slice() { tenantSettings = append(tenantSettings, record.(*TenantSetting)) } return tenantSettings }
func (d *tenantSettingCollection) newFactory() *libdomain.Factory { factory := newTenantSettingFactory(d.Collection.Workflow) return factory.Factory }
func NewTenantSetting(wk libdomain.WorkflowInterface) libdomain.DomainObjectInterface { return &TenantSetting{ TenantSetting: &pb.TenantSetting{ Properties: &pb.TenantSettingProperties{}, }, Workflow: wk, } }
Functions ¶
func NewTenant ¶
func NewTenant(wk libdomain.WorkflowInterface) libdomain.DomainObjectInterface
func NewTenantSetting ¶
func NewTenantSetting(wk libdomain.WorkflowInterface) libdomain.DomainObjectInterface
Types ¶
type DummyStruct ¶
type DummyStruct struct{}
type PbTenantSetting ¶
type PbTenantSetting = pb.TenantSetting
type Tenant ¶
type Tenant struct { Workflow libdomain.WorkflowInterface // contains filtered or unexported fields }
Tenant is the main struct for operating a tenant object, which shall
*be used in custom code because it contains the environnement informations and *the easy-to-use functions.
func (*Tenant) ExternalID ¶
func (*Tenant) ExternalModule ¶
func (*Tenant) IncludeSettings ¶
func (*Tenant) Settings ¶
func (t *Tenant) Settings() []*TenantSetting
type TenantCollection ¶
type TenantCollection struct { //*libdomain.Collection // TenantCollectionInterface Workflow libdomain.WorkflowInterface // contains filtered or unexported fields }
TenantCollection is the main struct for operating a list tenant object, which shall
*be used in custom code because it contains the environnement informations and *the easy-to-use functions.
func (*TenantCollection) Aggregate ¶
func (c *TenantCollection) Aggregate() libdomain.AggregateInterface
func (*TenantCollection) Delete ¶
func (d *TenantCollection) Delete() error
Delete will delete all the tenants in the collection.
func (*TenantCollection) GetByID ¶
func (c *TenantCollection) GetByID(id string) *Tenant
GetByID return the tenant in this collection, by id.
func (*TenantCollection) GetKeys ¶
func (c *TenantCollection) GetKeys() []string
GetByID return the tenant in this collection, by id.
func (*TenantCollection) IncludeSettings ¶
func (t *TenantCollection) IncludeSettings() error
func (*TenantCollection) Map ¶
func (d *TenantCollection) Map() []map[string]interface{}
func (*TenantCollection) ParentsByTenantID ¶
func (t *TenantCollection) ParentsByTenantID() (map[string]*Tenant, error)
ParentsByTenantID return the tenant behind ParentID field, for each tenant in the collection, by id.
func (*TenantCollection) Rehydrate ¶
func (c *TenantCollection) Rehydrate(pbTenants []*pb.Tenant)
func (*TenantCollection) Settings ¶
func (t *TenantCollection) Settings() (map[string]*TenantSettingCollection, error)
SettingssByTenantID return the tenantSetting behind Settings field, for each tenant in the collection, by id.
func (*TenantCollection) Slice ¶
func (c *TenantCollection) Slice() []*Tenant
GetSlice return all tenants in this collection, as a slice.
func (*TenantCollection) SlicePb ¶
func (c *TenantCollection) SlicePb() []*pb.Tenant
GetSlice return all tenants in this collection, as a slice.
func (*TenantCollection) Update ¶
func (d *TenantCollection) Update(r *pb.UpdateTenantData) error
Update will update all the tenants in the collection with the specified data.
type TenantFactory ¶
type TenantFactory struct { *libdomain.Factory TenantFactoryInterface }
TenantFactory is the main struct for operating tenant objects, which shall
*be used in custom code because it contains the environnement informations and *the easy-to-use functions.
func (*TenantFactory) Create ¶
func (d *TenantFactory) Create( tenants []*pb.CreateTenantCommand, parentAggregate *libdomain.AggregateDefinition, ) (*TenantCollection, error)
Create create a new tenant from the factory, and return it.
func (*TenantFactory) New ¶
func (d *TenantFactory) New() *Tenant
New return a new instance of a tenant object.
func (*TenantFactory) NewCollection ¶
func (d *TenantFactory) NewCollection(tenants []*Tenant) *TenantCollection
NewCollection return a new instance of a tenant collection object.
type TenantFactoryInterface ¶
type TenantFactoryInterface interface { }
type TenantInternalLibrary ¶
type TenantInternalLibrary struct {
NewTenantSettingFactory func(libdomain.WorkflowInterface) *tenantSettingFactory
}
type TenantSetting ¶
type TenantSetting struct { Workflow libdomain.WorkflowInterface // contains filtered or unexported fields }
TenantSetting is the main struct for operating a tenantSetting object, which shall
*be used in custom code because it contains the environnement informations and *the easy-to-use functions.
func (*TenantSetting) Aggregate ¶
func (t *TenantSetting) Aggregate() *Tenant
func (*TenantSetting) AggregateID ¶
func (t *TenantSetting) AggregateID() string
func (*TenantSetting) ExternalID ¶
func (t *TenantSetting) ExternalID() string
func (*TenantSetting) ExternalModule ¶
func (t *TenantSetting) ExternalModule() string
func (*TenantSetting) GetID ¶
func (t *TenantSetting) GetID() string
func (*TenantSetting) ID ¶
func (t *TenantSetting) ID() string
SetID is a function to set the ID of the tenantSetting.
func (*TenantSetting) Init ¶
func (t *TenantSetting) Init(wk libdomain.WorkflowInterface, pb *pb.TenantSetting)
func (*TenantSetting) JSON ¶
func (t *TenantSetting) JSON() ([]byte, error)
JSON is a function to return the tenantSetting data in JSON format.
func (*TenantSetting) Key ¶
func (t *TenantSetting) Key() string
func (*TenantSetting) Map ¶
func (t *TenantSetting) Map() map[string]interface{}
Map is a function to return the tenantSetting data in JSON format.
func (*TenantSetting) Pb ¶
func (t *TenantSetting) Pb() *pb.TenantSetting
SetID is a function to set the ID of the tenantSetting.
func (*TenantSetting) Value ¶
func (t *TenantSetting) Value() string
type TenantSettingCollection ¶
type TenantSettingCollection struct { //*libdomain.Collection // TenantSettingCollectionInterface Workflow libdomain.WorkflowInterface // contains filtered or unexported fields }
TenantSettingCollection is the main struct for operating a list tenantSetting object, which shall
*be used in custom code because it contains the environnement informations and *the easy-to-use functions.
func (*TenantSettingCollection) Aggregate ¶
func (c *TenantSettingCollection) Aggregate() libdomain.AggregateInterface
func (*TenantSettingCollection) AggregatesByTenantID ¶
func (t *TenantSettingCollection) AggregatesByTenantID() (map[string]*Tenant, error)
AggregatesByTenantID return the tenant behind AggregateID field, for each tenant in the collection, by id.
func (*TenantSettingCollection) GetByID ¶
func (c *TenantSettingCollection) GetByID(id string) *TenantSetting
GetByID return the tenantSetting in this collection, by id.
func (*TenantSettingCollection) GetKeys ¶
func (c *TenantSettingCollection) GetKeys() []string
GetByID return the tenantSetting in this collection, by id.
func (*TenantSettingCollection) Map ¶
func (d *TenantSettingCollection) Map() []map[string]interface{}
func (*TenantSettingCollection) Rehydrate ¶
func (c *TenantSettingCollection) Rehydrate(pbTenantSettings []*pb.TenantSetting)
func (*TenantSettingCollection) Slice ¶
func (c *TenantSettingCollection) Slice() []*TenantSetting
GetSlice return all tenantSettings in this collection, as a slice.
func (*TenantSettingCollection) SlicePb ¶
func (c *TenantSettingCollection) SlicePb() []*pb.TenantSetting
GetSlice return all tenantSettings in this collection, as a slice.
type TestClientInterface ¶
type TestClientInterface interface { }