Skip to content

Commit

Permalink
Merge pull request #1035 from hiddeco/localclient-server-interface
Browse files Browse the repository at this point in the history
keyservice: accept KeyServiceServer in LocalClient
  • Loading branch information
ajvb committed Apr 5, 2022
2 parents 0f8c335 + 7138185 commit f5195eb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion keyservice/client.go
Expand Up @@ -8,14 +8,20 @@ import (

// LocalClient is a key service client that performs all operations locally
type LocalClient struct {
Server Server
Server KeyServiceServer
}

// NewLocalClient creates a new local client
func NewLocalClient() LocalClient {
return LocalClient{Server{}}
}

// NewCustomLocalClient creates a new local client with a non-default backing
// KeyServiceServer implementation
func NewCustomLocalClient(server KeyServiceServer) LocalClient {
return LocalClient{Server: server}
}

// Decrypt processes a decrypt request locally
// See keyservice/server.go for more details
func (c LocalClient) Decrypt(ctx context.Context,
Expand Down

0 comments on commit f5195eb

Please sign in to comment.