service

package
v0.0.0-...-fa04af2 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountService

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

AccountService - service

func NewAccountService

func NewAccountService(repo repository.Accounter, config *config.Auth) *AccountService

NewAccountService - constructor

func (*AccountService) CreateAccount

func (s *AccountService) CreateAccount(account domain.Account) error

func (*AccountService) DeleteAccount

func (s *AccountService) DeleteAccount(accountPublicId uuid.UUID) error

func (*AccountService) GenerateTokenByCreds

func (s *AccountService) GenerateTokenByCreds(email, password string) (string, error)

func (*AccountService) ParseToken

func (s *AccountService) ParseToken(token string) (string, error)

func (*AccountService) UpdateAccountInfo

func (s *AccountService) UpdateAccountInfo(input domain.UpdateAccountInput) error

func (*AccountService) UpdateAccountRole

func (s *AccountService) UpdateAccountRole(input domain.UpdateAccountRoleInput) error

type Accounter

type Accounter interface {
	CreateAccount(account domain.Account) error
	UpdateAccountInfo(input domain.UpdateAccountInput) error
	UpdateAccountRole(input domain.UpdateAccountRoleInput) error
	DeleteAccount(accountPublicId uuid.UUID) error
	GenerateTokenByCreds(email, password string) (string, error)
	ParseToken(token string) (string, error)
}

type Service

type Service struct {
	Accounter
}

Service - just service

func NewService

func NewService(repos *repository.Repository, config *config.Auth) *Service

NewService - constructor

Jump to

Keyboard shortcuts

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