keyops

package
v0.0.43 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key struct {
	// Scope name of the containing cloud resource where a key lives, this is either a google project id or a google service account email
	Scope string
	// Identifier for the the service account or application the key is for, this is either service account email or application id
	Identifier string
	// ID alphanumeric ID for the key
	ID string
}

Key represents a Google IAM service account key

type KeyOps added in v0.0.28

type KeyOps interface {
	// Create a new service account key for the given service account
	// returns a Key instance that includes the new key's ID as well as the key's JSON private key data
	Create(project string, serviceAccountEmail string) (Key, []byte, error)
	// IsDisabled return true if the given key is enabled, false otherwise
	IsDisabled(key Key) (bool, error)
	// EnsureDisabled check if the key is enabled and if so, disable it
	EnsureDisabled(key Key) error
	// DeleteIfDisabled if the service account key is disabled, delete it, else return an error
	DeleteIfDisabled(key Key) error
}

KeyOps peforms operations on Google service account keys. It supports creating new keys, disabling, and deleting them.

func New

func New(iamService *iam.Service) KeyOps

Directories

Path Synopsis
testutils
iam

Jump to

Keyboard shortcuts

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