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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandAdapter

type CommandAdapter struct {
	Service *as.Service
}

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

func (a CommandAdapter) CreateUser(ctx context.Context, user me.User) (me.User, error)

CreateUser sends the given user to the application layer for creating a new user.

func (CommandAdapter) DeleteUser

func (a CommandAdapter) DeleteUser(ctx context.Context, user me.User) (me.User, error)

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

func (a CommandAdapter) UpdateUserBase(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.

func (CommandAdapter) UpdateUserRole

func (a CommandAdapter) UpdateUserRole(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.

func (CommandAdapter) UpdateUserStatus

func (a CommandAdapter) UpdateUserStatus(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.

Jump to

Keyboard shortcuts

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