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: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GroupAggregate *groupAggregate

GroupAggregate contain the definition of the group object.

*It is also used to generate the factory containing the main functions with the environnement.
View Source
var GroupEntity *groupEntity
View Source
var GroupInheritShouldBe func(
	t *testing.T, ctx context.Context, client TestClientInterface, tenantID string, checkEvents bool,
	groupInheritFrom *pb.GroupInherit,
	want *pb.GroupInherit,
) func(t *testing.T)
View Source
var GroupInheritValueObject *groupInheritValueObject
View Source
var GroupShouldBe func(
	t *testing.T, ctx context.Context, client TestClientInterface, tenantID string, checkEvents bool,
	groupFrom *pb.Group,
	want *pb.Group,
) func(t *testing.T)
View Source
var OrganizationAggregate *organizationAggregate

OrganizationAggregate contain the definition of the organization object.

*It is also used to generate the factory containing the main functions with the environnement.
View Source
var OrganizationEntity *organizationEntity
View Source
var OrganizationShouldBe func(
	t *testing.T, ctx context.Context, client TestClientInterface, tenantID string, checkEvents bool,
	organizationFrom *pb.Organization,
	want *pb.Organization,
) func(t *testing.T)
	result := &organizationUserCollection{
		Collection: records,
	}
	result.Collection.NewFactory = result.newFactory
	// OrganizationUserAggregate.PostNewCollection(result)
	return result
}
type organizationUserCollection struct {
	*libdomain.Collection
	// organizationUserCollectionInterface
}
func (c *organizationUserCollection) Slice() []*OrganizationUser {
	var organizationUsers []*OrganizationUser
	for _, record := range c.Collection.Slice() {
		organizationUsers = append(organizationUsers, record.(*OrganizationUser))
	}
	return organizationUsers
}
func (d *organizationUserCollection) newFactory() *libdomain.Factory {
	factory := newOrganizationUserFactory(d.Collection.Workflow)
	return factory.Factory
}
func NewOrganizationUser(wk libdomain.WorkflowInterface) libdomain.DomainObjectInterface {
	return &OrganizationUser{
		OrganizationUser: &pb.OrganizationUser{
			Properties: &pb.OrganizationUserProperties{},
		},
		Workflow: wk,
	}
}
View Source
var OrganizationUserEntity *organizationUserEntity
View Source
var OrganizationUserGroupShouldBe func(
	t *testing.T, ctx context.Context, client TestClientInterface, tenantID string, checkEvents bool,
	organizationUserGroupFrom *pb.OrganizationUserGroup,
	want *pb.OrganizationUserGroup,
) func(t *testing.T)
View Source
var OrganizationUserGroupValueObject *organizationUserGroupValueObject
View Source
var OrganizationUserShouldBe func(
	t *testing.T, ctx context.Context, client TestClientInterface, tenantID string, checkEvents bool,
	organizationUserFrom *pb.OrganizationUser,
	want *pb.OrganizationUser,
) func(t *testing.T)
View Source
var ResultsOrganizationOrganizationCreateTenantShouldBe func(
	t *testing.T, ctx context.Context, client TestClientInterface, tenantID string, checkEvents bool,
	results *pb.OrganizationOrganizationCreateTenantResults,
	want *pb.OrganizationOrganizationCreateTenantResults,
) func(t *testing.T)
View Source
var ResultsUserComputeUserGroupsShouldBe func(
	t *testing.T, ctx context.Context, client TestClientInterface, tenantID string, checkEvents bool,
	results *pb.UserComputeUserGroupsResults,
	want *pb.UserComputeUserGroupsResults,
) func(t *testing.T)
View Source
var ResultsUserDirectConnectToTenantShouldBe func(
	t *testing.T, ctx context.Context, client TestClientInterface, tenantID string, checkEvents bool,
	results *pb.UserDirectConnectToTenantResults,
	want *pb.UserDirectConnectToTenantResults,
) func(t *testing.T)
View Source
var ResultsUserEmailConfirmationShouldBe func(
	t *testing.T, ctx context.Context, client TestClientInterface, tenantID string, checkEvents bool,
	results *pb.UserEmailConfirmationResults,
	want *pb.UserEmailConfirmationResults,
) func(t *testing.T)
View Source
var ResultsUserEmailResetConfirmationTokenShouldBe func(
	t *testing.T, ctx context.Context, client TestClientInterface, tenantID string, checkEvents bool,
	results *pb.UserEmailResetConfirmationTokenResults,
	want *pb.UserEmailResetConfirmationTokenResults,
) func(t *testing.T)
View Source
var ResultsUserGetUserFromTokenShouldBe func(
	t *testing.T, ctx context.Context, client TestClientInterface, tenantID string, checkEvents bool,
	results *pb.UserGetUserFromTokenResults,
	want *pb.UserGetUserFromTokenResults,
) func(t *testing.T)
View Source
var ResultsUserLoginUserShouldBe func(
	t *testing.T, ctx context.Context, client TestClientInterface, tenantID string, checkEvents bool,
	results *pb.UserLoginUserResults,
	want *pb.UserLoginUserResults,
) func(t *testing.T)
View Source
var ResultsUserPasswordChangeShouldBe func(
	t *testing.T, ctx context.Context, client TestClientInterface, tenantID string, checkEvents bool,
	results *pb.UserPasswordChangeResults,
	want *pb.UserPasswordChangeResults,
) func(t *testing.T)
View Source
var ResultsUserPasswordResetShouldBe func(
	t *testing.T, ctx context.Context, client TestClientInterface, tenantID string, checkEvents bool,
	results *pb.UserPasswordResetResults,
	want *pb.UserPasswordResetResults,
) func(t *testing.T)
View Source
var ResultsUserRegisterUserShouldBe func(
	t *testing.T, ctx context.Context, client TestClientInterface, tenantID string, checkEvents bool,
	results *pb.UserRegisterUserResults,
	want *pb.UserRegisterUserResults,
) func(t *testing.T)
View Source
var ResultsUserUserCreateOrganizationShouldBe func(
	t *testing.T, ctx context.Context, client TestClientInterface, tenantID string, checkEvents bool,
	results *pb.UserUserCreateOrganizationResults,
	want *pb.UserUserCreateOrganizationResults,
) func(t *testing.T)
View Source
var SessionAggregate *sessionAggregate

