interactors

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateToken

type CreateToken struct {
	// contains filtered or unexported fields
}

CreateToken has all dependencies and methods to enable the create token use case execution. It is composed by the logger and user proxy services.

func NewCreateToken

func NewCreateToken(logger logging.Logger, userProxy http.UserProxy) *CreateToken

NewCreateToken creates a new CreateToken instance by receiving its dependencies.

func (*CreateToken) Execute

func (ct *CreateToken) Execute(user entities.User) (token string, err error)

Execute receives the user entity filled with e-mail and password properties and try to create a token on the user proxy service. If it succeed, the token is returned.

type CreateUser

type CreateUser struct {
	// contains filtered or unexported fields
}

CreateUser to interact to user

func NewCreateUser

func NewCreateUser(logger logging.Logger, userProxy http.UserProxy) *CreateUser

NewCreateUser contructs the interactor

func (*CreateUser) Execute

func (cu *CreateUser) Execute(user entities.User) (err error)

Execute runs the use case

Jump to

Keyboard shortcuts

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