secret

package
v0.0.0-...-1ad39a8 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package github provides a plugin that implements the rotate.Storage interface to store the results of password rotation into the action secret store of a github project.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client implements the rotate.SaveClient interface for storing keys following rotation.

To use this client, a GITHUB_TOKEN environment variable must be set to a github access token with adequate permissions to update action secrets.

func (*Client) LastSaved

func (c *Client) LastSaved(
	ctx context.Context,
	store secret.Storage,
	key string,
) (time.Time, error)

LastSaved checks for the given key on the given project to see when it was last saved. It will return that value, if it has been stored previously. If it has not been stored previously, it returns the zero value.

func (*Client) Name

func (c *Client) Name() string

Name returns "github action secrets"

func (*Client) SaveKeys

func (c *Client) SaveKeys(
	ctx context.Context,
	store secret.Storage,
	ss secret.Map,
) error

SaveKeys saves each of the secrets given in the project.

Jump to

Keyboard shortcuts

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