Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DummyTime = time.Now()
DummyTime is a placeholder time for service accounts (they don't have modification times)
Functions ¶
func Close ¶
func Close() error
Close closes the IAM client. Note: The IAM client doesn't require explicit cleanup, but this is provided for consistency with other clients.
func FormatHeader ¶
func FormatHeader() string
FormatHeader returns the header for long format listing.
Types ¶
type ServiceAccountInfo ¶
type ServiceAccountInfo struct {
Email string
Name string
DisplayName string
Description string
Disabled bool
ProjectID string
}
ServiceAccountInfo represents information about a service account.
func GetServiceAccount ¶
func GetServiceAccount(ctx context.Context, projectID, accountEmail string) (*ServiceAccountInfo, error)
GetServiceAccount retrieves details about a specific service account.
func ListServiceAccounts ¶
func ListServiceAccounts(ctx context.Context, projectID string) ([]*ServiceAccountInfo, error)
ListServiceAccounts lists all service accounts in a project.
func (*ServiceAccountInfo) FormatDetailed ¶
func (sa *ServiceAccountInfo) FormatDetailed(aliasPath string) string
FormatDetailed formats service account info with all details.
func (*ServiceAccountInfo) FormatLong ¶
func (sa *ServiceAccountInfo) FormatLong() string
FormatLong formats service account info in long format (email, displayName, disabled).
func (*ServiceAccountInfo) FormatShort ¶
func (sa *ServiceAccountInfo) FormatShort() string
FormatShort formats service account info in short format (just email).
func (*ServiceAccountInfo) FormatShortWithAlias ¶
func (sa *ServiceAccountInfo) FormatShortWithAlias(aliasPath string) string
FormatShortWithAlias formats service account info with alias path.
type ServiceAccountKeyInfo ¶
type ServiceAccountKeyInfo struct {
Name string
KeyID string
KeyType string // USER_MANAGED or SYSTEM_MANAGED
ValidAfterTime time.Time
ValidBeforeTime time.Time
KeyAlgorithm string
Disabled bool
}
ServiceAccountKeyInfo represents information about a service account key.
func ListServiceAccountKeys ¶
func ListServiceAccountKeys(ctx context.Context, projectID, accountEmail string) ([]*ServiceAccountKeyInfo, error)
ListServiceAccountKeys lists all keys for a service account.