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

CreateAccount

func (*AccountService) DeleteAccount

func (s *AccountService) DeleteAccount(accountPublicId string) error

DeleteAccount

func (*AccountService) GenerateTokenByCreds

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

GenerateTokenByCreds

func (*AccountService) GetAccount

func (s *AccountService) GetAccount(publicId string) (domain.Account, error)

GetAccount

func (*AccountService) ParseToken

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

ParseToken

func (*AccountService) UpdateAccountInfo

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

UpdateAccountInfo

func (*AccountService) UpdateAccountRole

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

UpdateAccountRole

type Accounter

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

Accounter - service interface

type Service

type Service struct {
	Accounter
}

Service - just service

func NewService

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

NewService - constructor

Directories

Path Synopsis
Package service is a generated GoMock package.
Package service is a generated GoMock package.

Jump to

Keyboard shortcuts

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