SessionAggregate contain the definition of the session object.

*It is also used to generate the factory containing the main functions with the environnement.
View Source
var SessionEntity *sessionEntity
View Source
var SessionShouldBe func(
	t *testing.T, ctx context.Context, client TestClientInterface, tenantID string, checkEvents bool,
	sessionFrom *pb.Session,
	want *pb.Session,
) func(t *testing.T)
View Source
var TenantEntity = tenant.TenantEntity
View Source
var TenantShouldBe = tenant.TenantShouldBe
View Source
var UserAggregate *userAggregate

UserAggregate contain the definition of the user object.

*It is also used to generate the factory containing the main functions with the environnement.
View Source
var UserEmailEntity *userEmailEntity
View Source
var UserEmailShouldBe func(
	t *testing.T, ctx context.Context, client TestClientInterface, tenantID string, checkEvents bool,
	userEmailFrom *pb.UserEmail,
	want *pb.UserEmail,
) func(t *testing.T)
View Source
var UserEntity *userEntity
View Source
var UserGroupShouldBe func(
	t *testing.T, ctx context.Context, client TestClientInterface, tenantID string, checkEvents bool,
	userGroupFrom *pb.UserGroup,
	want *pb.UserGroup,
) func(t *testing.T)
View Source
var UserGroupValueObject *userGroupValueObject
View Source
var UserShouldBe func(
	t *testing.T, ctx context.Context, client TestClientInterface, tenantID string, checkEvents bool,
	userFrom *pb.User,
	want *pb.User,
) func(t *testing.T)
	result := &userEmailCollection{
		Collection: records,
	}
	result.Collection.NewFactory = result.newFactory
	// UserEmailAggregate.PostNewCollection(result)
	return result
}
type userEmailCollection struct {
	*libdomain.Collection
	// userEmailCollectionInterface
}
func (c *userEmailCollection) Slice() []*UserEmail {
	var userEmails []*UserEmail
	for _, record := range c.Collection.Slice() {
		userEmails = append(userEmails, record.(*UserEmail))
	}
	return userEmails
}
func (d *userEmailCollection) newFactory() *libdomain.Factory {
	factory := newUserEmailFactory(d.Collection.Workflow)
	return factory.Factory
}
func NewUserEmail(wk libdomain.WorkflowInterface) libdomain.DomainObjectInterface {
	return &UserEmail{
		UserEmail: &pb.UserEmail{
			Properties: &pb.UserEmailProperties{},
		},
		Workflow: wk,
	}
}

