application

package
v0.0.0-...-94051e6 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandPort

type CommandPort interface {
	LoggingCommandPort
	AuthenticationCommandPort
	UserCommandPort
}

CommandPort is a port for Hexagonal Architecture Pattern. It is used to communicate with the application layer.

type LoggingCommandPort

type LoggingCommandPort interface {
	// Log sends the given log to the logging micro service.
	Log(ctx context.Context, logData *pb.LogData) (*pb.LoggingResult, error)
}

CommandPort is a port for Hexagonal Architecture Pattern. It is used to communicate with the application layer.

type UserCommandPort

type UserCommandPort interface {
	// CreateUser sends the given user to the application layer for creating a new user.
	CreateUser(ctx context.Context, user me.User) (me.User, error)

	// UpdateUserBase sends the given base values of the user to the repository of the infrastructure layer for updating base values of user data.
	UpdateUserBase(ctx context.Context, user me.User) (me.User, error)

	// UpdateUserStatus sends the given status value of the user to the repository of the infrastructure layer for updating status of user data.
	UpdateUserStatus(ctx context.Context, user me.User) (me.User, error)

	// UpdateUserRole sends the given type value of the user to the repository of the infrastructure layer for updating role of user data.
	UpdateUserRole(ctx context.Context, user me.User) (me.User, error)

	// DeleteUser sends the given user to the application layer for deleting data.
	DeleteUser(ctx context.Context, user me.User) (me.User, error)

	// ChangePassword sends the given user password to the application layer for changing user password.
	ChangePassword(ctx context.Context, userPassword me.UserPassword) error
}

CommandPort is a port for Hexagonal Architecture Pattern. It is used to communicate with the application layer.

Jump to

Keyboard shortcuts

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