application

package
v0.0.0-...-58cf2e1 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticationCommandPort

type AuthenticationCommandPort interface {
	// Login generates an authentication token if the given users are valid.
	Login(ctx context.Context, loginRequest *pb.LoginRequest) (*pb.Token, error)

	// Refresh regenerate an authentication token.
	Refresh(ctx context.Context, token *pb.Token) (*pb.Token, error)

	// Logout clears some footprints for the user.
	Logout(ctx context.Context, token *pb.Token) error
}

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

type CommandPort

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

type DlrCommandPort

type DlrCommandPort interface {
	// CreateDlr sends the given dlr to the application layer for creating a new dlr.
	CreateDlr(ctx context.Context, dlr *pb.Dlr) (*pb.Dlr, error)

	// UpdateDlrBase sends the given dlr to the application layer for updating dlr base values.
	UpdateDlrBase(ctx context.Context, dlr *pb.Dlr) (*pb.Dlr, error)

	// UpdateDlrCore sends the given dlr to the application layer for updating dlr core values.
	UpdateDlrCore(ctx context.Context, dlr *pb.Dlr) (*pb.Dlr, error)

	// UpdateDlrStatus sends the given dlr to the application layer for updating dlr status.
	UpdateDlrStatus(ctx context.Context, dlr *pb.Dlr) (*pb.Dlr, error)

	// DeleteDlr sends the given dlr to the application layer for deleting data.
	DeleteDlr(ctx context.Context, dlr *pb.Dlr) (*pb.Dlr, error)
}

DlrCommandPort 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)
}

UserCommandPort 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 *pb.User) (*pb.User, error)

	// UpdateUserRole sends the given user to the application layer for updating user role.
	UpdateUserRole(ctx context.Context, user *pb.User) (*pb.User, error)

	// UpdateUserBase sends the given user to the application layer for updating user base values.
	UpdateUserBase(ctx context.Context, user *pb.User) (*pb.User, error)

	// UpdateUserStatus sends the given user to the application layer for updating user status.
	UpdateUserStatus(ctx context.Context, user *pb.User) (*pb.User, error)

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

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

UserCommandPort 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