Functions

Types

type DummyStruct

type DummyStruct struct{}

type Group

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

Group is the main struct for operating a group object, which shall

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

func (*Group) Delete

func (t *Group) Delete() error

Delete will delete the group from the database.

func (*Group) ExternalID

func (t *Group) ExternalID() string

func (*Group) ExternalModule

func (t *Group) ExternalModule() string

func (*Group) GetID

func (t *Group) GetID() string

func (*Group) ID

func (t *Group) ID() string

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

func (*Group) IncludeInherits

func (t *Group) IncludeInherits() error

func (*Group) InheritIds

func (t *Group) InheritIds() []string

func (*Group) Inherits

func (t *Group) Inherits() []*Group

func (*Group) Init

func (t *Group) Init(wk libdomain.WorkflowInterface, pb *pb.Group)

func (*Group) JSON

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

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

func (*Group) Map

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

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

func (*Group) Name

func (t *Group) Name() string

func (*Group) Pb

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

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

func (*Group) TenantID

func (t *Group) TenantID() string

func (*Group) Update

func (t *Group) Update(r *pb.UpdateGroupData) error

Delete will delete the group from the database.

type GroupCollection

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

GroupCollection is the main struct for operating a list group object, which shall

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

func (*GroupCollection) Aggregate

func (*GroupCollection) Delete

func (d *GroupCollection) Delete() error

Delete will delete all the groups in the collection.

func (*GroupCollection) GetByID

func (c *GroupCollection) GetByID(id string) *Group

GetByID return the group in this collection, by id.

func (*GroupCollection) GetKeys

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

GetByID return the group in this collection, by id.

func (*GroupCollection) IncludeInherits

func (t *GroupCollection) IncludeInherits() error

func (*GroupCollection) InheritsByGroupID

func (t *GroupCollection) InheritsByGroupID() (map[string]*GroupCollection, error)

InheritssByGroupID return the group behind InheritIds field, for each group in the collection, by id.

func (*GroupCollection) Map

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

func (*GroupCollection) Rehydrate

func (c *GroupCollection) Rehydrate(pbGroups []*pb.Group)

func (*GroupCollection) Slice

func (c *GroupCollection) Slice() []*Group

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

func (*GroupCollection) SlicePb

func (c *GroupCollection) SlicePb() []*pb.Group

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

func (*GroupCollection) Update

func (d *GroupCollection) Update(r *pb.UpdateGroupData) error

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

type GroupFactory

type GroupFactory struct {
	*libdomain.Factory
	GroupFactoryInterface
}

GroupFactory is the main struct for operating group objects, which shall

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

func (*GroupFactory) Create

func (d *GroupFactory) Create(
	groups []*pb.CreateGroupCommand, parentAggregate *libdomain.AggregateDefinition,
) (*GroupCollection, error)

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

func (*GroupFactory) New

func (d *GroupFactory) New() *Group

New return a new instance of a group object.

func (*GroupFactory) NewCollection

func (d *GroupFactory) NewCollection(groups []*Group) *GroupCollection

NewCollection return a new instance of a group collection object.

type GroupFactoryInterface

type GroupFactoryInterface interface {
}

type GroupInherit

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

GroupInherit is the main struct for operating a groupInherit object, which shall

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

func (*GroupInherit) Aggregate

func (t *GroupInherit) Aggregate() *Group

func (*GroupInherit) AggregateID

func (t *GroupInherit) AggregateID() string

func (*GroupInherit) GetID

func (t *GroupInherit) GetID() string

func (*GroupInherit) Inherit

func (t *GroupInherit) Inherit() *Group

func (*GroupInherit) InheritID

func (t *GroupInherit) InheritID() string

func (*GroupInherit) Init

func (*GroupInherit) JSON

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

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

func (*GroupInherit) Map

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

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

func (*GroupInherit) Pb

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

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

type GroupInheritCollection

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

GroupInheritCollection is the main struct for operating a list groupInherit object, which shall

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

