infrastructure

package
v0.0.0-...-66c1001 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceAdapter

type ServiceAdapter struct {
}

func NewServiceAdapter

func NewServiceAdapter() ServiceAdapter

func (ServiceAdapter) ChangePassword

func (a ServiceAdapter) ChangePassword(ctx context.Context, userPassword *pb.UserPassword) error

ChangePassword changes the poassword of the given user in the database.

func (ServiceAdapter) CreateUser

func (a ServiceAdapter) CreateUser(ctx context.Context, user *pb.User) (*pb.User, error)

CreateUser insert a new user in the databse.

func (ServiceAdapter) DeleteUser

func (a ServiceAdapter) DeleteUser(ctx context.Context, user *pb.User) (*pb.User, error)

DeleteUser soft-deletes the given user in the database.

func (ServiceAdapter) GetErrors

func (a ServiceAdapter) GetErrors(ctx context.Context) (*pb.Errors, error)

GetErrors returns the built-in errors.

func (ServiceAdapter) GetErrorsDynamic

func (a ServiceAdapter) GetErrorsDynamic(ctx context.Context, msg string, host string, port string) *pb.Errors

func (ServiceAdapter) GetUsersByFilter

func (a ServiceAdapter) GetUsersByFilter(ctx context.Context, userFilter *pb.UserFilter) (*pb.Users, error)

GetUsersByFilter returns the users that match the given filter.

func (ServiceAdapter) Log

func (a ServiceAdapter) Log(ctx context.Context, logData *pb.LogData) (*pb.LoggingResult, error)

Log sends the given log to the logging micro service.

func (ServiceAdapter) Login

func (a ServiceAdapter) Login(ctx context.Context, loginRequest *pb.LoginRequest) (*pb.Token, error)

Login generates an authentication token if the given users are valid.

func (ServiceAdapter) Logout

func (a ServiceAdapter) Logout(ctx context.Context, token *pb.Token) error

Logout clears some footprints for the user.

func (ServiceAdapter) Refresh

func (a ServiceAdapter) Refresh(ctx context.Context, token *pb.Token) (*pb.Token, error)

Refresh regenerate an authentication token.

func (ServiceAdapter) UpdateUserBase

func (a ServiceAdapter) UpdateUserBase(ctx context.Context, user *pb.User) (*pb.User, error)

UpdateUserBase sends the given user to the application layer for updating user base values.

func (ServiceAdapter) UpdateUserRole

func (a ServiceAdapter) UpdateUserRole(ctx context.Context, user *pb.User) (*pb.User, error)

UpdateUserRole sends the given user to the application layer for updating user role.

func (ServiceAdapter) UpdateUserStatus

func (a ServiceAdapter) UpdateUserStatus(ctx context.Context, user *pb.User) (*pb.User, error)

UpdateUserStatus sends the given user to the application layer for updating user status.

Jump to

Keyboard shortcuts

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