Documentation ¶
Index ¶
- type CommandAdapter
- func (a CommandAdapter) ChangePassword(ctx context.Context, userPassword me.UserPassword) error
- func (a CommandAdapter) CreateUser(ctx context.Context, user me.User) (me.User, error)
- func (a CommandAdapter) DeleteUser(ctx context.Context, user me.User) (me.User, error)
- func (a CommandAdapter) Log(ctx context.Context, logData *pb.LogData) (*pb.LoggingResult, error)
- func (a CommandAdapter) UpdateUserBase(ctx context.Context, user me.User) (me.User, error)
- func (a CommandAdapter) UpdateUserRole(ctx context.Context, user me.User) (me.User, error)
- func (a CommandAdapter) UpdateUserStatus(ctx context.Context, user me.User) (me.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandAdapter ¶
CommandAdapter is an adapter for Hexagonal Architecture Pattern. It is used to communicate with the application layer.
func NewCommandAdapter ¶
func NewCommandAdapter(s *as.Service) CommandAdapter
NewCommandAdapter creates a new *CommandAdapter.
func (CommandAdapter) ChangePassword ¶
func (a CommandAdapter) ChangePassword(ctx context.Context, userPassword me.UserPassword) error
ChangePassword sends the given user password to the application layer for changing user password.
func (CommandAdapter) CreateUser ¶
CreateUser sends the given user to the application layer for creating a new user.
func (CommandAdapter) DeleteUser ¶
DeleteUser sends the given user to the application layer for deleting data.
func (CommandAdapter) Log ¶
func (a CommandAdapter) Log(ctx context.Context, logData *pb.LogData) (*pb.LoggingResult, error)
Log sends the given log to the logging micro service.
func (CommandAdapter) UpdateUserBase ¶
UpdateUserBase sends the given base values of the user to the repository of the infrastructure layer for updating base values of user data.
func (CommandAdapter) UpdateUserRole ¶
UpdateUserRole sends the given type value of the user to the repository of the infrastructure layer for updating role of user data.
func (CommandAdapter) UpdateUserStatus ¶
UpdateUserStatus sends the given status value of the user to the repository of the infrastructure layer for updating status of user data.