func (*GroupInheritCollection) Aggregate

func (*GroupInheritCollection) GetByID

func (c *GroupInheritCollection) GetByID(id string) *GroupInherit

GetByID return the groupInherit in this collection, by id.

func (*GroupInheritCollection) GetKeys

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

GetByID return the groupInherit in this collection, by id.

func (*GroupInheritCollection) Rehydrate

func (c *GroupInheritCollection) Rehydrate(pbGroupInherits []*pb.GroupInherit)

func (*GroupInheritCollection) Slice

func (c *GroupInheritCollection) Slice() []*GroupInherit

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

func (*GroupInheritCollection) SlicePb

func (c *GroupInheritCollection) SlicePb() []*pb.GroupInherit

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

type GroupInternalLibrary

type GroupInternalLibrary struct {
	NewGroupInheritFactory func(libdomain.WorkflowInterface) *groupInheritFactory
}

type Organization

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

Organization is the main struct for operating a organization object, which shall

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

func (*Organization) Delete

func (t *Organization) Delete() error

Delete will delete the organization from the database.

func (*Organization) ExternalID

func (t *Organization) ExternalID() string

func (*Organization) ExternalModule

func (t *Organization) ExternalModule() string

func (*Organization) GetID

func (t *Organization) GetID() string

func (*Organization) ID

func (t *Organization) ID() string

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

func (*Organization) IncludeUsers

func (t *Organization) IncludeUsers() error

func (*Organization) Init

func (*Organization) JSON

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

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

func (*Organization) Map

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

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

func (*Organization) Name

func (t *Organization) Name() string

func (*Organization) Parent

func (t *Organization) Parent() *Organization

func (*Organization) ParentID

func (t *Organization) ParentID() string

func (*Organization) Pb

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

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

func (*Organization) TenantID

func (t *Organization) TenantID() string

func (*Organization) Update

Delete will delete the organization from the database.

func (*Organization) Users

func (t *Organization) Users() []*OrganizationUser

type OrganizationCollection

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

OrganizationCollection is the main struct for operating a list organization object, which shall

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

func (*OrganizationCollection) Aggregate

func (*OrganizationCollection) Delete

func (d *OrganizationCollection) Delete() error

Delete will delete all the organizations in the collection.

func (*OrganizationCollection) GetByID

func (c *OrganizationCollection) GetByID(id string) *Organization

GetByID return the organization in this collection, by id.

func (*OrganizationCollection) GetKeys

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

GetByID return the organization in this collection, by id.

func (*OrganizationCollection) IncludeUsers

func (t *OrganizationCollection) IncludeUsers() error

func (*OrganizationCollection) Map

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

func (*OrganizationCollection) ParentsByOrganizationID

func (t *OrganizationCollection) ParentsByOrganizationID() (map[string]*Organization, error)

ParentsByOrganizationID return the organization behind ParentID field, for each organization in the collection, by id.

func (*OrganizationCollection) Rehydrate

func (c *OrganizationCollection) Rehydrate(pbOrganizations []*pb.Organization)

func (*OrganizationCollection) Slice

func (c *OrganizationCollection) Slice() []*Organization

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

func (*OrganizationCollection) SlicePb

func (c *OrganizationCollection) SlicePb() []*pb.Organization

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

func (*OrganizationCollection) Update

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

func (*OrganizationCollection) Users

UserssByOrganizationID return the organizationUser behind Users field, for each organization in the collection, by id.

type OrganizationFactory

type OrganizationFactory struct {
	*libdomain.Factory
	OrganizationFactoryInterface
}

OrganizationFactory is the main struct for operating organization objects, which shall

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

func (*OrganizationFactory) Create

func (d *OrganizationFactory) Create(
	organizations []*pb.CreateOrganizationCommand, parentAggregate *libdomain.AggregateDefinition,
) (*OrganizationCollection, error)

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

func (*OrganizationFactory) New

New return a new instance of a organization object.

func (*OrganizationFactory) NewCollection

func (d *OrganizationFactory) NewCollection(organizations []*Organization) *OrganizationCollection

NewCollection return a new instance of a organization collection object.

type OrganizationFactoryInterface

type OrganizationFactoryInterface interface {
}

type OrganizationInternalLibrary

