middleware

package
v0.0.0-...-bef02c6 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package middleware is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IJwtService

type IJwtService interface {
	GenerateToken(userID string) (string, error)
	Auth(r *http.Request) (*User, error)
}

type JwtService

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

func InitAuthService

func InitAuthService(privateKeyPath string, publicKeyPath string) *JwtService

func (*JwtService) Auth

func (svc *JwtService) Auth(r *http.Request) (*User, error)

func (*JwtService) GenerateToken

func (svc *JwtService) GenerateToken(userID string) (string, error)

type MockIJwtService

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

MockIJwtService is a mock of IJwtService interface.

func NewMockIJwtService

func NewMockIJwtService(ctrl *gomock.Controller) *MockIJwtService

NewMockIJwtService creates a new mock instance.

func (*MockIJwtService) Auth

func (m *MockIJwtService) Auth(r *http.Request) (*User, error)

Auth mocks base method.

func (*MockIJwtService) EXPECT

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

func (*MockIJwtService) GenerateToken

func (m *MockIJwtService) GenerateToken(userID string) (string, error)

GenerateToken mocks base method.

type MockIJwtServiceMockRecorder

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

MockIJwtServiceMockRecorder is the mock recorder for MockIJwtService.

func (*MockIJwtServiceMockRecorder) Auth

func (mr *MockIJwtServiceMockRecorder) Auth(r interface{}) *gomock.Call

Auth indicates an expected call of Auth.

func (*MockIJwtServiceMockRecorder) GenerateToken

func (mr *MockIJwtServiceMockRecorder) GenerateToken(userID interface{}) *gomock.Call

GenerateToken indicates an expected call of GenerateToken.

type User

type User struct {
	ID string
}

Jump to

Keyboard shortcuts

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