middleware

package
v0.0.0-...-ee5fcd5 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthMiddleware

type AuthMiddleware interface {
	AuthenticateWithJWT(conf *config.Config, tokenType TokenType) fiber.Handler
}

func NewAuthMiddleware

func NewAuthMiddleware(usecase usecase.AuthUseCase) AuthMiddleware

type MockAuthMiddleware

type MockAuthMiddleware struct {
	mock.Mock
}

MockAuthMiddleware is an autogenerated mock type for the AuthMiddleware type

func NewMockAuthMiddleware

func NewMockAuthMiddleware(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockAuthMiddleware

NewMockAuthMiddleware creates a new instance of MockAuthMiddleware. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockAuthMiddleware) AuthenticateWithJWT

func (_m *MockAuthMiddleware) AuthenticateWithJWT(conf *config.Config, tokenType TokenType) func(*fiber.Ctx) error

AuthenticateWithJWT provides a mock function with given fields: conf, tokenType

func (*MockAuthMiddleware) EXPECT

type MockAuthMiddleware_AuthenticateWithJWT_Call

type MockAuthMiddleware_AuthenticateWithJWT_Call struct {
	*mock.Call
}

MockAuthMiddleware_AuthenticateWithJWT_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AuthenticateWithJWT'

func (*MockAuthMiddleware_AuthenticateWithJWT_Call) Return

func (*MockAuthMiddleware_AuthenticateWithJWT_Call) Run

func (*MockAuthMiddleware_AuthenticateWithJWT_Call) RunAndReturn

type MockAuthMiddleware_Expecter

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

func (*MockAuthMiddleware_Expecter) AuthenticateWithJWT

func (_e *MockAuthMiddleware_Expecter) AuthenticateWithJWT(conf interface{}, tokenType interface{}) *MockAuthMiddleware_AuthenticateWithJWT_Call

AuthenticateWithJWT is a helper method to define mock.On call

  • conf *config.Config
  • tokenType TokenType

type TokenType

type TokenType int
const (
	Access TokenType = iota
	Refresh
)

Jump to

Keyboard shortcuts

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