type OrganizationInternalLibrary struct {
	NewOrganizationUserFactory      func(libdomain.WorkflowInterface) *organizationUserFactory
	NewOrganizationUserGroupFactory func(libdomain.WorkflowInterface) *organizationUserGroupFactory
}

type OrganizationOrganizationCreateTenantResults

type OrganizationOrganizationCreateTenantResults struct {
	Tenant *Tenant
}

OrganizationCreateTenant todo

type OrganizationUser

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

OrganizationUser is the main struct for operating a organizationUser object, which shall

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

func (*OrganizationUser) Aggregate

func (t *OrganizationUser) Aggregate() *Organization

func (*OrganizationUser) AggregateID

func (t *OrganizationUser) AggregateID() string

func (*OrganizationUser) ExternalID

func (t *OrganizationUser) ExternalID() string

func (*OrganizationUser) ExternalModule

func (t *OrganizationUser) ExternalModule() string

func (*OrganizationUser) GetID

func (t *OrganizationUser) GetID() string

func (*OrganizationUser) ID

func (t *OrganizationUser) ID() string

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

func (*OrganizationUser) Init

func (*OrganizationUser) JSON

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

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

func (*OrganizationUser) Map

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

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

func (*OrganizationUser) Pb

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

func (*OrganizationUser) TenantID

func (t *OrganizationUser) TenantID() string

func (*OrganizationUser) User

func (t *OrganizationUser) User() *User

func (*OrganizationUser) UserID

func (t *OrganizationUser) UserID() string

type OrganizationUserCollection

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

OrganizationUserCollection is the main struct for operating a list organizationUser object, which shall

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

func (*OrganizationUserCollection) Aggregate

func (*OrganizationUserCollection) GetByID

GetByID return the organizationUser in this collection, by id.

func (*OrganizationUserCollection) GetKeys

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

GetByID return the organizationUser in this collection, by id.

func (*OrganizationUserCollection) Map

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

func (*OrganizationUserCollection) Rehydrate

func (c *OrganizationUserCollection) Rehydrate(pbOrganizationUsers []*pb.OrganizationUser)

func (*OrganizationUserCollection) Slice

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

func (*OrganizationUserCollection) SlicePb

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

type OrganizationUserGroup

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

OrganizationUserGroup is the main struct for operating a organizationUserGroup object, which shall

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

func (*OrganizationUserGroup) Aggregate

func (t *OrganizationUserGroup) Aggregate() *Organization

func (*OrganizationUserGroup) AggregateID

func (t *OrganizationUserGroup) AggregateID() string

func (*OrganizationUserGroup) GetID

func (t *OrganizationUserGroup) GetID() string

func (*OrganizationUserGroup) Group

func (t *OrganizationUserGroup) Group() *Group

func (*OrganizationUserGroup) GroupID

func (t *OrganizationUserGroup) GroupID() string

func (*OrganizationUserGroup) Init

func (*OrganizationUserGroup) JSON

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

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

func (*OrganizationUserGroup) Map

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

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

func (*OrganizationUserGroup) OrganizationUser

func (t *OrganizationUserGroup) OrganizationUser() *OrganizationUser

func (*OrganizationUserGroup) OrganizationUserID

func (t *OrganizationUserGroup) OrganizationUserID() string

func (*OrganizationUserGroup) Pb

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

type OrganizationUserGroupCollection

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

OrganizationUserGroupCollection is the main struct for operating a list organizationUserGroup object, which shall

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

func (*OrganizationUserGroupCollection) Aggregate

func (*OrganizationUserGroupCollection) GetByID

GetByID return the organizationUserGroup in this collection, by id.

func (*OrganizationUserGroupCollection) GetKeys

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

GetByID return the organizationUserGroup in this collection, by id.

func (*OrganizationUserGroupCollection) Rehydrate

func (c *OrganizationUserGroupCollection) Rehydrate(pbOrganizationUserGroups []*pb.OrganizationUserGroup)

func (*OrganizationUserGroupCollection) Slice

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

func (*OrganizationUserGroupCollection) SlicePb

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

type PbGroup

type PbGroup = pb.Group

type PbGroupInherit

type PbGroupInherit = pb.GroupInherit

type PbOrganization

type PbOrganization = pb.Organization

type PbOrganizationUser

type PbOrganizationUser = pb.OrganizationUser

