mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-16 18:47:10 +02:00
databroker: add list types method (#3937)
* databroker: add list types method * fix test * Update pkg/storage/redis/redis.go Co-authored-by: Denis Mishin <dmishin@pomerium.com> --------- Co-authored-by: Denis Mishin <dmishin@pomerium.com>
This commit is contained in:
parent
424b743b11
commit
7895bf431f
13 changed files with 495 additions and 232 deletions
|
@ -181,6 +181,19 @@ func (backend *Backend) Lease(
|
|||
return leaseHolderID == leaseID, nil
|
||||
}
|
||||
|
||||
// ListTypes lists the record types.
|
||||
func (backend *Backend) ListTypes(ctx context.Context) ([]string, error) {
|
||||
ctx, cancel := contextutil.Merge(ctx, backend.closeCtx)
|
||||
defer cancel()
|
||||
|
||||
_, conn, err := backend.init(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return listTypes(ctx, conn)
|
||||
}
|
||||
|
||||
// Put puts a record into Postgres.
|
||||
func (backend *Backend) Put(
|
||||
ctx context.Context,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue