gcp

package
v0.0.0-...-5c79d48 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProjectIDFromServiceAccountName

func ProjectIDFromServiceAccountName(serviceAccount string) (string, error)

func ValidateGCPServiceAccountName

func ValidateGCPServiceAccountName(serviceAccount string) error

Types

type SortedGCPServiceAccounts

type SortedGCPServiceAccounts []string

SortedGCPServiceAccounts sorts service accounts by project and service account name.

func (SortedGCPServiceAccounts) Len

func (s SortedGCPServiceAccounts) Len() int

Len returns the length of a list.

func (SortedGCPServiceAccounts) Less

func (s SortedGCPServiceAccounts) Less(i, j int) bool

Less compares items. Given two accounts, it first compares the project (i.e. what goes after @) and if they are equal proceeds to compare the service account name (what goes before @). Example of sorted list: - test-0@example-100200.iam.gserviceaccount.com - test-1@example-123456.iam.gserviceaccount.com - test-2@example-123456.iam.gserviceaccount.com - test-3@example-123456.iam.gserviceaccount.com - test-0@other-999999.iam.gserviceaccount.com

func (SortedGCPServiceAccounts) Swap

func (s SortedGCPServiceAccounts) Swap(i, j int)

Swap swaps two items in a list.

Jump to

Keyboard shortcuts

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