forked from TrueCloudLab/certificates
Merge pull request #1163 from smallstep/max/longrunning
Updates for deprecated google cloud security APIs
This commit is contained in:
commit
7354e6e905
8 changed files with 78 additions and 75 deletions
|
@ -10,9 +10,9 @@ import (
|
|||
"encoding/pem"
|
||||
"fmt"
|
||||
|
||||
pb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
|
||||
"github.com/pkg/errors"
|
||||
kmsapi "go.step.sm/crypto/kms/apiv1"
|
||||
pb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -14,8 +14,8 @@ import (
|
|||
"reflect"
|
||||
"testing"
|
||||
|
||||
pb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
|
||||
kmsapi "go.step.sm/crypto/kms/apiv1"
|
||||
pb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -11,13 +11,13 @@ import (
|
|||
"time"
|
||||
|
||||
privateca "cloud.google.com/go/security/privateca/apiv1"
|
||||
pb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
|
||||
"github.com/google/uuid"
|
||||
gax "github.com/googleapis/gax-go/v2"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/smallstep/certificates/cas/apiv1"
|
||||
"go.step.sm/crypto/x509util"
|
||||
"google.golang.org/api/option"
|
||||
pb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
durationpb "google.golang.org/protobuf/types/known/durationpb"
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
//go:generate mockgen -package cloudcas -mock_names=CertificateAuthorityClient=MockCertificateAuthorityClient -destination mock_client_test.go github.com/smallstep/certificates/cas/cloudcas CertificateAuthorityClient
|
||||
//go:generate mockgen -package cloudcas -mock_names=OperationsServer=MockOperationsServer -destination mock_operation_server_test.go cloud.google.com/go/longrunning/autogen/longrunningpb OperationsServer
|
||||
|
||||
package cloudcas
|
||||
|
||||
import (
|
||||
|
@ -20,7 +23,9 @@ import (
|
|||
"time"
|
||||
|
||||
lroauto "cloud.google.com/go/longrunning/autogen"
|
||||
"cloud.google.com/go/longrunning/autogen/longrunningpb"
|
||||
privateca "cloud.google.com/go/security/privateca/apiv1"
|
||||
pb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
"github.com/google/uuid"
|
||||
gax "github.com/googleapis/gax-go/v2"
|
||||
|
@ -28,8 +33,6 @@ import (
|
|||
"github.com/smallstep/certificates/cas/apiv1"
|
||||
kmsapi "go.step.sm/crypto/kms/apiv1"
|
||||
"google.golang.org/api/option"
|
||||
pb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1"
|
||||
longrunningpb "google.golang.org/genproto/googleapis/longrunning"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
|
|
|
@ -9,36 +9,36 @@ import (
|
|||
reflect "reflect"
|
||||
|
||||
privateca "cloud.google.com/go/security/privateca/apiv1"
|
||||
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
gax "github.com/googleapis/gax-go/v2"
|
||||
privateca0 "google.golang.org/genproto/googleapis/cloud/security/privateca/v1"
|
||||
)
|
||||
|
||||
// MockCertificateAuthorityClient is a mock of CertificateAuthorityClient interface
|
||||
// MockCertificateAuthorityClient is a mock of CertificateAuthorityClient interface.
|
||||
type MockCertificateAuthorityClient struct {
|
||||
ctrl *gomock.Controller
|
||||
recorder *MockCertificateAuthorityClientMockRecorder
|
||||
}
|
||||
|
||||
// MockCertificateAuthorityClientMockRecorder is the mock recorder for MockCertificateAuthorityClient
|
||||
// MockCertificateAuthorityClientMockRecorder is the mock recorder for MockCertificateAuthorityClient.
|
||||
type MockCertificateAuthorityClientMockRecorder struct {
|
||||
mock *MockCertificateAuthorityClient
|
||||
}
|
||||
|
||||
// NewMockCertificateAuthorityClient creates a new mock instance
|
||||
// NewMockCertificateAuthorityClient creates a new mock instance.
|
||||
func NewMockCertificateAuthorityClient(ctrl *gomock.Controller) *MockCertificateAuthorityClient {
|
||||
mock := &MockCertificateAuthorityClient{ctrl: ctrl}
|
||||
mock.recorder = &MockCertificateAuthorityClientMockRecorder{mock}
|
||||
return mock
|
||||
}
|
||||
|
||||
// EXPECT returns an object that allows the caller to indicate expected use
|
||||
// EXPECT returns an object that allows the caller to indicate expected use.
|
||||
func (m *MockCertificateAuthorityClient) EXPECT() *MockCertificateAuthorityClientMockRecorder {
|
||||
return m.recorder
|
||||
}
|
||||
|
||||
// ActivateCertificateAuthority mocks base method
|
||||
func (m *MockCertificateAuthorityClient) ActivateCertificateAuthority(arg0 context.Context, arg1 *privateca0.ActivateCertificateAuthorityRequest, arg2 ...gax.CallOption) (*privateca.ActivateCertificateAuthorityOperation, error) {
|
||||
// ActivateCertificateAuthority mocks base method.
|
||||
func (m *MockCertificateAuthorityClient) ActivateCertificateAuthority(arg0 context.Context, arg1 *privatecapb.ActivateCertificateAuthorityRequest, arg2 ...gax.CallOption) (*privateca.ActivateCertificateAuthorityOperation, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
|
@ -50,15 +50,15 @@ func (m *MockCertificateAuthorityClient) ActivateCertificateAuthority(arg0 conte
|
|||
return ret0, ret1
|
||||
}
|
||||
|
||||
// ActivateCertificateAuthority indicates an expected call of ActivateCertificateAuthority
|
||||
// ActivateCertificateAuthority indicates an expected call of ActivateCertificateAuthority.
|
||||
func (mr *MockCertificateAuthorityClientMockRecorder) ActivateCertificateAuthority(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, "ActivateCertificateAuthority", reflect.TypeOf((*MockCertificateAuthorityClient)(nil).ActivateCertificateAuthority), varargs...)
|
||||
}
|
||||
|
||||
// CreateCaPool mocks base method
|
||||
func (m *MockCertificateAuthorityClient) CreateCaPool(arg0 context.Context, arg1 *privateca0.CreateCaPoolRequest, arg2 ...gax.CallOption) (*privateca.CreateCaPoolOperation, error) {
|
||||
// CreateCaPool mocks base method.
|
||||
func (m *MockCertificateAuthorityClient) CreateCaPool(arg0 context.Context, arg1 *privatecapb.CreateCaPoolRequest, arg2 ...gax.CallOption) (*privateca.CreateCaPoolOperation, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
|
@ -70,35 +70,35 @@ func (m *MockCertificateAuthorityClient) CreateCaPool(arg0 context.Context, arg1
|
|||
return ret0, ret1
|
||||
}
|
||||
|
||||
// CreateCaPool indicates an expected call of CreateCaPool
|
||||
// CreateCaPool indicates an expected call of CreateCaPool.
|
||||
func (mr *MockCertificateAuthorityClientMockRecorder) CreateCaPool(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, "CreateCaPool", reflect.TypeOf((*MockCertificateAuthorityClient)(nil).CreateCaPool), varargs...)
|
||||
}
|
||||
|
||||
// CreateCertificate mocks base method
|
||||
func (m *MockCertificateAuthorityClient) CreateCertificate(arg0 context.Context, arg1 *privateca0.CreateCertificateRequest, arg2 ...gax.CallOption) (*privateca0.Certificate, error) {
|
||||
// CreateCertificate mocks base method.
|
||||
func (m *MockCertificateAuthorityClient) CreateCertificate(arg0 context.Context, arg1 *privatecapb.CreateCertificateRequest, arg2 ...gax.CallOption) (*privatecapb.Certificate, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "CreateCertificate", varargs...)
|
||||
ret0, _ := ret[0].(*privateca0.Certificate)
|
||||
ret0, _ := ret[0].(*privatecapb.Certificate)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// CreateCertificate indicates an expected call of CreateCertificate
|
||||
// CreateCertificate indicates an expected call of CreateCertificate.
|
||||
func (mr *MockCertificateAuthorityClientMockRecorder) CreateCertificate(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, "CreateCertificate", reflect.TypeOf((*MockCertificateAuthorityClient)(nil).CreateCertificate), varargs...)
|
||||
}
|
||||
|
||||
// CreateCertificateAuthority mocks base method
|
||||
func (m *MockCertificateAuthorityClient) CreateCertificateAuthority(arg0 context.Context, arg1 *privateca0.CreateCertificateAuthorityRequest, arg2 ...gax.CallOption) (*privateca.CreateCertificateAuthorityOperation, error) {
|
||||
// CreateCertificateAuthority mocks base method.
|
||||
func (m *MockCertificateAuthorityClient) CreateCertificateAuthority(arg0 context.Context, arg1 *privatecapb.CreateCertificateAuthorityRequest, arg2 ...gax.CallOption) (*privateca.CreateCertificateAuthorityOperation, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
|
@ -110,15 +110,15 @@ func (m *MockCertificateAuthorityClient) CreateCertificateAuthority(arg0 context
|
|||
return ret0, ret1
|
||||
}
|
||||
|
||||
// CreateCertificateAuthority indicates an expected call of CreateCertificateAuthority
|
||||
// CreateCertificateAuthority indicates an expected call of CreateCertificateAuthority.
|
||||
func (mr *MockCertificateAuthorityClientMockRecorder) CreateCertificateAuthority(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, "CreateCertificateAuthority", reflect.TypeOf((*MockCertificateAuthorityClient)(nil).CreateCertificateAuthority), varargs...)
|
||||
}
|
||||
|
||||
// EnableCertificateAuthority mocks base method
|
||||
func (m *MockCertificateAuthorityClient) EnableCertificateAuthority(arg0 context.Context, arg1 *privateca0.EnableCertificateAuthorityRequest, arg2 ...gax.CallOption) (*privateca.EnableCertificateAuthorityOperation, error) {
|
||||
// EnableCertificateAuthority mocks base method.
|
||||
func (m *MockCertificateAuthorityClient) EnableCertificateAuthority(arg0 context.Context, arg1 *privatecapb.EnableCertificateAuthorityRequest, arg2 ...gax.CallOption) (*privateca.EnableCertificateAuthorityOperation, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
|
@ -130,87 +130,87 @@ func (m *MockCertificateAuthorityClient) EnableCertificateAuthority(arg0 context
|
|||
return ret0, ret1
|
||||
}
|
||||
|
||||
// EnableCertificateAuthority indicates an expected call of EnableCertificateAuthority
|
||||
// EnableCertificateAuthority indicates an expected call of EnableCertificateAuthority.
|
||||
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...)
|
||||
}
|
||||
|
||||
// FetchCertificateAuthorityCsr mocks base method
|
||||
func (m *MockCertificateAuthorityClient) FetchCertificateAuthorityCsr(arg0 context.Context, arg1 *privateca0.FetchCertificateAuthorityCsrRequest, arg2 ...gax.CallOption) (*privateca0.FetchCertificateAuthorityCsrResponse, error) {
|
||||
// FetchCertificateAuthorityCsr mocks base method.
|
||||
func (m *MockCertificateAuthorityClient) FetchCertificateAuthorityCsr(arg0 context.Context, arg1 *privatecapb.FetchCertificateAuthorityCsrRequest, arg2 ...gax.CallOption) (*privatecapb.FetchCertificateAuthorityCsrResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "FetchCertificateAuthorityCsr", varargs...)
|
||||
ret0, _ := ret[0].(*privateca0.FetchCertificateAuthorityCsrResponse)
|
||||
ret0, _ := ret[0].(*privatecapb.FetchCertificateAuthorityCsrResponse)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// FetchCertificateAuthorityCsr indicates an expected call of FetchCertificateAuthorityCsr
|
||||
// FetchCertificateAuthorityCsr indicates an expected call of FetchCertificateAuthorityCsr.
|
||||
func (mr *MockCertificateAuthorityClientMockRecorder) FetchCertificateAuthorityCsr(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, "FetchCertificateAuthorityCsr", reflect.TypeOf((*MockCertificateAuthorityClient)(nil).FetchCertificateAuthorityCsr), varargs...)
|
||||
}
|
||||
|
||||
// GetCaPool mocks base method
|
||||
func (m *MockCertificateAuthorityClient) GetCaPool(arg0 context.Context, arg1 *privateca0.GetCaPoolRequest, arg2 ...gax.CallOption) (*privateca0.CaPool, error) {
|
||||
// GetCaPool mocks base method.
|
||||
func (m *MockCertificateAuthorityClient) GetCaPool(arg0 context.Context, arg1 *privatecapb.GetCaPoolRequest, arg2 ...gax.CallOption) (*privatecapb.CaPool, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "GetCaPool", varargs...)
|
||||
ret0, _ := ret[0].(*privateca0.CaPool)
|
||||
ret0, _ := ret[0].(*privatecapb.CaPool)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// GetCaPool indicates an expected call of GetCaPool
|
||||
// GetCaPool indicates an expected call of GetCaPool.
|
||||
func (mr *MockCertificateAuthorityClientMockRecorder) GetCaPool(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, "GetCaPool", reflect.TypeOf((*MockCertificateAuthorityClient)(nil).GetCaPool), varargs...)
|
||||
}
|
||||
|
||||
// GetCertificateAuthority mocks base method
|
||||
func (m *MockCertificateAuthorityClient) GetCertificateAuthority(arg0 context.Context, arg1 *privateca0.GetCertificateAuthorityRequest, arg2 ...gax.CallOption) (*privateca0.CertificateAuthority, error) {
|
||||
// GetCertificateAuthority mocks base method.
|
||||
func (m *MockCertificateAuthorityClient) GetCertificateAuthority(arg0 context.Context, arg1 *privatecapb.GetCertificateAuthorityRequest, arg2 ...gax.CallOption) (*privatecapb.CertificateAuthority, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "GetCertificateAuthority", varargs...)
|
||||
ret0, _ := ret[0].(*privateca0.CertificateAuthority)
|
||||
ret0, _ := ret[0].(*privatecapb.CertificateAuthority)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// GetCertificateAuthority indicates an expected call of GetCertificateAuthority
|
||||
// GetCertificateAuthority indicates an expected call of GetCertificateAuthority.
|
||||
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...)
|
||||
}
|
||||
|
||||
// RevokeCertificate mocks base method
|
||||
func (m *MockCertificateAuthorityClient) RevokeCertificate(arg0 context.Context, arg1 *privateca0.RevokeCertificateRequest, arg2 ...gax.CallOption) (*privateca0.Certificate, error) {
|
||||
// RevokeCertificate mocks base method.
|
||||
func (m *MockCertificateAuthorityClient) RevokeCertificate(arg0 context.Context, arg1 *privatecapb.RevokeCertificateRequest, arg2 ...gax.CallOption) (*privatecapb.Certificate, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "RevokeCertificate", varargs...)
|
||||
ret0, _ := ret[0].(*privateca0.Certificate)
|
||||
ret0, _ := ret[0].(*privatecapb.Certificate)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// RevokeCertificate indicates an expected call of RevokeCertificate
|
||||
// RevokeCertificate indicates an expected call of RevokeCertificate.
|
||||
func (mr *MockCertificateAuthorityClientMockRecorder) RevokeCertificate(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]interface{}{arg0, arg1}, arg2...)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Code generated by MockGen. DO NOT EDIT.
|
||||
// Source: google.golang.org/genproto/googleapis/longrunning (interfaces: OperationsServer)
|
||||
// Source: cloud.google.com/go/longrunning/autogen/longrunningpb (interfaces: OperationsServer)
|
||||
|
||||
// Package cloudcas is a generated GoMock package.
|
||||
package cloudcas
|
||||
|
@ -8,36 +8,36 @@ import (
|
|||
context "context"
|
||||
reflect "reflect"
|
||||
|
||||
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
longrunning "google.golang.org/genproto/googleapis/longrunning"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
// MockOperationsServer is a mock of OperationsServer interface
|
||||
// MockOperationsServer is a mock of OperationsServer interface.
|
||||
type MockOperationsServer struct {
|
||||
ctrl *gomock.Controller
|
||||
recorder *MockOperationsServerMockRecorder
|
||||
}
|
||||
|
||||
// MockOperationsServerMockRecorder is the mock recorder for MockOperationsServer
|
||||
// MockOperationsServerMockRecorder is the mock recorder for MockOperationsServer.
|
||||
type MockOperationsServerMockRecorder struct {
|
||||
mock *MockOperationsServer
|
||||
}
|
||||
|
||||
// NewMockOperationsServer creates a new mock instance
|
||||
// NewMockOperationsServer creates a new mock instance.
|
||||
func NewMockOperationsServer(ctrl *gomock.Controller) *MockOperationsServer {
|
||||
mock := &MockOperationsServer{ctrl: ctrl}
|
||||
mock.recorder = &MockOperationsServerMockRecorder{mock}
|
||||
return mock
|
||||
}
|
||||
|
||||
// EXPECT returns an object that allows the caller to indicate expected use
|
||||
// EXPECT returns an object that allows the caller to indicate expected use.
|
||||
func (m *MockOperationsServer) EXPECT() *MockOperationsServerMockRecorder {
|
||||
return m.recorder
|
||||
}
|
||||
|
||||
// CancelOperation mocks base method
|
||||
func (m *MockOperationsServer) CancelOperation(arg0 context.Context, arg1 *longrunning.CancelOperationRequest) (*emptypb.Empty, error) {
|
||||
// CancelOperation mocks base method.
|
||||
func (m *MockOperationsServer) CancelOperation(arg0 context.Context, arg1 *longrunningpb.CancelOperationRequest) (*emptypb.Empty, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "CancelOperation", arg0, arg1)
|
||||
ret0, _ := ret[0].(*emptypb.Empty)
|
||||
|
@ -45,14 +45,14 @@ func (m *MockOperationsServer) CancelOperation(arg0 context.Context, arg1 *longr
|
|||
return ret0, ret1
|
||||
}
|
||||
|
||||
// CancelOperation indicates an expected call of CancelOperation
|
||||
// CancelOperation indicates an expected call of CancelOperation.
|
||||
func (mr *MockOperationsServerMockRecorder) CancelOperation(arg0, arg1 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelOperation", reflect.TypeOf((*MockOperationsServer)(nil).CancelOperation), arg0, arg1)
|
||||
}
|
||||
|
||||
// DeleteOperation mocks base method
|
||||
func (m *MockOperationsServer) DeleteOperation(arg0 context.Context, arg1 *longrunning.DeleteOperationRequest) (*emptypb.Empty, error) {
|
||||
// DeleteOperation mocks base method.
|
||||
func (m *MockOperationsServer) DeleteOperation(arg0 context.Context, arg1 *longrunningpb.DeleteOperationRequest) (*emptypb.Empty, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "DeleteOperation", arg0, arg1)
|
||||
ret0, _ := ret[0].(*emptypb.Empty)
|
||||
|
@ -60,52 +60,52 @@ func (m *MockOperationsServer) DeleteOperation(arg0 context.Context, arg1 *longr
|
|||
return ret0, ret1
|
||||
}
|
||||
|
||||
// DeleteOperation indicates an expected call of DeleteOperation
|
||||
// DeleteOperation indicates an expected call of DeleteOperation.
|
||||
func (mr *MockOperationsServerMockRecorder) DeleteOperation(arg0, arg1 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteOperation", reflect.TypeOf((*MockOperationsServer)(nil).DeleteOperation), arg0, arg1)
|
||||
}
|
||||
|
||||
// GetOperation mocks base method
|
||||
func (m *MockOperationsServer) GetOperation(arg0 context.Context, arg1 *longrunning.GetOperationRequest) (*longrunning.Operation, error) {
|
||||
// GetOperation mocks base method.
|
||||
func (m *MockOperationsServer) GetOperation(arg0 context.Context, arg1 *longrunningpb.GetOperationRequest) (*longrunningpb.Operation, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "GetOperation", arg0, arg1)
|
||||
ret0, _ := ret[0].(*longrunning.Operation)
|
||||
ret0, _ := ret[0].(*longrunningpb.Operation)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// GetOperation indicates an expected call of GetOperation
|
||||
// GetOperation indicates an expected call of GetOperation.
|
||||
func (mr *MockOperationsServerMockRecorder) GetOperation(arg0, arg1 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockOperationsServer)(nil).GetOperation), arg0, arg1)
|
||||
}
|
||||
|
||||
// ListOperations mocks base method
|
||||
func (m *MockOperationsServer) ListOperations(arg0 context.Context, arg1 *longrunning.ListOperationsRequest) (*longrunning.ListOperationsResponse, error) {
|
||||
// ListOperations mocks base method.
|
||||
func (m *MockOperationsServer) ListOperations(arg0 context.Context, arg1 *longrunningpb.ListOperationsRequest) (*longrunningpb.ListOperationsResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "ListOperations", arg0, arg1)
|
||||
ret0, _ := ret[0].(*longrunning.ListOperationsResponse)
|
||||
ret0, _ := ret[0].(*longrunningpb.ListOperationsResponse)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// ListOperations indicates an expected call of ListOperations
|
||||
// ListOperations indicates an expected call of ListOperations.
|
||||
func (mr *MockOperationsServerMockRecorder) ListOperations(arg0, arg1 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockOperationsServer)(nil).ListOperations), arg0, arg1)
|
||||
}
|
||||
|
||||
// WaitOperation mocks base method
|
||||
func (m *MockOperationsServer) WaitOperation(arg0 context.Context, arg1 *longrunning.WaitOperationRequest) (*longrunning.Operation, error) {
|
||||
// WaitOperation mocks base method.
|
||||
func (m *MockOperationsServer) WaitOperation(arg0 context.Context, arg1 *longrunningpb.WaitOperationRequest) (*longrunningpb.Operation, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "WaitOperation", arg0, arg1)
|
||||
ret0, _ := ret[0].(*longrunning.Operation)
|
||||
ret0, _ := ret[0].(*longrunningpb.Operation)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// WaitOperation indicates an expected call of WaitOperation
|
||||
// WaitOperation indicates an expected call of WaitOperation.
|
||||
func (mr *MockOperationsServerMockRecorder) WaitOperation(arg0, arg1 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitOperation", reflect.TypeOf((*MockOperationsServer)(nil).WaitOperation), arg0, arg1)
|
||||
|
|
6
go.mod
6
go.mod
|
@ -4,7 +4,7 @@ go 1.18
|
|||
|
||||
require (
|
||||
cloud.google.com/go v0.105.0 // indirect
|
||||
cloud.google.com/go/longrunning v0.2.1
|
||||
cloud.google.com/go/longrunning v0.3.0
|
||||
cloud.google.com/go/security v1.9.0
|
||||
github.com/Azure/azure-sdk-for-go v67.0.0+incompatible // indirect
|
||||
github.com/Azure/go-autorest/autorest v0.11.28 // indirect
|
||||
|
@ -50,7 +50,7 @@ require (
|
|||
golang.org/x/sys v0.0.0-20221006211917-84dc82d7e875 // indirect
|
||||
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect
|
||||
google.golang.org/api v0.102.0
|
||||
google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e
|
||||
google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c
|
||||
google.golang.org/grpc v1.50.1
|
||||
google.golang.org/protobuf v1.28.1
|
||||
gopkg.in/square/go-jose.v2 v2.6.0
|
||||
|
@ -59,7 +59,7 @@ require (
|
|||
require (
|
||||
cloud.google.com/go/compute v1.12.1 // indirect
|
||||
cloud.google.com/go/compute/metadata v0.2.1 // indirect
|
||||
cloud.google.com/go/iam v0.5.0 // indirect
|
||||
cloud.google.com/go/iam v0.6.0 // indirect
|
||||
cloud.google.com/go/kms v1.5.0 // indirect
|
||||
filippo.io/edwards25519 v1.0.0 // indirect
|
||||
github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 // indirect
|
||||
|
|
12
go.sum
12
go.sum
|
@ -6,12 +6,12 @@ cloud.google.com/go/compute v1.12.1 h1:gKVJMEyqV5c/UnpzjjQbo3Rjvvqpr9B1DFSbJC4OX
|
|||
cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU=
|
||||
cloud.google.com/go/compute/metadata v0.2.1 h1:efOwf5ymceDhK6PKMnnrTHP4pppY5L22mle96M1yP48=
|
||||
cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM=
|
||||
cloud.google.com/go/iam v0.5.0 h1:fz9X5zyTWBmamZsqvqZqD7khbifcZF/q+Z1J8pfhIUg=
|
||||
cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc=
|
||||
cloud.google.com/go/iam v0.6.0 h1:nsqQC88kT5Iwlm4MeNGTpfMWddp6NB/UOLFTH6m1QfQ=
|
||||
cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc=
|
||||
cloud.google.com/go/kms v1.5.0 h1:uc58n3b/n/F2yDMJzHMbXORkJSh3fzO4/+jju6eR7Zg=
|
||||
cloud.google.com/go/kms v1.5.0/go.mod h1:QJS2YY0eJGBg3mnDfuaCyLauWwBJiHRboYxJ++1xJNg=
|
||||
cloud.google.com/go/longrunning v0.2.1 h1:x3E/YapFCMe2G1D9qCv9COrBldOwK/n0OC7w9PLzeX0=
|
||||
cloud.google.com/go/longrunning v0.2.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE=
|
||||
cloud.google.com/go/longrunning v0.3.0 h1:NjljC+FYPV3uh5/OwWT6pVU+doBqMg2x/rZlE+CamDs=
|
||||
cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc=
|
||||
cloud.google.com/go/security v1.9.0 h1:o9frPOtXW2f4zMlw4SYPE42LRz/hhrYVWtAEUkPvyA4=
|
||||
cloud.google.com/go/security v1.9.0/go.mod h1:6Ta1bO8LXI89nZnmnsZGp9lVoVWXqsVbIq/t9dzI+2Q=
|
||||
filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek=
|
||||
|
@ -873,8 +873,8 @@ google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dT
|
|||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
||||
google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e h1:S9GbmC1iCgvbLyAokVCwiO6tVIrU9Y7c5oMx1V/ki/Y=
|
||||
google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s=
|
||||
google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c h1:QgY/XxIAIeccR+Ca/rDdKubLIU9rcJ3xfy1DC/Wd2Oo=
|
||||
google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo=
|
||||
google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
|
||||
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
|
|
Loading…
Reference in a new issue