smallstep-certificates/cas/cloudcas/mock_client_test.go

219 lines
10 KiB
Go
Raw Normal View History

// Code generated by MockGen. DO NOT EDIT.
2021-06-07 22:53:29 +00:00
// Source: github.com/smallstep/certificates/cas/cloudcas (interfaces: CertificateAuthorityClient)
// Package cloudcas is a generated GoMock package.
package cloudcas
import (
2022-11-07 21:14:23 +00:00
context "context"
reflect "reflect"
privateca "cloud.google.com/go/security/privateca/apiv1"
2022-11-07 21:09:07 +00:00
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
gomock "github.com/golang/mock/gomock"
gax "github.com/googleapis/gax-go/v2"
)
2022-11-07 21:14:23 +00:00
// MockCertificateAuthorityClient is a mock of CertificateAuthorityClient interface.
type MockCertificateAuthorityClient struct {
ctrl *gomock.Controller
recorder *MockCertificateAuthorityClientMockRecorder
}
2022-11-07 21:14:23 +00:00
// MockCertificateAuthorityClientMockRecorder is the mock recorder for MockCertificateAuthorityClient.
type MockCertificateAuthorityClientMockRecorder struct {
mock *MockCertificateAuthorityClient
}
2022-11-07 21:14:23 +00:00
// NewMockCertificateAuthorityClient creates a new mock instance.
func NewMockCertificateAuthorityClient(ctrl *gomock.Controller) *MockCertificateAuthorityClient {
mock := &MockCertificateAuthorityClient{ctrl: ctrl}
mock.recorder = &MockCertificateAuthorityClientMockRecorder{mock}
return mock
}
2022-11-07 21:14:23 +00:00
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockCertificateAuthorityClient) EXPECT() *MockCertificateAuthorityClientMockRecorder {
return m.recorder
}
2022-11-07 21:14:23 +00:00
// ActivateCertificateAuthority mocks base method.
2022-11-07 21:09:07 +00:00
func (m *MockCertificateAuthorityClient) ActivateCertificateAuthority(arg0 context.Context, arg1 *privatecapb.ActivateCertificateAuthorityRequest, arg2 ...gax.CallOption) (*privateca.ActivateCertificateAuthorityOperation, error) {
m.ctrl.T.Helper()
2021-06-07 22:53:29 +00:00
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
2021-06-07 22:53:29 +00:00
ret := m.ctrl.Call(m, "ActivateCertificateAuthority", varargs...)
ret0, _ := ret[0].(*privateca.ActivateCertificateAuthorityOperation)
ret1, _ := ret[1].(error)
return ret0, ret1
}
2022-11-07 21:14:23 +00:00
// ActivateCertificateAuthority indicates an expected call of ActivateCertificateAuthority.
2021-06-07 22:53:29 +00:00
func (mr *MockCertificateAuthorityClientMockRecorder) ActivateCertificateAuthority(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
2021-06-07 22:53:29 +00:00
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActivateCertificateAuthority", reflect.TypeOf((*MockCertificateAuthorityClient)(nil).ActivateCertificateAuthority), varargs...)
}
2022-11-07 21:14:23 +00:00
// CreateCaPool mocks base method.
2022-11-07 21:09:07 +00:00
func (m *MockCertificateAuthorityClient) CreateCaPool(arg0 context.Context, arg1 *privatecapb.CreateCaPoolRequest, arg2 ...gax.CallOption) (*privateca.CreateCaPoolOperation, error) {
m.ctrl.T.Helper()
2021-06-07 22:53:29 +00:00
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
2021-06-07 22:53:29 +00:00
ret := m.ctrl.Call(m, "CreateCaPool", varargs...)
ret0, _ := ret[0].(*privateca.CreateCaPoolOperation)
ret1, _ := ret[1].(error)
return ret0, ret1
}
2022-11-07 21:14:23 +00:00
// CreateCaPool indicates an expected call of CreateCaPool.
2021-06-07 22:53:29 +00:00
func (mr *MockCertificateAuthorityClientMockRecorder) CreateCaPool(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
2021-06-07 22:53:29 +00:00
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCaPool", reflect.TypeOf((*MockCertificateAuthorityClient)(nil).CreateCaPool), varargs...)
}
2022-11-07 21:14:23 +00:00
// CreateCertificate mocks base method.
2022-11-07 21:09:07 +00:00
func (m *MockCertificateAuthorityClient) CreateCertificate(arg0 context.Context, arg1 *privatecapb.CreateCertificateRequest, arg2 ...gax.CallOption) (*privatecapb.Certificate, error) {
m.ctrl.T.Helper()
2021-06-07 22:53:29 +00:00
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
2021-06-07 22:53:29 +00:00
ret := m.ctrl.Call(m, "CreateCertificate", varargs...)
2022-11-07 21:09:07 +00:00
ret0, _ := ret[0].(*privatecapb.Certificate)
ret1, _ := ret[1].(error)
return ret0, ret1
}
2022-11-07 21:14:23 +00:00
// CreateCertificate indicates an expected call of CreateCertificate.
2021-06-07 22:53:29 +00:00
func (mr *MockCertificateAuthorityClientMockRecorder) CreateCertificate(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
2021-06-07 22:53:29 +00:00
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCertificate", reflect.TypeOf((*MockCertificateAuthorityClient)(nil).CreateCertificate), varargs...)
}
2022-11-07 21:14:23 +00:00
// CreateCertificateAuthority mocks base method.
2022-11-07 21:09:07 +00:00
func (m *MockCertificateAuthorityClient) CreateCertificateAuthority(arg0 context.Context, arg1 *privatecapb.CreateCertificateAuthorityRequest, arg2 ...gax.CallOption) (*privateca.CreateCertificateAuthorityOperation, error) {
m.ctrl.T.Helper()
2021-06-07 22:53:29 +00:00
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "CreateCertificateAuthority", varargs...)
ret0, _ := ret[0].(*privateca.CreateCertificateAuthorityOperation)
ret1, _ := ret[1].(error)
return ret0, ret1
}
2022-11-07 21:14:23 +00:00
// CreateCertificateAuthority indicates an expected call of CreateCertificateAuthority.
2021-06-07 22:53:29 +00:00
func (mr *MockCertificateAuthorityClientMockRecorder) CreateCertificateAuthority(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
2021-06-07 22:53:29 +00:00
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCertificateAuthority", reflect.TypeOf((*MockCertificateAuthorityClient)(nil).CreateCertificateAuthority), varargs...)
}
2022-11-07 21:14:23 +00:00
// EnableCertificateAuthority mocks base method.
2022-11-07 21:09:07 +00:00
func (m *MockCertificateAuthorityClient) EnableCertificateAuthority(arg0 context.Context, arg1 *privatecapb.EnableCertificateAuthorityRequest, arg2 ...gax.CallOption) (*privateca.EnableCertificateAuthorityOperation, error) {
2021-06-07 22:53:29 +00:00
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "EnableCertificateAuthority", varargs...)
ret0, _ := ret[0].(*privateca.EnableCertificateAuthorityOperation)
ret1, _ := ret[1].(error)
return ret0, ret1
}
2022-11-07 21:14:23 +00:00
// EnableCertificateAuthority indicates an expected call of EnableCertificateAuthority.
2021-06-07 22:53:29 +00:00
func (mr *MockCertificateAuthorityClientMockRecorder) EnableCertificateAuthority(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnableCertificateAuthority", reflect.TypeOf((*MockCertificateAuthorityClient)(nil).EnableCertificateAuthority), varargs...)
}
2022-11-07 21:14:23 +00:00
// FetchCertificateAuthorityCsr mocks base method.
2022-11-07 21:09:07 +00:00
func (m *MockCertificateAuthorityClient) FetchCertificateAuthorityCsr(arg0 context.Context, arg1 *privatecapb.FetchCertificateAuthorityCsrRequest, arg2 ...gax.CallOption) (*privatecapb.FetchCertificateAuthorityCsrResponse, error) {
m.ctrl.T.Helper()
2021-06-07 22:53:29 +00:00
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "FetchCertificateAuthorityCsr", varargs...)
2022-11-07 21:09:07 +00:00
ret0, _ := ret[0].(*privatecapb.FetchCertificateAuthorityCsrResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
2022-11-07 21:14:23 +00:00
// FetchCertificateAuthorityCsr indicates an expected call of FetchCertificateAuthorityCsr.
2021-06-07 22:53:29 +00:00
func (mr *MockCertificateAuthorityClientMockRecorder) FetchCertificateAuthorityCsr(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
2021-06-07 22:53:29 +00:00
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FetchCertificateAuthorityCsr", reflect.TypeOf((*MockCertificateAuthorityClient)(nil).FetchCertificateAuthorityCsr), varargs...)
}
2022-11-07 21:14:23 +00:00
// GetCaPool mocks base method.
2022-11-07 21:09:07 +00:00
func (m *MockCertificateAuthorityClient) GetCaPool(arg0 context.Context, arg1 *privatecapb.GetCaPoolRequest, arg2 ...gax.CallOption) (*privatecapb.CaPool, error) {
m.ctrl.T.Helper()
2021-06-07 22:53:29 +00:00
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
2021-06-07 22:53:29 +00:00
ret := m.ctrl.Call(m, "GetCaPool", varargs...)
2022-11-07 21:09:07 +00:00
ret0, _ := ret[0].(*privatecapb.CaPool)
ret1, _ := ret[1].(error)
return ret0, ret1
}
2022-11-07 21:14:23 +00:00
// GetCaPool indicates an expected call of GetCaPool.
2021-06-07 22:53:29 +00:00
func (mr *MockCertificateAuthorityClientMockRecorder) GetCaPool(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
2021-06-07 22:53:29 +00:00
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCaPool", reflect.TypeOf((*MockCertificateAuthorityClient)(nil).GetCaPool), varargs...)
}
2022-11-07 21:14:23 +00:00
// GetCertificateAuthority mocks base method.
2022-11-07 21:09:07 +00:00
func (m *MockCertificateAuthorityClient) GetCertificateAuthority(arg0 context.Context, arg1 *privatecapb.GetCertificateAuthorityRequest, arg2 ...gax.CallOption) (*privatecapb.CertificateAuthority, error) {
2021-06-07 22:53:29 +00:00
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetCertificateAuthority", varargs...)
2022-11-07 21:09:07 +00:00
ret0, _ := ret[0].(*privatecapb.CertificateAuthority)
2021-06-07 22:53:29 +00:00
ret1, _ := ret[1].(error)
return ret0, ret1
}
2022-11-07 21:14:23 +00:00
// GetCertificateAuthority indicates an expected call of GetCertificateAuthority.
2021-06-07 22:53:29 +00:00
func (mr *MockCertificateAuthorityClientMockRecorder) GetCertificateAuthority(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCertificateAuthority", reflect.TypeOf((*MockCertificateAuthorityClient)(nil).GetCertificateAuthority), varargs...)
}
2022-11-07 21:14:23 +00:00
// RevokeCertificate mocks base method.
2022-11-07 21:09:07 +00:00
func (m *MockCertificateAuthorityClient) RevokeCertificate(arg0 context.Context, arg1 *privatecapb.RevokeCertificateRequest, arg2 ...gax.CallOption) (*privatecapb.Certificate, error) {
2021-06-07 22:53:29 +00:00
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "RevokeCertificate", varargs...)
2022-11-07 21:09:07 +00:00
ret0, _ := ret[0].(*privatecapb.Certificate)
2021-06-07 22:53:29 +00:00
ret1, _ := ret[1].(error)
return ret0, ret1
}
2022-11-07 21:14:23 +00:00
// RevokeCertificate indicates an expected call of RevokeCertificate.
2021-06-07 22:53:29 +00:00
func (mr *MockCertificateAuthorityClientMockRecorder) RevokeCertificate(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevokeCertificate", reflect.TypeOf((*MockCertificateAuthorityClient)(nil).RevokeCertificate), varargs...)
}