type PbOrganizationUserGroup

type PbOrganizationUserGroup = pb.OrganizationUserGroup

type PbSession

type PbSession = pb.Session

type PbTenant

type PbTenant = tenantpb.Tenant

type PbUser

type PbUser = pb.User

type PbUserEmail

type PbUserEmail = pb.UserEmail

type PbUserGroup

type PbUserGroup = pb.UserGroup

type Session

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

Session is the main struct for operating a session object, which shall

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

func (*Session) Delete

func (t *Session) Delete() error

Delete will delete the session from the database.

func (*Session) ExternalID

func (t *Session) ExternalID() string

func (*Session) ExternalModule

func (t *Session) ExternalModule() string

func (*Session) GetID

func (t *Session) GetID() string

func (*Session) ID

func (t *Session) ID() string

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

func (*Session) Init

func (t *Session) Init(wk libdomain.WorkflowInterface, pb *pb.Session)

func (*Session) JSON

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

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

func (*Session) Map

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

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

func (*Session) Pb

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

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

func (*Session) TenantID

func (t *Session) TenantID() string

func (*Session) Token

func (t *Session) Token() string

func (*Session) User

func (t *Session) User() *User

func (*Session) UserID

func (t *Session) UserID() string

type SessionCollection

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

SessionCollection is the main struct for operating a list session object, which shall

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

func (*SessionCollection) Aggregate

func (*SessionCollection) Delete

func (d *SessionCollection) Delete() error

Delete will delete all the sessions in the collection.

func (*SessionCollection) GetByID

func (c *SessionCollection) GetByID(id string) *Session

GetByID return the session in this collection, by id.

func (*SessionCollection) GetKeys

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

GetByID return the session in this collection, by id.

func (*SessionCollection) Map

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

func (*SessionCollection) Rehydrate

func (c *SessionCollection) Rehydrate(pbSessions []*pb.Session)

func (*SessionCollection) Slice

func (c *SessionCollection) Slice() []*Session

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

func (*SessionCollection) SlicePb

func (c *SessionCollection) SlicePb() []*pb.Session

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

func (*SessionCollection) UsersBySessionID

func (t *SessionCollection) UsersBySessionID() (map[string]*User, error)

UsersBySessionID return the user behind UserID field, for each session in the collection, by id.

type SessionFactory

type SessionFactory struct {
	*libdomain.Factory
	SessionFactoryInterface
}

SessionFactory is the main struct for operating session objects, which shall

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

func (*SessionFactory) Create

func (d *SessionFactory) Create(
	sessions []*pb.CreateSessionCommand, parentAggregate *libdomain.AggregateDefinition,
) (*SessionCollection, error)

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

func (*SessionFactory) New

func (d *SessionFactory) New() *Session

New return a new instance of a session object.

func (*SessionFactory) NewCollection

func (d *SessionFactory) NewCollection(sessions []*Session) *SessionCollection

NewCollection return a new instance of a session collection object.

type SessionFactoryInterface

type SessionFactoryInterface interface {
}

type SessionInternalLibrary

type SessionInternalLibrary struct {
}

type Tenant

type Tenant = tenant.Tenant

type TestClientInterface

type TestClientInterface interface {
}

type User

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

User is the main struct for operating a user object, which shall

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

func (*User) ComputeUserGroups

func (a *User) ComputeUserGroups(command *pb.UserComputeUserGroupsCommand) (*pb.UserComputeUserGroupsResults, error)

func (*User) Delete

func (t *User) Delete() error

Delete will delete the user from the database.

func (*User) Emails

func (t *User) Emails() []*UserEmail

func (*User) ExternalID

func (t *User) ExternalID() string

func (*User) ExternalModule

func (t *User) ExternalModule() string

func (*User) GetID

func (t *User) GetID() string

func (*User) GroupIds

func (t *User) GroupIds() []string

func (*User) Groups

func (t *User) Groups() []*Group

func (*User) ID

func (t *User) ID() string

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

func (*User) IncludeEmails

func (t *User) IncludeEmails() error

func (*User) IncludeGroups

func (t *User) IncludeGroups() error

func (*User) Init

func (t *User) Init(wk libdomain.WorkflowInterface, pb *pb.User)

func (*User) JSON

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

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

func (*User) Map

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

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

