//go:build !ignore_autogenerated
// +build !ignore_autogenerated

// Code generated by mga tool. DO NOT EDIT.

package token

import (
	"context"
	"github.com/stretchr/testify/mock"
	"time"
)

// MockUserExtractor is an autogenerated mock for the UserExtractor type.
type MockUserExtractor struct {
	mock.Mock
}

// GetUserID provides a mock function.
func (_m *MockUserExtractor) GetUserID(ctx context.Context) (_result_0 uint, _result_1 bool) {
	ret := _m.Called(ctx)

	var r0 uint
	if rf, ok := ret.Get(0).(func(context.Context) uint); ok {
		r0 = rf(ctx)
	} else {
		r0 = ret.Get(0).(uint)
	}

	var r1 bool
	if rf, ok := ret.Get(1).(func(context.Context) bool); ok {
		r1 = rf(ctx)
	} else {
		r1 = ret.Get(1).(bool)
	}

	return r0, r1
}

// GetUserLogin provides a mock function.
func (_m *MockUserExtractor) GetUserLogin(ctx context.Context) (_result_0 string, _result_1 bool) {
	ret := _m.Called(ctx)

	var r0 string
	if rf, ok := ret.Get(0).(func(context.Context) string); ok {
		r0 = rf(ctx)
	} else {
		r0 = ret.Get(0).(string)
	}

	var r1 bool
	if rf, ok := ret.Get(1).(func(context.Context) bool); ok {
		r1 = rf(ctx)
	} else {
		r1 = ret.Get(1).(bool)
	}

	return r0, r1
}

// MockStore is an autogenerated mock for the Store type.
type MockStore struct {
	mock.Mock
}

// List provides a mock function.
func (_m *MockStore) List(ctx context.Context, userID string) (_result_0 []Token, _result_1 error) {
	ret := _m.Called(ctx, userID)

	var r0 []Token
	if rf, ok := ret.Get(0).(func(context.Context, string) []Token); ok {
		r0 = rf(ctx, userID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]Token)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
		r1 = rf(ctx, userID)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// Lookup provides a mock function.
func (_m *MockStore) Lookup(ctx context.Context, userID string, tokenID string) (_result_0 Token, _result_1 error) {
	ret := _m.Called(ctx, userID, tokenID)

	var r0 Token
	if rf, ok := ret.Get(0).(func(context.Context, string, string) Token); ok {
		r0 = rf(ctx, userID, tokenID)
	} else {
		r0 = ret.Get(0).(Token)
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
		r1 = rf(ctx, userID, tokenID)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// Revoke provides a mock function.
func (_m *MockStore) Revoke(ctx context.Context, userID string, tokenID string) (_result_0 error) {
	ret := _m.Called(ctx, userID, tokenID)

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
		r0 = rf(ctx, userID, tokenID)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// Store provides a mock function.
func (_m *MockStore) Store(ctx context.Context, userID string, tokenID string, name string, expiresAt *time.Time) (_result_0 error) {
	ret := _m.Called(ctx, userID, tokenID, name, expiresAt)

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, string, *time.Time) error); ok {
		r0 = rf(ctx, userID, tokenID, name, expiresAt)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// MockGenerator is an autogenerated mock for the Generator type.
type MockGenerator struct {
	mock.Mock
}

// GenerateToken provides a mock function.
func (_m *MockGenerator) GenerateToken(sub string, expiresAt time.Time, tokenType string, value string) (_result_0 string, _result_1 string, _result_2 error) {
	ret := _m.Called(sub, expiresAt, tokenType, value)

	var r0 string
	if rf, ok := ret.Get(0).(func(string, time.Time, string, string) string); ok {
		r0 = rf(sub, expiresAt, tokenType, value)
	} else {
		r0 = ret.Get(0).(string)
	}

	var r1 string
	if rf, ok := ret.Get(1).(func(string, time.Time, string, string) string); ok {
		r1 = rf(sub, expiresAt, tokenType, value)
	} else {
		r1 = ret.Get(1).(string)
	}

	var r2 error
	if rf, ok := ret.Get(2).(func(string, time.Time, string, string) error); ok {
		r2 = rf(sub, expiresAt, tokenType, value)
	} else {
		r2 = ret.Error(2)
	}

	return r0, r1, r2
}
