Documentation ¶
Index ¶
- func CachedReadCaches(ctx context.Context) ([]*nixv1alpha1.NixBinCache, error)
- func Caches(ctx context.Context) ([]*nixv1alpha1.NixBinCache, error)
- func Configure(ctx context.Context) error
- func ConfigureReprompt(ctx context.Context, username string) error
- func DisableReadCaches()
- func IsConfigured(ctx context.Context) bool
- func S3Client(ctx context.Context) (*s3.Client, error)
- func WriteCaches(ctx context.Context) ([]*nixv1alpha1.NixBinCache, error)
- type AWSCredentials
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CachedReadCaches ¶
func CachedReadCaches(ctx context.Context) ([]*nixv1alpha1.NixBinCache, error)
func Caches ¶
func Caches( ctx context.Context, ) ([]*nixv1alpha1.NixBinCache, error)
Caches return the list of caches the user has access to. If user is not logged in, it returns nil, nil. (no error).
func DisableReadCaches ¶
func DisableReadCaches()
func IsConfigured ¶
func WriteCaches ¶
func WriteCaches( ctx context.Context, ) ([]*nixv1alpha1.NixBinCache, error)
Types ¶
type AWSCredentials ¶
type AWSCredentials struct { // Version must always be 1. Version int `json:"Version"` AccessKeyID string `json:"AccessKeyId"` SecretAccessKey string `json:"SecretAccessKey"` SessionToken string `json:"SessionToken"` Expiration time.Time `json:"Expiration"` }
AWSCredentials are short-lived credentials that grant access to a private Nix cache in S3. It marshals to JSON per the schema described in `aws help config-vars` under "Sourcing Credentials From External Processes".
func CachedCredentials ¶
func CachedCredentials(ctx context.Context) (AWSCredentials, error)
CachedCredentials fetches short-lived credentials that grant access to the user's private cache.
func (AWSCredentials) Env ¶
func (a AWSCredentials) Env() []string
Env returns the credentials as a slice of environment variables.
Click to show internal directories.
Click to hide internal directories.