func (*User) Name

func (t *User) Name() string

func (*User) Parent

func (t *User) Parent() *User

func (*User) ParentID

func (t *User) ParentID() string

func (*User) Password

func (t *User) Password() string

func (*User) Pb

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

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

func (*User) TenantID

func (t *User) TenantID() string

func (*User) Update

func (t *User) Update(r *pb.UpdateUserData) error

Delete will delete the user from the database.

type UserCollection

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

UserCollection is the main struct for operating a list user object, which shall

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

func (*UserCollection) Aggregate

func (*UserCollection) ComputeUserGroups

func (*UserCollection) Delete

func (d *UserCollection) Delete() error

Delete will delete all the users in the collection.

func (*UserCollection) Emails

func (t *UserCollection) Emails() (map[string]*UserEmailCollection, error)

EmailssByUserID return the userEmail behind Emails field, for each user in the collection, by id.

func (*UserCollection) GetByID

func (c *UserCollection) GetByID(id string) *User

GetByID return the user in this collection, by id.

func (*UserCollection) GetKeys

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

GetByID return the user in this collection, by id.

func (*UserCollection) GroupsByUserID

func (t *UserCollection) GroupsByUserID() (map[string]*GroupCollection, error)

GroupssByUserID return the group behind GroupIds field, for each user in the collection, by id.

func (*UserCollection) IncludeEmails

func (t *UserCollection) IncludeEmails() error

func (*UserCollection) IncludeGroups

func (t *UserCollection) IncludeGroups() error

func (*UserCollection) Map

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

func (*UserCollection) ParentsByUserID

func (t *UserCollection) ParentsByUserID() (map[string]*User, error)

ParentsByUserID return the user behind ParentID field, for each user in the collection, by id.

func (*UserCollection) Rehydrate

func (c *UserCollection) Rehydrate(pbUsers []*pb.User)

func (*UserCollection) Slice

func (c *UserCollection) Slice() []*User

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

func (*UserCollection) SlicePb

func (c *UserCollection) SlicePb() []*pb.User

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

func (*UserCollection) Update

func (d *UserCollection) Update(r *pb.UpdateUserData) error

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

type UserComputeUserGroupsResults

type UserComputeUserGroupsResults struct {
	User   *User
	Groups []*Group
}

ComputeUserGroups todo

type UserDirectConnectToTenantResults

type UserDirectConnectToTenantResults struct {
	AuthToken string
}

DirectConnectToTenant todo

type UserEmail

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

UserEmail is the main struct for operating a userEmail object, which shall

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

func (*UserEmail) Aggregate

func (t *UserEmail) Aggregate() *User

func (*UserEmail) AggregateID

func (t *UserEmail) AggregateID() string

func (*UserEmail) Email

func (t *UserEmail) Email() string

func (*UserEmail) EmailConfirmationToken

func (t *UserEmail) EmailConfirmationToken() string

func (*UserEmail) EmailConfirmed

func (t *UserEmail) EmailConfirmed() bool

func (*UserEmail) ExternalID

func (t *UserEmail) ExternalID() string

func (*UserEmail) ExternalModule

func (t *UserEmail) ExternalModule() string

func (*UserEmail) GetID

func (t *UserEmail) GetID() string

func (*UserEmail) ID

func (t *UserEmail) ID() string

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

func (*UserEmail) Init

func (*UserEmail) JSON

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

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

func (*UserEmail) Map

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

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

func (*UserEmail) Pb

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

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

func (*UserEmail) TenantID

func (t *UserEmail) TenantID() string

type UserEmailCollection

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

UserEmailCollection is the main struct for operating a list userEmail object, which shall

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

func (*UserEmailCollection) Aggregate

func (*UserEmailCollection) GetByID

func (c *UserEmailCollection) GetByID(id string) *UserEmail

GetByID return the userEmail in this collection, by id.

func (*UserEmailCollection) GetKeys

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

GetByID return the userEmail in this collection, by id.

func (*UserEmailCollection) Map

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

func (*UserEmailCollection) Rehydrate

func (c *UserEmailCollection) Rehydrate(pbUserEmails []*pb.UserEmail)

func (*UserEmailCollection) Slice

func (c *UserEmailCollection) Slice() []*UserEmail

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

func (*UserEmailCollection) SlicePb

