mirror of
https://github.com/fleetdm/fleet
synced 2026-05-22 16:39:01 +00:00
Co-authored-by: Jordan Montgomery <elijah.jordan.montgomery@gmail.com> Co-authored-by: Magnus Jensen <magnus@fleetdm.com>
76 lines
2.4 KiB
Go
76 lines
2.4 KiB
Go
// Automatically generated by mockimpl. DO NOT EDIT!
|
|
|
|
package mock
|
|
|
|
import (
|
|
"context"
|
|
"sync"
|
|
|
|
"github.com/fleetdm/fleet/v4/server/fleet"
|
|
)
|
|
|
|
var _ fleet.SCEPConfigService = (*SCEPConfigService)(nil)
|
|
|
|
type ValidateNDESSCEPAdminURLFunc func(ctx context.Context, proxy fleet.NDESSCEPProxyCA) error
|
|
|
|
type GetNDESSCEPChallengeFunc func(ctx context.Context, proxy fleet.NDESSCEPProxyCA) (string, error)
|
|
|
|
type ValidateSCEPURLFunc func(ctx context.Context, url string) error
|
|
|
|
type ValidateSmallstepChallengeURLFunc func(ctx context.Context, ca fleet.SmallstepSCEPProxyCA) error
|
|
|
|
type GetSmallstepSCEPChallengeFunc func(ctx context.Context, ca fleet.SmallstepSCEPProxyCA) (string, error)
|
|
|
|
type SCEPConfigService struct {
|
|
ValidateNDESSCEPAdminURLFunc ValidateNDESSCEPAdminURLFunc
|
|
ValidateNDESSCEPAdminURLFuncInvoked bool
|
|
|
|
GetNDESSCEPChallengeFunc GetNDESSCEPChallengeFunc
|
|
GetNDESSCEPChallengeFuncInvoked bool
|
|
|
|
ValidateSCEPURLFunc ValidateSCEPURLFunc
|
|
ValidateSCEPURLFuncInvoked bool
|
|
|
|
ValidateSmallstepChallengeURLFunc ValidateSmallstepChallengeURLFunc
|
|
ValidateSmallstepChallengeURLFuncInvoked bool
|
|
|
|
GetSmallstepSCEPChallengeFunc GetSmallstepSCEPChallengeFunc
|
|
GetSmallstepSCEPChallengeFuncInvoked bool
|
|
|
|
mu sync.Mutex
|
|
}
|
|
|
|
func (s *SCEPConfigService) ValidateNDESSCEPAdminURL(ctx context.Context, proxy fleet.NDESSCEPProxyCA) error {
|
|
s.mu.Lock()
|
|
s.ValidateNDESSCEPAdminURLFuncInvoked = true
|
|
s.mu.Unlock()
|
|
return s.ValidateNDESSCEPAdminURLFunc(ctx, proxy)
|
|
}
|
|
|
|
func (s *SCEPConfigService) GetNDESSCEPChallenge(ctx context.Context, proxy fleet.NDESSCEPProxyCA) (string, error) {
|
|
s.mu.Lock()
|
|
s.GetNDESSCEPChallengeFuncInvoked = true
|
|
s.mu.Unlock()
|
|
return s.GetNDESSCEPChallengeFunc(ctx, proxy)
|
|
}
|
|
|
|
func (s *SCEPConfigService) ValidateSCEPURL(ctx context.Context, url string) error {
|
|
s.mu.Lock()
|
|
s.ValidateSCEPURLFuncInvoked = true
|
|
s.mu.Unlock()
|
|
return s.ValidateSCEPURLFunc(ctx, url)
|
|
}
|
|
|
|
func (s *SCEPConfigService) ValidateSmallstepChallengeURL(ctx context.Context, ca fleet.SmallstepSCEPProxyCA) error {
|
|
s.mu.Lock()
|
|
s.ValidateSmallstepChallengeURLFuncInvoked = true
|
|
s.mu.Unlock()
|
|
return s.ValidateSmallstepChallengeURLFunc(ctx, ca)
|
|
}
|
|
|
|
func (s *SCEPConfigService) GetSmallstepSCEPChallenge(ctx context.Context, ca fleet.SmallstepSCEPProxyCA) (string, error) {
|
|
s.mu.Lock()
|
|
s.GetSmallstepSCEPChallengeFuncInvoked = true
|
|
s.mu.Unlock()
|
|
return s.GetSmallstepSCEPChallengeFunc(ctx, ca)
|
|
}
|