Documentation ¶
Overview ¶
Package access contains commands related to API access for the client.
Index ¶
Constants ¶
const ( // ServiceAccountNameSuffix is appended to the name of all service accounts. ServiceAccountNameSuffix = "@" + serviceAccountDomain // CloudProviderServiceAccountPrefix is the prefix required for cloud provider service accounts. CloudProviderServiceAccountPrefix = "cloud-provider:" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServiceAccount ¶ added in v0.40.0
type ServiceAccount struct { // BaseName is the base name of the service account. // // Example: "aws-1" BaseName string // Suffix is the suffix of the service account. // // Example: "@cloud-provider.serviceaccount.omni.sidero.dev" Suffix string // IsCloudProvider indicates whether the service account is a cloud provider service account. IsCloudProvider bool }
ServiceAccount represents a service account.
func ParseServiceAccountFromFullID ¶ added in v0.40.0
func ParseServiceAccountFromFullID(fullID string) (sa ServiceAccount, isSa bool)
ParseServiceAccountFromFullID parses a service account from a full ID (Identity resource ID / e-mail).
Example: fullID: aws-1@cloud-provider.serviceaccount.omni.sidero.dev
Result: ServiceAccount{BaseName: "aws-1", Suffix: "@cloud-provider.serviceaccount.omni.sidero.dev", IsCloudProvider: true}.
func ParseServiceAccountFromName ¶ added in v0.40.0
func ParseServiceAccountFromName(name string) ServiceAccount
ParseServiceAccountFromName parses a service account from a name with a potential prefix.
Example: name: "cloud-provider:aws-1"
Result: ServiceAccount{BaseName: "aws-1", Suffix: "@cloud-provider.serviceaccount.omni.sidero.dev", IsCloudProvider: true}.
func (ServiceAccount) FullID ¶ added in v0.40.0
func (sa ServiceAccount) FullID() string
FullID returns the full ID (Identity resource ID / e-mail) of the service account.
Example: aws-1@cloud-provider.serviceaccount.omni.sidero.dev.
func (ServiceAccount) NameWithPrefix ¶ added in v0.40.0
func (sa ServiceAccount) NameWithPrefix() string
NameWithPrefix returns the name of the service account with the appropriate prefix.
Example: cloud-provider:aws-1.