Skip to content

Commit

Permalink
Remove unused code (#117)
Browse files Browse the repository at this point in the history
The `Passthrough` interface ceased to be used after some code was
removed in #11.

The `GenerateLeases` function ceased to be used when this code was
made capable of being a separate plugin, rather than a builtin part of
Vault - credit to @remilapeyre for noticing this in #55 - I'm just
cherrypicking the removal of unused code from that old unmerged PR,
whilst I had some other unused code to PR the removal of too.
  • Loading branch information
maxb committed Jul 25, 2023
1 parent 0c66f9a commit 5af8cae
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions passthrough.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ import (
"github.com/hashicorp/vault/sdk/logical"
)

type Passthrough interface {
handleRead() framework.OperationFunc
handleWrite() framework.OperationFunc
handleDelete() framework.OperationFunc
handleList() framework.OperationFunc
handleExistenceCheck() framework.ExistenceFunc
}

// PassthroughBackendFactory returns a PassthroughBackend
// with leases switched off
func PassthroughBackendFactory(ctx context.Context, conf *logical.BackendConfig) (logical.Backend, error) {
Expand Down Expand Up @@ -241,10 +233,6 @@ func (b *PassthroughBackend) handleRead() framework.OperationFunc {
}
}

func (b *PassthroughBackend) GeneratesLeases() bool {
return b.generateLeases
}

func (b *PassthroughBackend) handleWrite() framework.OperationFunc {
return func(ctx context.Context, req *logical.Request, data *framework.FieldData) (*logical.Response, error) {
key := data.Get("path").(string)
Expand Down

0 comments on commit 5af8cae

Please sign in to comment.