gendomain

package
v0.0.0-...-ec57856 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: Apache-2.0 Imports: 20 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 GroupInheritValueObject *groupInheritValueObject
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 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 UserEntity *userEntity
View Source
var UserGroupValueObject *userGroupValueObject

Functions

Types

type DummyStruct

type DummyStruct struct{}

type Group

type Group struct {
	Pb       *pb.Group
	Workflow libdomain.WorkflowInterface
}

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

func (t *Group) GetID() string

SetID is a function to set the ID of the 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) SetID

func (t *Group) SetID(id string)

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

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
}

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

func (t *GroupCollection) IncludeInherits() error

func (*GroupCollection) InheritsByGroupID

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

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

func (*GroupCollection) Map

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

func (*GroupCollection) Slice

func (c *GroupCollection) Slice() []*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 *libdata.Aggregate,
) (*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(records *libdomain.Collection) *GroupCollection

NewCollection return a new instance of a group collection object.

type GroupFactoryInterface

type GroupFactoryInterface interface {
}

type GroupInherit

type GroupInherit struct {
	Pb       *pb.GroupInherit
	Workflow libdomain.WorkflowInterface
}

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

func (t *GroupInherit) Delete() error

Delete will delete the groupInherit from the database.

func (*GroupInherit) GetID

func (t *GroupInherit) GetID() string

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

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.

type GroupInheritCollection

type GroupInheritCollection struct {
	*libdomain.Collection
}

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

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

GetByID return the groupInherit in this collection, by id.

func (*GroupInheritCollection) Slice

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

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

type GroupInternalLibrary

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

type Session

type Session struct {
	Pb       *pb.Session
	Workflow libdomain.WorkflowInterface
}

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

func (t *Session) GetID() string

SetID is a function to set the ID of the 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) SetID

func (t *Session) SetID(id string)

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

type SessionCollection

type SessionCollection struct {
	*libdomain.Collection
}

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

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

func (*SessionCollection) Slice

func (c *SessionCollection) Slice() []*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 *libdata.Aggregate,
) (*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(records *libdomain.Collection) *SessionCollection

NewCollection return a new instance of a session collection object.

type SessionFactoryInterface

type SessionFactoryInterface interface {
}

type SessionInternalLibrary

type SessionInternalLibrary struct {
}

type User

type User struct {
	Pb       *pb.User
	Workflow libdomain.WorkflowInterface
}

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

func (t *User) Delete() error

Delete will delete the user from the database.

func (*User) GetID

func (t *User) GetID() string

SetID is a function to set the ID of the 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) SetID

func (t *User) SetID(id string)

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

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
}

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

func (d *UserCollection) Delete() error

Delete will delete all the users in the collection.

func (*UserCollection) GetByID

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

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 Groups field, for each user in the collection, by id.

func (*UserCollection) IncludeGroups

func (t *UserCollection) IncludeGroups() error

func (*UserCollection) Map

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

func (*UserCollection) Slice

func (c *UserCollection) Slice() []*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 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 *libdata.Aggregate,
) (*UserCollection, error)

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

func (*UserFactory) New

func (d *UserFactory) New() *User

New return a new instance of a user object.

func (*UserFactory) NewCollection

func (d *UserFactory) NewCollection(records *libdomain.Collection) *UserCollection

NewCollection return a new instance of a user collection object.

type UserFactoryInterface

type UserFactoryInterface interface {
}

type UserGetUserFromTokenResults

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

GetUserFromToken todo

type UserGroup

type UserGroup struct {
	Pb       *pb.UserGroup
	Workflow libdomain.WorkflowInterface
}

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

func (t *UserGroup) Delete() error

Delete will delete the userGroup from the database.

func (*UserGroup) GetID

func (t *UserGroup) GetID() string

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

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.

type UserGroupCollection

type UserGroupCollection struct {
	*libdomain.Collection
}

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

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

GetByID return the userGroup in this collection, by id.

func (*UserGroupCollection) Slice

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

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

type UserInternalLibrary

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

type UserLoginResults

type UserLoginResults struct {
	Token string
}

Login todo

type UserRegisterResults

type UserRegisterResults struct {
	User  *User
	Token string
}

Register todo

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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