func (c *UserEmailCollection) SlicePb() []*pb.UserEmail

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

type UserEmailConfirmationResults

type UserEmailConfirmationResults struct {
	User      *User
	AuthToken string
}

EmailConfirmation todo

type UserEmailResetConfirmationTokenResults

type UserEmailResetConfirmationTokenResults struct {
	EmailToken string
}

EmailResetConfirmationToken todo

type UserFactory

type UserFactory struct {
	*libdomain.Factory
	UserFactoryInterface
}

UserFactory is the main struct for operating user objects, which shall

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

func (*UserFactory) Create

func (d *UserFactory) Create(
	users []*pb.CreateUserCommand, parentAggregate *libdomain.AggregateDefinition,
) (*UserCollection, error)

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

func (*UserFactory) DirectConnectToTenant

func (*UserFactory) EmailConfirmation

func (*UserFactory) GetUserFromToken

func (a *UserFactory) GetUserFromToken(command *pb.UserGetUserFromTokenQuery) (*pb.UserGetUserFromTokenResults, error)

func (*UserFactory) LoginUser

func (a *UserFactory) LoginUser(command *pb.UserLoginUserCommand) (*pb.UserLoginUserResults, error)

func (*UserFactory) New

func (d *UserFactory) New() *User

New return a new instance of a user object.

func (*UserFactory) NewCollection

func (d *UserFactory) NewCollection(users []*User) *UserCollection

NewCollection return a new instance of a user collection object.

func (*UserFactory) PasswordChange

func (*UserFactory) PasswordReset

func (*UserFactory) RegisterUser

func (a *UserFactory) RegisterUser(command *pb.UserRegisterUserCommand) (*pb.UserRegisterUserResults, error)

func (*UserFactory) UserCreateOrganization

type UserFactoryInterface

type UserFactoryInterface interface {
}

type UserGetUserFromTokenResults

type UserGetUserFromTokenResults struct {
	User   *User
	Groups []*Group
}

GetUserFromToken todo

type UserGroup

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

UserGroup is the main struct for operating a userGroup object, which shall

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

func (*UserGroup) Aggregate

func (t *UserGroup) Aggregate() *User

func (*UserGroup) AggregateID

func (t *UserGroup) AggregateID() string

func (*UserGroup) GetID

func (t *UserGroup) GetID() string

func (*UserGroup) Group

func (t *UserGroup) Group() *Group

func (*UserGroup) GroupID

func (t *UserGroup) GroupID() string

func (*UserGroup) Init

func (*UserGroup) JSON

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

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

func (*UserGroup) Map

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

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

func (*UserGroup) Pb

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

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

type UserGroupCollection

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

UserGroupCollection is the main struct for operating a list userGroup object, which shall

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

func (*UserGroupCollection) Aggregate

func (*UserGroupCollection) GetByID

func (c *UserGroupCollection) GetByID(id string) *UserGroup

GetByID return the userGroup in this collection, by id.

func (*UserGroupCollection) GetKeys

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

GetByID return the userGroup in this collection, by id.

func (*UserGroupCollection) Rehydrate

func (c *UserGroupCollection) Rehydrate(pbUserGroups []*pb.UserGroup)

func (*UserGroupCollection) Slice

func (c *UserGroupCollection) Slice() []*UserGroup

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

func (*UserGroupCollection) SlicePb

func (c *UserGroupCollection) SlicePb() []*pb.UserGroup

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

type UserInternalLibrary

type UserInternalLibrary struct {
	NewUserEmailFactory func(libdomain.WorkflowInterface) *userEmailFactory
	NewUserGroupFactory func(libdomain.WorkflowInterface) *userGroupFactory
}

type UserLoginUserResults

type UserLoginUserResults struct {
	AuthToken string
}

LoginUser todo

type UserPasswordChangeResults

type UserPasswordChangeResults struct {
	AuthToken string
}

PasswordChange todo

type UserPasswordResetResults

type UserPasswordResetResults struct {
}

PasswordReset todo

type UserRegisterUserResults

type UserRegisterUserResults struct {
	User      *User
	AuthToken string
}

RegisterUser todo

type UserUserCreateOrganizationResults

type UserUserCreateOrganizationResults struct {
	Organization *Organization
}

UserCreateOrganization todo

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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