services

package
v0.0.0-...-a3b2237 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package services is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsVaccinationAfterAllowedDate

func IsVaccinationAfterAllowedDate(vaccination *models.Vaccination) bool

func IsVaccinationDoseOk

func IsVaccinationDoseOk(vaccination *models.Vaccination) bool

Types

type AuthService

type AuthService interface {
	Signup(ctx context.Context, user *models.User) error
	Login(ctx context.Context, user *models.User) error
	Authorize(ctx context.Context, tokenString string) (*models.User, error)
}

type DefaultAuthService

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

func NewDefaultAuthService

func NewDefaultAuthService(transactionHandler datasource.TransactionHandler, tokenManager TokenManager, passwordManager feather_security.PasswordManager) *DefaultAuthService

func (*DefaultAuthService) Authorize

func (service *DefaultAuthService) Authorize(ctx context.Context, tokenString string) (*models.User, error)

func (*DefaultAuthService) Login

func (service *DefaultAuthService) Login(ctx context.Context, user *models.User) error

func (*DefaultAuthService) Signup

func (service *DefaultAuthService) Signup(ctx context.Context, user *models.User) error

type DefaultClaims

type DefaultClaims struct {
	jwt.RegisteredClaims
	models.User
}

type DefaultDrugsService

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

func NewDefaultDrugsService

func NewDefaultDrugsService(transactionHandler datasource.TransactionHandler) *DefaultDrugsService

func (*DefaultDrugsService) Create

func (service *DefaultDrugsService) Create(ctx context.Context, drug *models.Drug) error

func (*DefaultDrugsService) Delete

func (service *DefaultDrugsService) Delete(ctx context.Context, drug *models.Drug) error

func (*DefaultDrugsService) Find

func (service *DefaultDrugsService) Find(ctx context.Context) ([]models.Drug, error)

func (*DefaultDrugsService) Update

func (service *DefaultDrugsService) Update(ctx context.Context, drug *models.Drug) error

type DefaultVaccinationsService

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

func NewDefaultVaccinationsService

func NewDefaultVaccinationsService(transactionHandler datasource.TransactionHandler) *DefaultVaccinationsService

func (*DefaultVaccinationsService) Create

func (service *DefaultVaccinationsService) Create(ctx context.Context, vaccination *models.Vaccination) error

func (*DefaultVaccinationsService) Delete

func (service *DefaultVaccinationsService) Delete(ctx context.Context, vaccination *models.Vaccination) error

func (*DefaultVaccinationsService) Find

func (*DefaultVaccinationsService) Update

func (service *DefaultVaccinationsService) Update(ctx context.Context, vaccination *models.Vaccination) error

type DrugsService

type DrugsService interface {
	Create(ctx context.Context, drug *models.Drug) error
	Update(ctx context.Context, drug *models.Drug) error
	Delete(ctx context.Context, drug *models.Drug) error
	Find(ctx context.Context) ([]models.Drug, error)
}

type JwtTokenManager

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

func NewJwtTokenManager

func NewJwtTokenManager(options ...JwtTokenManagerOption) *JwtTokenManager

func (*JwtTokenManager) Generate

func (manager *JwtTokenManager) Generate(user *models.User) (*string, error)

func (*JwtTokenManager) Validate

func (manager *JwtTokenManager) Validate(tokenString string) (*models.User, error)

type JwtTokenManagerOption

type JwtTokenManagerOption func(tokenManager *JwtTokenManager)

func WithIssuer

func WithIssuer(issuer string) JwtTokenManagerOption

func WithSigningKey

func WithSigningKey(signingKey any) JwtTokenManagerOption

func WithSigningMethod

func WithSigningMethod(signingMethod jwt.SigningMethod) JwtTokenManagerOption

func WithTimeout

func WithTimeout(timeout time.Duration) JwtTokenManagerOption

func WithVerifyingKey

func WithVerifyingKey(verifyingKey any) JwtTokenManagerOption

type MockAuthService

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

MockAuthService is a mock of AuthService interface.

func NewMockAuthService

func NewMockAuthService(ctrl *gomock.Controller) *MockAuthService

NewMockAuthService creates a new mock instance.

func (*MockAuthService) Authorize

func (m *MockAuthService) Authorize(ctx context.Context, tokenString string) (*models.User, error)

Authorize mocks base method.

func (*MockAuthService) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAuthService) Login

func (m *MockAuthService) Login(ctx context.Context, user *models.User) error

Login mocks base method.

func (*MockAuthService) Signup

func (m *MockAuthService) Signup(ctx context.Context, user *models.User) error

Signup mocks base method.

type MockAuthServiceMockRecorder

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

MockAuthServiceMockRecorder is the mock recorder for MockAuthService.

func (*MockAuthServiceMockRecorder) Authorize

func (mr *MockAuthServiceMockRecorder) Authorize(ctx, tokenString any) *gomock.Call

Authorize indicates an expected call of Authorize.

func (*MockAuthServiceMockRecorder) Login

func (mr *MockAuthServiceMockRecorder) Login(ctx, user any) *gomock.Call

