ghsecretmgr

package module
v0.0.0-...-3efc10b Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

README

ghsecretmgr

Build Status codecov.io Go Report Card GitHub Release GoDoc

Github Action secret manager makes updating secrets easier.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidInput = errors.New("input is invalid")
	ErrUnable       = errors.New("unable to perform requested action")
)

Functions

func NewOrg

func NewOrg(ctx context.Context, m Manager) (ghAPI, *github.Response, error)

func NewRepo

func NewRepo(ctx context.Context, m Manager) (ghAPI, *github.Response, error)

func NewRepoEnv

func NewRepoEnv(ctx context.Context, m Manager) (ghAPI, *github.Response, error)

Types

type Manager

type Manager struct {
	Client *github.Client
	Owner  string
	Repo   string // if "" then assumed to be an owner/org secret
	Env    string // if not "" then assumed to be an environment secret
	// contains filtered or unexported fields
}

func (*Manager) DeleteSecret

func (m *Manager) DeleteSecret(ctx context.Context, name string) (*github.Response, error)

func (*Manager) GetSecret

func (m *Manager) GetSecret(ctx context.Context, name string) (*github.Secret, *github.Response, error)

GetSecret returns the secret with the name provided if possible, otherwise it returns a nil secret and always returns the response from github.

func (*Manager) UpdateSecret

func (m *Manager) UpdateSecret(ctx context.Context, name, value string) (*github.Response, error)

Jump to

Keyboard shortcuts

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