token

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2023 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(audience string) error

Delete removes the token for the given audience, if it exists. No error is returned if the token doesn't exist.

func DeleteAll

func DeleteAll() error

DeleteAll removes all Chainguard tokens and empty audience directories.

func Load

func Load(audience string) ([]byte, error)

Load returns the token for the given audience if it exists, or an error if it doesn't.

func Path

func Path(audience string) (string, error)

Path is the filepath of the token for the given audience.

func RemainingLife

func RemainingLife(audience string, less time.Duration) time.Duration

RemainingLife returns the amount of time remaining before the token for the given audience expires. Returns 0 for expired and non-existent tokens.

func Save

func Save(token []byte, audience string) error

Save saves the given token to cache/audience

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL