Documentation
¶
Index ¶
- Variables
- type Client
- func (c *Client) Close() error
- func (c *Client) Delete(ctx context.Context, encodedKey string) error
- func (c *Client) Get(ctx context.Context, encodedKey string) (record Record, err error)
- func (c *Client) Invalidate(ctx context.Context, encodedKey, reason string) error
- func (c *Client) Resolve(ctx context.Context, encodedKey string) (record Record, err error)
- func (c *Client) Unpublish(ctx context.Context, encodedKey string) error
- type Config
- type Record
Constants ¶
This section is empty.
Variables ¶
var Error = errs.Class("auth admin client")
Error is a class of auth admin client errors.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a client for managing auth records.
func Open ¶ added in v1.70.0
Open returns an initialized Client connected to the configured databases.
func (*Client) Invalidate ¶
Invalidate invalidates a record on all configured authservice databases.
func (*Client) Resolve ¶
Resolve resolves an encryption key or access grant to a record. This is useful if input key could be either an encryption key for an authservice record, a hash of the encryption key, or an access grant.
Linksharing links support both access keys and access grants, so this is useful to look up details for either case.
Note that various fields on pb.Record are not set if resolving an access grant, such as EncryptedAccessGrant, and ExpiresAtUnix.
type Record ¶
type Record struct { *authdb.FullRecord DecryptedAccessGrant string `json:"decrypted_access_grant,omitempty"` PublicProjectUUID uuid.UUID `json:"public_project_id,omitempty"` MacaroonHeadHex string `json:"macaroon_head_hex,omitempty"` APIKey string `json:"api_key,omitempty"` }
Record is a representation of pb.Record for display purposes.