2023-02-13 23:13:30 +00:00
// Code generated by mockery v2.20.0. DO NOT EDIT.
2022-06-11 21:02:06 +00:00
package database
import (
2023-02-13 23:13:30 +00:00
certificate "github.com/go-acme/lego/v4/certificate"
mock "github.com/stretchr/testify/mock"
2022-06-11 21:02:06 +00:00
)
2023-02-13 23:13:30 +00:00
// MockCertDB is an autogenerated mock type for the CertDB type
type MockCertDB struct {
mock . Mock
}
// Close provides a mock function with given fields:
func ( _m * MockCertDB ) Close ( ) error {
ret := _m . Called ( )
2022-06-11 21:02:06 +00:00
2023-02-13 23:13:30 +00:00
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( ) error ) ; ok {
r0 = rf ( )
} else {
r0 = ret . Error ( 0 )
}
return r0
2022-06-11 21:02:06 +00:00
}
2023-02-13 23:13:30 +00:00
// Delete provides a mock function with given fields: key
func ( _m * MockCertDB ) Delete ( key string ) error {
ret := _m . Called ( key )
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( string ) error ) ; ok {
r0 = rf ( key )
} else {
r0 = ret . Error ( 0 )
}
return r0
2022-06-11 21:02:06 +00:00
}
2023-02-13 23:13:30 +00:00
// Get provides a mock function with given fields: name
func ( _m * MockCertDB ) Get ( name string ) ( * certificate . Resource , error ) {
ret := _m . Called ( name )
var r0 * certificate . Resource
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( string ) ( * certificate . Resource , error ) ) ; ok {
return rf ( name )
}
if rf , ok := ret . Get ( 0 ) . ( func ( string ) * certificate . Resource ) ; ok {
r0 = rf ( name )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( * certificate . Resource )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( string ) error ) ; ok {
r1 = rf ( name )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
2022-06-11 21:02:06 +00:00
}
2023-02-13 23:13:30 +00:00
// Items provides a mock function with given fields: page, pageSize
func ( _m * MockCertDB ) Items ( page int , pageSize int ) ( [ ] * Cert , error ) {
ret := _m . Called ( page , pageSize )
var r0 [ ] * Cert
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( int , int ) ( [ ] * Cert , error ) ) ; ok {
return rf ( page , pageSize )
}
if rf , ok := ret . Get ( 0 ) . ( func ( int , int ) [ ] * Cert ) ; ok {
r0 = rf ( page , pageSize )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( [ ] * Cert )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( int , int ) error ) ; ok {
r1 = rf ( page , pageSize )
} else {
r1 = ret . Error ( 1 )
2022-06-11 21:02:06 +00:00
}
2023-02-13 23:13:30 +00:00
return r0 , r1
2022-06-11 21:02:06 +00:00
}
2023-02-13 23:13:30 +00:00
// Put provides a mock function with given fields: name, cert
func ( _m * MockCertDB ) Put ( name string , cert * certificate . Resource ) error {
ret := _m . Called ( name , cert )
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( string , * certificate . Resource ) error ) ; ok {
r0 = rf ( name , cert )
} else {
r0 = ret . Error ( 0 )
}
return r0
2022-06-11 21:02:06 +00:00
}
2023-02-13 23:13:30 +00:00
type mockConstructorTestingTNewMockCertDB interface {
mock . TestingT
Cleanup ( func ( ) )
2022-06-11 21:02:06 +00:00
}
2023-02-13 23:13:30 +00:00
// NewMockCertDB creates a new instance of MockCertDB. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockCertDB ( t mockConstructorTestingTNewMockCertDB ) * MockCertDB {
mock := & MockCertDB { }
mock . Mock . Test ( t )
t . Cleanup ( func ( ) { mock . AssertExpectations ( t ) } )
return mock
2022-06-11 21:02:06 +00:00
}