/
filter.go
36 lines (27 loc) · 747 Bytes
/
filter.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
Copyright IBM Corp, SecureKey Technologies Inc. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package main
import (
"context"
"github.com/hyperledger/fabric/core/handlers/auth"
"github.com/hyperledger/fabric/protos/peer"
)
// NewFilter creates a new Filter
func NewFilter() auth.Filter {
return &filter{}
}
type filter struct {
next peer.EndorserServer
}
// Init initializes the Filter with the next EndorserServer
func (f *filter) Init(next peer.EndorserServer) {
f.next = next
}
// ProcessProposal processes a signed proposal
func (f *filter) ProcessProposal(ctx context.Context, signedProp *peer.SignedProposal) (*peer.ProposalResponse, error) {
return f.next.ProcessProposal(ctx, signedProp)
}
func main() {
}