Documentation ¶
Index ¶
- Constants
- Variables
- type SignerConfig
- type SignerServer
- func (signer *SignerServer) AuthInterceptor() grpc.UnaryServerInterceptor
- func (signer *SignerServer) IPWhitelistInterceptor() grpc.UnaryServerInterceptor
- func (signer *SignerServer) Name() string
- func (signer *SignerServer) SealObjectOnChain(ctx context.Context, req *types.SealObjectOnChainRequest) (*types.SealObjectOnChainResponse, error)
- func (signer *SignerServer) SignBucketApproval(ctx context.Context, req *types.SignBucketApprovalRequest) (*types.SignBucketApprovalResponse, error)
- func (signer *SignerServer) SignIntegrityHash(ctx context.Context, req *types.SignIntegrityHashRequest) (*types.SignIntegrityHashResponse, error)
- func (signer *SignerServer) SignObjectApproval(ctx context.Context, req *types.SignObjectApprovalRequest) (*types.SignObjectApprovalResponse, error)
- func (signer *SignerServer) SignPingMsg(ctx context.Context, req *types.SignPingMsgRequest) (*types.SignPingMsgResponse, error)
- func (signer *SignerServer) SignPongMsg(ctx context.Context, req *types.SignPongMsgRequest) (*types.SignPongMsgResponse, error)
- func (signer *SignerServer) SignReplicateApprovalReqMsg(ctx context.Context, req *types.SignReplicateApprovalReqMsgRequest) (*types.SignReplicateApprovalReqMsgResponse, error)
- func (signer *SignerServer) SignReplicateApprovalRspMsg(ctx context.Context, req *types.SignReplicateApprovalRspMsgRequest) (*types.SignReplicateApprovalRspMsgResponse, error)
- func (signer *SignerServer) Start(ctx context.Context) error
- func (signer *SignerServer) Stop(ctx context.Context) error
- func (signer *SignerServer) VerifyBucketApproval(ctx context.Context, req *types.VerifyBucketApprovalRequest) (*types.VerifyBucketApprovalResponse, error)
- func (signer *SignerServer) VerifyObjectApproval(ctx context.Context, req *types.VerifyObjectApprovalRequest) (*types.VerifyObjectApprovalResponse, error)
Constants ¶
const (
APITokenMD = "API-KEY"
)
Variables ¶
var DefaultSignerChainConfig = &SignerConfig{ GRPCAddress: model.SignerGRPCAddress, WhitelistCIDR: []string{model.WhiteListCIDR}, GasLimit: 210000, }
Functions ¶
This section is empty.
Types ¶
type SignerConfig ¶
type SignerServer ¶
type SignerServer struct {
// contains filtered or unexported fields
}
SignerServer signer service
func NewSignerServer ¶
func NewSignerServer(config *SignerConfig, chainConfig *gnfd.GreenfieldChainConfig) (*SignerServer, error)
NewSignerServer return SignerServer instance
func (*SignerServer) AuthInterceptor ¶
func (signer *SignerServer) AuthInterceptor() grpc.UnaryServerInterceptor
AuthInterceptor returns a new unary server interceptors that performs per-request auth.
func (*SignerServer) IPWhitelistInterceptor ¶
func (signer *SignerServer) IPWhitelistInterceptor() grpc.UnaryServerInterceptor
IPWhitelistInterceptor returns a new unary server interceptors that performs per-request ip whitelist.
func (*SignerServer) SealObjectOnChain ¶
func (signer *SignerServer) SealObjectOnChain(ctx context.Context, req *types.SealObjectOnChainRequest) (*types.SealObjectOnChainResponse, error)
SealObjectOnChain implements v1.SignerServiceServer
func (*SignerServer) SignBucketApproval ¶
func (signer *SignerServer) SignBucketApproval(ctx context.Context, req *types.SignBucketApprovalRequest) (*types.SignBucketApprovalResponse, error)
SignBucketApproval implements v1.SignerServiceServer
func (*SignerServer) SignIntegrityHash ¶
func (signer *SignerServer) SignIntegrityHash(ctx context.Context, req *types.SignIntegrityHashRequest) (*types.SignIntegrityHashResponse, error)
SignIntegrityHash implements v1.SignerServiceServer
func (*SignerServer) SignObjectApproval ¶
func (signer *SignerServer) SignObjectApproval(ctx context.Context, req *types.SignObjectApprovalRequest) (*types.SignObjectApprovalResponse, error)
SignObjectApproval implements v1.SignerServiceServer
func (*SignerServer) SignPingMsg ¶
func (signer *SignerServer) SignPingMsg(ctx context.Context, req *types.SignPingMsgRequest) (*types.SignPingMsgResponse, error)
SignPingMsg signs the ping msg for p2p node
func (*SignerServer) SignPongMsg ¶
func (signer *SignerServer) SignPongMsg(ctx context.Context, req *types.SignPongMsgRequest) (*types.SignPongMsgResponse, error)
SignPongMsg signs the pong msg for p2p node
func (*SignerServer) SignReplicateApprovalReqMsg ¶
func (signer *SignerServer) SignReplicateApprovalReqMsg(ctx context.Context, req *types.SignReplicateApprovalReqMsgRequest) (*types.SignReplicateApprovalReqMsgResponse, error)
SignReplicateApprovalReqMsg signs the get approval request msg for p2p node
func (*SignerServer) SignReplicateApprovalRspMsg ¶
func (signer *SignerServer) SignReplicateApprovalRspMsg(ctx context.Context, req *types.SignReplicateApprovalRspMsgRequest) (*types.SignReplicateApprovalRspMsgResponse, error)
SignReplicateApprovalRspMsg signs the get approval response msg for p2p node
func (*SignerServer) Start ¶
func (signer *SignerServer) Start(ctx context.Context) error
Start a service, this method should be used in non-block form
func (*SignerServer) Stop ¶
func (signer *SignerServer) Stop(ctx context.Context) error
Stop a service, this method should be used in non-block form
func (*SignerServer) VerifyBucketApproval ¶
func (signer *SignerServer) VerifyBucketApproval(ctx context.Context, req *types.VerifyBucketApprovalRequest) (*types.VerifyBucketApprovalResponse, error)
VerifyBucketApproval implements v1.SignerServiceServer
func (*SignerServer) VerifyObjectApproval ¶
func (signer *SignerServer) VerifyObjectApproval(ctx context.Context, req *types.VerifyObjectApprovalRequest) (*types.VerifyObjectApprovalResponse, error)
VerifyObjectApproval implements v1.SignerServiceServer