usecases

package
v0.0.0-...-159e443 Latest Latest
Warning

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

Go to latest
Published: May 19, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAccessToken

func CheckAccessToken(
	token string, authRepo repositories.IAuthRepository,
	userRepo repositories.IUserRepository,
) (user models.User, err error)

CheckAccessToken usecases checks access token

func CreateAccessToken

func CreateAccessToken(
	login models.Login,
	authRepo repositories.IAuthRepository,
) (token models.Accesstoken, err error)

CreateAccessToken usecase returns access token

func CreateMessage

func CreateMessage(
	fromUser models.User, toUser string,
	message models.MessageCreate,
	userRepo repositories.IUserRepository,
	messageRepo repositories.IMessageRepository,
) (createdMessage models.Message, err error)

CreateMessage inserts message to Database

func CreateUser

func CreateUser(
	signup models.Signup,
	authRepo repositories.IAuthRepository,
) (user models.User)

CreateUser Creates User

func GetUserMessages

func GetUserMessages(
	fromUser models.User,
	toUser string,
	userRepo repositories.IUserRepository,
	messageRepo repositories.IMessageRepository,
) (messages repositories.Messages, err error)

GetUserMessages returns users messages

func GetUsers

GetUsers usecase returns user list

Types

This section is empty.

Jump to

Keyboard shortcuts

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