1 Star 0 Fork 0

妥協/fabric

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
deliver_client.go 4.89 KB
一键复制 编辑 原始数据 按行查看 历史
// Code generated by counterfeiter. DO NOT EDIT.
package mock
import (
"context"
"crypto/tls"
"sync"
"github.com/hyperledger/fabric/token/client"
"google.golang.org/grpc"
)
type DeliverClient struct {
NewDeliverFilteredStub func(ctx context.Context, opts ...grpc.CallOption) (client.DeliverFiltered, error)
newDeliverFilteredMutex sync.RWMutex
newDeliverFilteredArgsForCall []struct {
ctx context.Context
opts []grpc.CallOption
}
newDeliverFilteredReturns struct {
result1 client.DeliverFiltered
result2 error
}
newDeliverFilteredReturnsOnCall map[int]struct {
result1 client.DeliverFiltered
result2 error
}
CertificateStub func() *tls.Certificate
certificateMutex sync.RWMutex
certificateArgsForCall []struct{}
certificateReturns struct {
result1 *tls.Certificate
}
certificateReturnsOnCall map[int]struct {
result1 *tls.Certificate
}
invocations map[string][][]interface{}
invocationsMutex sync.RWMutex
}
func (fake *DeliverClient) NewDeliverFiltered(ctx context.Context, opts ...grpc.CallOption) (client.DeliverFiltered, error) {
fake.newDeliverFilteredMutex.Lock()
ret, specificReturn := fake.newDeliverFilteredReturnsOnCall[len(fake.newDeliverFilteredArgsForCall)]
fake.newDeliverFilteredArgsForCall = append(fake.newDeliverFilteredArgsForCall, struct {
ctx context.Context
opts []grpc.CallOption
}{ctx, opts})
fake.recordInvocation("NewDeliverFiltered", []interface{}{ctx, opts})
fake.newDeliverFilteredMutex.Unlock()
if fake.NewDeliverFilteredStub != nil {
return fake.NewDeliverFilteredStub(ctx, opts...)
}
if specificReturn {
return ret.result1, ret.result2
}
return fake.newDeliverFilteredReturns.result1, fake.newDeliverFilteredReturns.result2
}
func (fake *DeliverClient) NewDeliverFilteredCallCount() int {
fake.newDeliverFilteredMutex.RLock()
defer fake.newDeliverFilteredMutex.RUnlock()
return len(fake.newDeliverFilteredArgsForCall)
}
func (fake *DeliverClient) NewDeliverFilteredArgsForCall(i int) (context.Context, []grpc.CallOption) {
fake.newDeliverFilteredMutex.RLock()
defer fake.newDeliverFilteredMutex.RUnlock()
return fake.newDeliverFilteredArgsForCall[i].ctx, fake.newDeliverFilteredArgsForCall[i].opts
}
func (fake *DeliverClient) NewDeliverFilteredReturns(result1 client.DeliverFiltered, result2 error) {
fake.NewDeliverFilteredStub = nil
fake.newDeliverFilteredReturns = struct {
result1 client.DeliverFiltered
result2 error
}{result1, result2}
}
func (fake *DeliverClient) NewDeliverFilteredReturnsOnCall(i int, result1 client.DeliverFiltered, result2 error) {
fake.NewDeliverFilteredStub = nil
if fake.newDeliverFilteredReturnsOnCall == nil {
fake.newDeliverFilteredReturnsOnCall = make(map[int]struct {
result1 client.DeliverFiltered
result2 error
})
}
fake.newDeliverFilteredReturnsOnCall[i] = struct {
result1 client.DeliverFiltered
result2 error
}{result1, result2}
}
func (fake *DeliverClient) Certificate() *tls.Certificate {
fake.certificateMutex.Lock()
ret, specificReturn := fake.certificateReturnsOnCall[len(fake.certificateArgsForCall)]
fake.certificateArgsForCall = append(fake.certificateArgsForCall, struct{}{})
fake.recordInvocation("Certificate", []interface{}{})
fake.certificateMutex.Unlock()
if fake.CertificateStub != nil {
return fake.CertificateStub()
}
if specificReturn {
return ret.result1
}
return fake.certificateReturns.result1
}
func (fake *DeliverClient) CertificateCallCount() int {
fake.certificateMutex.RLock()
defer fake.certificateMutex.RUnlock()
return len(fake.certificateArgsForCall)
}
func (fake *DeliverClient) CertificateReturns(result1 *tls.Certificate) {
fake.CertificateStub = nil
fake.certificateReturns = struct {
result1 *tls.Certificate
}{result1}
}
func (fake *DeliverClient) CertificateReturnsOnCall(i int, result1 *tls.Certificate) {
fake.CertificateStub = nil
if fake.certificateReturnsOnCall == nil {
fake.certificateReturnsOnCall = make(map[int]struct {
result1 *tls.Certificate
})
}
fake.certificateReturnsOnCall[i] = struct {
result1 *tls.Certificate
}{result1}
}
func (fake *DeliverClient) Invocations() map[string][][]interface{} {
fake.invocationsMutex.RLock()
defer fake.invocationsMutex.RUnlock()
fake.newDeliverFilteredMutex.RLock()
defer fake.newDeliverFilteredMutex.RUnlock()
fake.certificateMutex.RLock()
defer fake.certificateMutex.RUnlock()
copiedInvocations := map[string][][]interface{}{}
for key, value := range fake.invocations {
copiedInvocations[key] = value
}
return copiedInvocations
}
func (fake *DeliverClient) recordInvocation(key string, args []interface{}) {
fake.invocationsMutex.Lock()
defer fake.invocationsMutex.Unlock()
if fake.invocations == nil {
fake.invocations = map[string][][]interface{}{}
}
if fake.invocations[key] == nil {
fake.invocations[key] = [][]interface{}{}
}
fake.invocations[key] = append(fake.invocations[key], args)
}
var _ client.DeliverClient = new(DeliverClient)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/liurenhao/fabric.git
git@gitee.com:liurenhao/fabric.git
liurenhao
fabric
fabric
v1.4.4

搜索帮助

0d507c66 1850385 C8b1a773 1850385