Documentation ¶
Overview ¶
Package grpclistener implements the support for incoming gRPCs.
Index ¶
- type Listener
- func (l *Listener) BlindSignAttributes(ctx context.Context, req *commands.BlindSignRequest) (*commands.BlindSignResponse, error)
- func (l *Listener) BlindVerifyCredentials(ctx context.Context, req *commands.BlindVerifyRequest) (*commands.BlindVerifyResponse, error)
- func (l *Listener) FinalizeStartup()
- func (l *Listener) GetVerificationKey(ctx context.Context, req *commands.VerificationKeyRequest) (*commands.VerificationKeyResponse, error)
- func (l *Listener) Halt()
- func (l *Listener) RegisterAsIssuer()
- func (l *Listener) RegisterAsProvider()
- func (l *Listener) SignAttributes(ctx context.Context, req *commands.SignRequest) (*commands.SignResponse, error)
- func (l *Listener) VerifyCredentials(ctx context.Context, req *commands.VerifyRequest) (*commands.VerifyResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Listener ¶
Listener represents the Coconut gRPC Server listener.
func New ¶
func New(cfg *config.Config, inCh chan<- *commands.CommandRequest, id uint64, l *logger.Logger, addr string, ) (*Listener, error)
New creates new instance of a grpclistener using provided config and listening on specified address.
func (*Listener) BlindSignAttributes ¶
func (l *Listener) BlindSignAttributes(ctx context.Context, req *commands.BlindSignRequest) (*commands.BlindSignResponse, error)
BlindSignAttributes resolves the BlindSignRequest to issue a blind credential on a set of private and optional public attributes. nolint: lll
func (*Listener) BlindVerifyCredentials ¶
func (l *Listener) BlindVerifyCredentials(ctx context.Context, req *commands.BlindVerifyRequest) (*commands.BlindVerifyResponse, error)
BlindVerifyCredentials resolves the BlindVerifyRequest to verify a blind credential on a set of private and optional public attributes. nolint: lll
func (*Listener) FinalizeStartup ¶
func (l *Listener) FinalizeStartup()
FinalizeStartup is used when the server is a provider. It indicates it has aggregated required number of verification keys and hence can verify received credentials.
func (*Listener) GetVerificationKey ¶
func (l *Listener) GetVerificationKey(ctx context.Context, req *commands.VerificationKeyRequest) (*commands.VerificationKeyResponse, error)
GetVerificationKey resolves the VerificationKeyRequest to return server's public coconut verification key. nolint: lll
func (*Listener) RegisterAsIssuer ¶
func (l *Listener) RegisterAsIssuer()
func (*Listener) RegisterAsProvider ¶
func (l *Listener) RegisterAsProvider()
func (*Listener) SignAttributes ¶
func (l *Listener) SignAttributes(ctx context.Context, req *commands.SignRequest) (*commands.SignResponse, error)
SignAttributes resolves the SignRequest to issue a credential on a set of public attributes.
func (*Listener) VerifyCredentials ¶
func (l *Listener) VerifyCredentials(ctx context.Context, req *commands.VerifyRequest) (*commands.VerifyResponse, error)
VerifyCredentials resolves the VerifyRequest to verify a credential on a set of public attributes. nolint: lll