service

package
v0.0.0-...-035dfa4 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package service provides RPC methods to call repository actions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthService

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

func (*AuthService) DeleteUser

func (as *AuthService) DeleteUser(req, res *models.GetUserRequest) error

DeleteUser RPC method takes two pointers to GetUserRequest

func (*AuthService) GetUser

func (as *AuthService) GetUser(req *models.GetUserRequest, res *models.User) error

GetUser RPC method takes a GetUserRequest and a User

func (*AuthService) ListUsers

func (as *AuthService) ListUsers(trash string, res *models.GetUsersResponse) error

ListUsers RPC method takes a trash string because RPC methods need two parameters, an arbitrary request (trash) and a pointer to a response.

func (*AuthService) SignIn

func (as *AuthService) SignIn(req *models.SignInRequest, res *models.User) error

SignIn RPC method takes a SignInRequest and a User

func (*AuthService) SignUp

func (as *AuthService) SignUp(req *models.SignUpRequest, res *models.User) error

SignUp RPC method takes pointers to a SignUpRequest and a User

func (*AuthService) UpdateUser

func (as *AuthService) UpdateUser(req *models.User, res *models.User) error

UpdateUser RPC method takes two pointers to User

type AuthSvc

AuthSvc interface defines the RPC methods to call repository actions

func NewAuthService

func NewAuthService(usersRepository repository.UsersRepository) AuthSvc

NewAuthService takes a users repository and returns an AuthSvc

Jump to

Keyboard shortcuts

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