mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-02-14 10:00:05 +00:00
and also audit logs both the NotBefore and NotAfter of the issued cert. Implemented by changing the return type of the cert issuer helpers to make them also return the NotBefore and NotAfter values of the new cert, along with the key PEM and cert PEM.
76 lines
2.5 KiB
Go
76 lines
2.5 KiB
Go
// Copyright 2020-2024 the Pinniped contributors. All Rights Reserved.
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
|
|
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: go.pinniped.dev/internal/clientcertissuer (interfaces: ClientCertIssuer)
|
|
//
|
|
// Generated by this command:
|
|
//
|
|
// mockgen -destination=mockissuer.go -package=mockissuer -copyright_file=../../../hack/header.txt go.pinniped.dev/internal/clientcertissuer ClientCertIssuer
|
|
//
|
|
|
|
// Package mockissuer is a generated GoMock package.
|
|
package mockissuer
|
|
|
|
import (
|
|
reflect "reflect"
|
|
time "time"
|
|
|
|
cert "go.pinniped.dev/internal/cert"
|
|
gomock "go.uber.org/mock/gomock"
|
|
)
|
|
|
|
// MockClientCertIssuer is a mock of ClientCertIssuer interface.
|
|
type MockClientCertIssuer struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockClientCertIssuerMockRecorder
|
|
isgomock struct{}
|
|
}
|
|
|
|
// MockClientCertIssuerMockRecorder is the mock recorder for MockClientCertIssuer.
|
|
type MockClientCertIssuerMockRecorder struct {
|
|
mock *MockClientCertIssuer
|
|
}
|
|
|
|
// NewMockClientCertIssuer creates a new mock instance.
|
|
func NewMockClientCertIssuer(ctrl *gomock.Controller) *MockClientCertIssuer {
|
|
mock := &MockClientCertIssuer{ctrl: ctrl}
|
|
mock.recorder = &MockClientCertIssuerMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockClientCertIssuer) EXPECT() *MockClientCertIssuerMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// IssueClientCertPEM mocks base method.
|
|
func (m *MockClientCertIssuer) IssueClientCertPEM(username string, groups []string, ttl time.Duration) (*cert.PEM, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "IssueClientCertPEM", username, groups, ttl)
|
|
ret0, _ := ret[0].(*cert.PEM)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// IssueClientCertPEM indicates an expected call of IssueClientCertPEM.
|
|
func (mr *MockClientCertIssuerMockRecorder) IssueClientCertPEM(username, groups, ttl any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IssueClientCertPEM", reflect.TypeOf((*MockClientCertIssuer)(nil).IssueClientCertPEM), username, groups, ttl)
|
|
}
|
|
|
|
// Name mocks base method.
|
|
func (m *MockClientCertIssuer) Name() string {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Name")
|
|
ret0, _ := ret[0].(string)
|
|
return ret0
|
|
}
|
|
|
|
// Name indicates an expected call of Name.
|
|
func (mr *MockClientCertIssuerMockRecorder) Name() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockClientCertIssuer)(nil).Name))
|
|
}
|