Login indicates an expected call of Login.

func (*MockAuthServiceMockRecorder) Signup

func (mr *MockAuthServiceMockRecorder) Signup(ctx, user any) *gomock.Call

Signup indicates an expected call of Signup.

type MockDrugsService

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

MockDrugsService is a mock of DrugsService interface.

func NewMockDrugsService

func NewMockDrugsService(ctrl *gomock.Controller) *MockDrugsService

NewMockDrugsService creates a new mock instance.

func (*MockDrugsService) Create

func (m *MockDrugsService) Create(ctx context.Context, drug *models.Drug) error

Create mocks base method.

func (*MockDrugsService) Delete

func (m *MockDrugsService) Delete(ctx context.Context, drug *models.Drug) error

Delete mocks base method.

func (*MockDrugsService) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockDrugsService) Find

func (m *MockDrugsService) Find(ctx context.Context) ([]models.Drug, error)

Find mocks base method.

func (*MockDrugsService) Update

func (m *MockDrugsService) Update(ctx context.Context, drug *models.Drug) error

Update mocks base method.

type MockDrugsServiceMockRecorder

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

MockDrugsServiceMockRecorder is the mock recorder for MockDrugsService.

func (*MockDrugsServiceMockRecorder) Create

func (mr *MockDrugsServiceMockRecorder) Create(ctx, drug any) *gomock.Call

Create indicates an expected call of Create.

func (*MockDrugsServiceMockRecorder) Delete

func (mr *MockDrugsServiceMockRecorder) Delete(ctx, drug any) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockDrugsServiceMockRecorder) Find

Find indicates an expected call of Find.

func (*MockDrugsServiceMockRecorder) Update

func (mr *MockDrugsServiceMockRecorder) Update(ctx, drug any) *gomock.Call

Update indicates an expected call of Update.

type MockTokenManager

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

MockTokenManager is a mock of TokenManager interface.

func NewMockTokenManager

func NewMockTokenManager(ctrl *gomock.Controller) *MockTokenManager

NewMockTokenManager creates a new mock instance.

func (*MockTokenManager) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTokenManager) Generate

func (m *MockTokenManager) Generate(user *models.User) (*string, error)

Generate mocks base method.

func (*MockTokenManager) Validate

func (m *MockTokenManager) Validate(tokenString string) (*models.User, error)

Validate mocks base method.

type MockTokenManagerMockRecorder

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

MockTokenManagerMockRecorder is the mock recorder for MockTokenManager.

func (*MockTokenManagerMockRecorder) Generate

func (mr *MockTokenManagerMockRecorder) Generate(user any) *gomock.Call

Generate indicates an expected call of Generate.

func (*MockTokenManagerMockRecorder) Validate

func (mr *MockTokenManagerMockRecorder) Validate(tokenString any) *gomock.Call

Validate indicates an expected call of Validate.

type MockVaccinationsService

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

MockVaccinationsService is a mock of VaccinationsService interface.

func NewMockVaccinationsService

func NewMockVaccinationsService(ctrl *gomock.Controller) *MockVaccinationsService

NewMockVaccinationsService creates a new mock instance.

func (*MockVaccinationsService) Create

func (m *MockVaccinationsService) Create(ctx context.Context, vaccination *models.Vaccination) error

Create mocks base method.

func (*MockVaccinationsService) Delete

func (m *MockVaccinationsService) Delete(ctx context.Context, vaccination *models.Vaccination) error

Delete mocks base method.

func (*MockVaccinationsService) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockVaccinationsService) Find

Find mocks base method.

func (*MockVaccinationsService) Update

func (m *MockVaccinationsService) Update(ctx context.Context, vaccination *models.Vaccination) error

Update mocks base method.

type MockVaccinationsServiceMockRecorder

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

MockVaccinationsServiceMockRecorder is the mock recorder for MockVaccinationsService.

func (*MockVaccinationsServiceMockRecorder) Create

func (mr *MockVaccinationsServiceMockRecorder) Create(ctx, vaccination any) *gomock.Call

Create indicates an expected call of Create.

func (*MockVaccinationsServiceMockRecorder) Delete

func (mr *MockVaccinationsServiceMockRecorder) Delete(ctx, vaccination any) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockVaccinationsServiceMockRecorder) Find

Find indicates an expected call of Find.

func (*MockVaccinationsServiceMockRecorder) Update

func (mr *MockVaccinationsServiceMockRecorder) Update(ctx, vaccination any) *gomock.Call

Update indicates an expected call of Update.

type TokenManager

type TokenManager interface {
	Generate(user *models.User) (*string, error)
	Validate(tokenString string) (*models.User, error)
}

type VaccinationsService

type VaccinationsService interface {
	Create(ctx context.Context, vaccination *models.Vaccination) error
	Update(ctx context.Context, vaccination *models.Vaccination) error
	Delete(ctx context.Context, vaccination *models.Vaccination) error
	Find(ctx context.Context) ([]models.Vaccination, error)
}

Jump to

Keyboard shortcuts

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