accounts

package
v2.17.5 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: Apache-2.0 Imports: 16 Imported by: 23

Documentation

Index

Constants

View Source
const (
	AccountTypeNone                       = AccountType("None")
	AccountTypeAmazonWebServicesAccount   = AccountType("AmazonWebServicesAccount")
	AccountTypeAzureServicePrincipal      = AccountType("AzureServicePrincipal")
	AccountTypeAzureSubscription          = AccountType("AzureSubscription")
	AccountTypeGoogleCloudPlatformAccount = AccountType("GoogleCloudAccount")
	AccountTypeSSHKeyPair                 = AccountType("SshKeyPair")
	AccountTypeToken                      = AccountType("Token")
	AccountTypeUsernamePassword           = AccountType("UsernamePassword")
)

Variables

This section is empty.

Functions

func IsNil

func IsNil(i interface{}) bool

Types

type AccountResource

type AccountResource struct {
	AccessKey               string                      `json:"AccessKey,omitempty"`
	AccountType             AccountType                 `` /* 196-byte string literal not displayed */
	ApplicationID           *uuid.UUID                  `json:"ClientId,omitempty"`
	ApplicationPassword     *core.SensitiveValue        `json:"Password,omitempty"`
	AuthenticationEndpoint  string                      `json:"ActiveDirectoryEndpointBaseUri,omitempty"`
	AzureEnvironment        string                      `json:"AzureEnvironment,omitempty"`
	CertificateBytes        *core.SensitiveValue        `json:"CertificateBytes,omitempty"`
	CertificateThumbprint   string                      `json:"CertificateThumbprint,omitempty"`
	Description             string                      `json:"Description,omitempty"`
	EnvironmentIDs          []string                    `json:"EnvironmentIds,omitempty"`
	JsonKey                 *core.SensitiveValue        `json:"JsonKey,omitempty"`
	ManagementEndpoint      string                      `json:"ServiceManagementEndpointBaseUri,omitempty"`
	Name                    string                      `json:"Name" validate:"required,notall"`
	PrivateKeyFile          *core.SensitiveValue        `json:"PrivateKeyFile,omitempty"`
	PrivateKeyPassphrase    *core.SensitiveValue        `json:"PrivateKeyPassphrase,omitempty"`
	ResourceManagerEndpoint string                      `json:"ResourceManagementEndpointBaseUri,omitempty"`
	SecretKey               *core.SensitiveValue        `json:"SecretKey,omitempty"`
	Slug                    string                      `json:"Slug,omitempty"`
	StorageEndpointSuffix   string                      `json:"ServiceManagementEndpointSuffix,omitempty"`
	SpaceID                 string                      `json:"SpaceId,omitempty"`
	SubscriptionID          *uuid.UUID                  `json:"SubscriptionNumber,omitempty"`
	TenantedDeploymentMode  core.TenantedDeploymentMode `json:"TenantedDeploymentParticipation,omitempty"`
	TenantID                *uuid.UUID                  `json:"TenantId,omitempty"`
	TenantIDs               []string                    `json:"TenantIds,omitempty"`
	TenantTags              []string                    `json:"TenantTags,omitempty"`
	Token                   *core.SensitiveValue        `json:"Token,omitempty"`
	Username                string                      `json:"Username,omitempty"`

	resources.Resource
}

AccountResource represents account details used for deployments, including username/password, tokens, Azure and AWS credentials, and SSH key pairs.

func NewAccountResource

func NewAccountResource(name string, accountType AccountType) *AccountResource

NewAccount creates and initializes an account resource with a name and type.

func ToAccountResource

func ToAccountResource(account IAccount) (*AccountResource, error)

func (*AccountResource) GetAccountType

func (a *AccountResource) GetAccountType() AccountType

GetAccountType returns the type of this account resource.

func (*AccountResource) GetDescription

func (a *AccountResource) GetDescription() string

GetDescription returns the description of this account resource.

func (*AccountResource) GetEnvironmentIDs

func (a *AccountResource) GetEnvironmentIDs() []string

func (*AccountResource) GetName

func (a *AccountResource) GetName() string

GetName returns the name of this account resource.

func (*AccountResource) GetSlug added in v2.5.0

func (a *AccountResource) GetSlug() string

GetSlug returns the slug to this account.

func (*AccountResource) GetSpaceID

func (a *AccountResource) GetSpaceID() string

GetSpaceID returns the space ID of this account resource.

func (*AccountResource) GetTenantIDs

func (a *AccountResource) GetTenantIDs() []string

GetTenantIDs returns the tenant IDs associated with this account resource.

func (*AccountResource) GetTenantTags

func (a *AccountResource) GetTenantTags() []string

GetTenantTags returns the tenant tags assigned to this account resource.

func (*AccountResource) GetTenantedDeploymentMode

func (a *AccountResource) GetTenantedDeploymentMode() core.TenantedDeploymentMode

GetTenantedDeploymentMode returns the tenanted deployment mode of this account resource.

func (*AccountResource) SetDescription

func (a *AccountResource) SetDescription(description string)

SetDescription sets the description of the account resource.

func (*AccountResource) SetEnvironmentIDs

func (a *AccountResource) SetEnvironmentIDs(environmentIds []string)

SetEnvironmentIDs sets the associated environment IDs of the account resource.

func (*AccountResource) SetName

func (a *AccountResource) SetName(name string)

SetName sets the name of this account resource.

func (*AccountResource) SetSlug added in v2.5.0

func (a *AccountResource) SetSlug(slug string)

SetSlug sets the slug of this account.

func (*AccountResource) SetSpaceID

func (a *AccountResource) SetSpaceID(spaceID string)

SetSpaceID sets the space ID of this account resource.

func (*AccountResource) SetTenantIDs

func (a *AccountResource) SetTenantIDs(tenantIds []string)

SetTenantIDs sets the tenant IDs associated with this account resource.

func (*AccountResource) SetTenantTags

func (a *AccountResource) SetTenantTags(tenantTags []string)

SetTenantTags sets the tenant tags associated with this account resource.

func (*AccountResource) SetTenantedDeploymentMode

func (a *AccountResource) SetTenantedDeploymentMode(mode core.TenantedDeploymentMode)

SetTenantedDeploymentMode sets the tenanted deployment mode of this account resource.

func (*AccountResource) Validate

func (a *AccountResource) Validate() error

Validate checks the state of the account resource and returns an error if invalid.

type AccountService

type AccountService struct {
	services.CanDeleteService
}

AccountService handles communication with the account endpoint.

func NewAccountService

func NewAccountService(sling *sling.Sling, uriTemplate string) *AccountService

NewAccountService returns the service with a preconfigured client.

func (*AccountService) Add

func (s *AccountService) Add(account IAccount) (IAccount, error)

Add creates a new account.

func (*AccountService) Get

func (s *AccountService) Get(accountsQuery ...AccountsQuery) (*Accounts, error)

Get returns a collection of accounts based on the criteria defined by its input query parameter. If an error occurs, an empty collection is returned along with the associated error.

func (*AccountService) GetAll

func (s *AccountService) GetAll() ([]IAccount, error)

GetAll returns all accounts. If none are found or an error occurs, it returns an empty collection.

func (*AccountService) GetByID

func (s *AccountService) GetByID(id string) (IAccount, error)

GetByID returns the account that matches the input ID. If one is not found, it returns nil and an error.

func (*AccountService) GetUsages

func (s *AccountService) GetUsages(account IAccount) (*AccountUsage, error)

GetUsages lists the projects and deployments which are using an account.

func (*AccountService) Update

func (s *AccountService) Update(account IAccount) (IAccount, error)

Update modifies an account based on the one provided as input.

type AccountType

type AccountType string

type AccountUsage

type AccountUsage struct {
	DeploymentProcesses []*deployments.StepUsage                  `json:"DeploymentProcesses,omitempty"`
	LibraryVariableSets []*variables.LibraryVariableSetUsageEntry `json:"LibraryVariableSets,omitempty"`
	ProjectVariableSets []*variables.ProjectVariableSetUsage      `json:"ProjectVariableSets,omitempty"`
	Releases            []*releases.ReleaseUsage                  `json:"Releases,omitempty"`
	RunbookProcesses    []*runbooks.RunbookStepUsage              `json:"RunbookProcesses,omitempty"`
	RunbookSnapshots    []*runbooks.RunbookSnapshotUsage          `json:"RunbookSnapshots,omitempty"`
	Targets             []*TargetUsageEntry                       `json:"Targets,omitempty"`

	resources.Resource
}

AccountUsage contains the projects and deployments which are using an account.

func NewAccountUsage

func NewAccountUsage() *AccountUsage

NewAccountUsage initializes an AccountUsage.

type Accounts

type Accounts resources.Resources[IAccount]

Accounts defines a collection of accounts with built-in support for paged results.

func ToAccounts

func ToAccounts(accountResources *resources.Resources[*AccountResource]) *Accounts

func (*Accounts) GetAllPages added in v2.3.0

func (r *Accounts) GetAllPages(client *sling.Sling) ([]IAccount, error)

GetAllPages will retrive all remaining next pages in the link collection and return the result as list of concatenated Items; Including the items from the base Resource.

func (*Accounts) GetNextPage added in v2.3.0

func (r *Accounts) GetNextPage(client *sling.Sling) (*Accounts, error)

GetNextPage retrives the next page from the links collection. If no next page exists it will return nill

func (*Accounts) MarshalJSON

func (a *Accounts) MarshalJSON() ([]byte, error)

MarshalJSON returns an Accounts struct as its JSON encoding.

func (*Accounts) UnmarshalJSON

func (a *Accounts) UnmarshalJSON(b []byte) error

UnmarshalJSON sets this Accounts struct to its representation in JSON.

type AccountsQuery

type AccountsQuery struct {
	AccountType AccountType `uri:"accountType,omitempty" url:"accountType,omitempty"`
	IDs         []string    `uri:"ids,omitempty" url:"ids,omitempty"`
	PartialName string      `uri:"partialName,omitempty" url:"partialName,omitempty"`
	Skip        int         `uri:"skip,omitempty" url:"skip,omitempty"`
	Take        int         `uri:"take,omitempty" url:"take,omitempty"`
}

AccountsQuery represents parameters to query the Accounts service.

type AmazonWebServicesAccount

type AmazonWebServicesAccount struct {
	AccessKey string               `json:"AccessKey" validate:"required"`
	SecretKey *core.SensitiveValue `json:"SecretKey" validate:"required"`
	// contains filtered or unexported fields
}

AmazonWebServicesAccount represents an Amazon Web Services (AWS) account.

func NewAmazonWebServicesAccount

func NewAmazonWebServicesAccount(name string, accessKey string, secretKey *core.SensitiveValue) (*AmazonWebServicesAccount, error)

NewAmazonWebServicesAccount initializes and returns an AWS account with a name, access key, and secret key.

func (*AmazonWebServicesAccount) GetAccountType

func (a *AmazonWebServicesAccount) GetAccountType() AccountType

GetAccountType returns the type of this account.

func (*AmazonWebServicesAccount) GetDescription

func (a *AmazonWebServicesAccount) GetDescription() string

GetDescription returns the description of the account.

func (*AmazonWebServicesAccount) GetEnvironmentIDs

func (a *AmazonWebServicesAccount) GetEnvironmentIDs() []string

GetEnvironmentIDs returns the environment IDs associated with this account.

func (*AmazonWebServicesAccount) GetName

func (a *AmazonWebServicesAccount) GetName() string

GetName returns the name of the account.

func (*AmazonWebServicesAccount) GetSlug added in v2.5.0

func (a *AmazonWebServicesAccount) GetSlug() string

GetSlug returns the slug to this account.

func (*AmazonWebServicesAccount) GetSpaceID

func (a *AmazonWebServicesAccount) GetSpaceID() string

GetSpaceID returns the space ID of this account.

func (*AmazonWebServicesAccount) GetTenantIDs

func (a *AmazonWebServicesAccount) GetTenantIDs() []string

GetTenantIDs returns the tenant IDs associated with this account.

func (*AmazonWebServicesAccount) GetTenantTags

func (a *AmazonWebServicesAccount) GetTenantTags() []string

GetTenantTags returns the tenant tags assigned to this account.

func (*AmazonWebServicesAccount) GetTenantedDeploymentMode

func (a *AmazonWebServicesAccount) GetTenantedDeploymentMode() core.TenantedDeploymentMode

GetTenantedDeploymentMode returns the tenanted deployment mode of this account.

func (*AmazonWebServicesAccount) SetDescription

func (a *AmazonWebServicesAccount) SetDescription(description string)

SetDescription sets the description of the account.

func (*AmazonWebServicesAccount) SetEnvironmentIDs

func (a *AmazonWebServicesAccount) SetEnvironmentIDs(environmentIds []string)

SetEnvironmentIDs sets the associated environment IDs of the account.

func (*AmazonWebServicesAccount) SetName

func (a *AmazonWebServicesAccount) SetName(name string)

SetName sets the name of the account.

func (*AmazonWebServicesAccount) SetSlug added in v2.5.0

func (a *AmazonWebServicesAccount) SetSlug(slug string)

SetSlug sets the slug of this account.

func (*AmazonWebServicesAccount) SetSpaceID

func (a *AmazonWebServicesAccount) SetSpaceID(spaceID string)

SetSpaceID sets the space ID of this account.

func (*AmazonWebServicesAccount) SetTenantIDs

func (a *AmazonWebServicesAccount) SetTenantIDs(tenantIds []string)

SetTenantIDs sets the tenant IDs associated with this account.

func (*AmazonWebServicesAccount) SetTenantTags

func (a *AmazonWebServicesAccount) SetTenantTags(tenantTags []string)

SetTenantTags sets the tenant tags associated with this account.

func (*AmazonWebServicesAccount) SetTenantedDeploymentMode

func (a *AmazonWebServicesAccount) SetTenantedDeploymentMode(mode core.TenantedDeploymentMode)

SetTenantedDeploymentMode sets the tenanted deployment mode of this account.

func (*AmazonWebServicesAccount) Validate

func (a *AmazonWebServicesAccount) Validate() error

Validate checks the state of this account and returns an error if invalid.

type AzureServicePrincipalAccount

type AzureServicePrincipalAccount struct {
	ApplicationID           *uuid.UUID           `json:"ClientId" validate:"required"`
	ApplicationPassword     *core.SensitiveValue `json:"Password" validate:"required"`
	AuthenticationEndpoint  string               `json:"ActiveDirectoryEndpointBaseUri,omitempty" validate:"required_with=AzureEnvironment,omitempty,uri"`
	AzureEnvironment        string               `json:"AzureEnvironment,omitempty" validate:"omitempty,oneof=AzureCloud AzureChinaCloud AzureGermanCloud AzureUSGovernment"`
	ResourceManagerEndpoint string               `json:"ResourceManagementEndpointBaseUri" validate:"required_with=AzureEnvironment,omitempty,uri"`
	SubscriptionID          *uuid.UUID           `json:"SubscriptionNumber" validate:"required"`
	TenantID                *uuid.UUID           `json:"TenantId" validate:"required"`
	// contains filtered or unexported fields
}

AzureServicePrincipalAccount represents an Azure service principal account.

func NewAzureServicePrincipalAccount

func NewAzureServicePrincipalAccount(name string, subscriptionID uuid.UUID, tenantID uuid.UUID, applicationID uuid.UUID, applicationPassword *core.SensitiveValue) (*AzureServicePrincipalAccount, error)

NewAzureServicePrincipalAccount creates and initializes an Azure service principal account.

func (*AzureServicePrincipalAccount) GetAccountType

func (a *AzureServicePrincipalAccount) GetAccountType() AccountType

GetAccountType returns the type of this account.

func (*AzureServicePrincipalAccount) GetDescription

func (a *AzureServicePrincipalAccount) GetDescription() string

GetDescription returns the description of the account.

func (*AzureServicePrincipalAccount) GetEnvironmentIDs

func (a *AzureServicePrincipalAccount) GetEnvironmentIDs() []string

GetEnvironmentIDs returns the environment IDs associated with this account.

func (*AzureServicePrincipalAccount) GetName

func (a *AzureServicePrincipalAccount) GetName() string

GetName returns the name of the account.

func (*AzureServicePrincipalAccount) GetSlug added in v2.5.0

func (a *AzureServicePrincipalAccount) GetSlug() string

GetSlug returns the slug to this account.

func (*AzureServicePrincipalAccount) GetSpaceID

func (a *AzureServicePrincipalAccount) GetSpaceID() string

GetSpaceID returns the space ID of this account.

func (*AzureServicePrincipalAccount) GetTenantIDs

func (a *AzureServicePrincipalAccount) GetTenantIDs() []string

GetTenantIDs returns the tenant IDs associated with this account.

func (*AzureServicePrincipalAccount) GetTenantTags

func (a *AzureServicePrincipalAccount) GetTenantTags() []string

GetTenantTags returns the tenant tags assigned to this account.

func (*AzureServicePrincipalAccount) GetTenantedDeploymentMode

func (a *AzureServicePrincipalAccount) GetTenantedDeploymentMode() core.TenantedDeploymentMode

GetTenantedDeploymentMode returns the tenanted deployment mode of this account.

func (*AzureServicePrincipalAccount) SetDescription

func (a *AzureServicePrincipalAccount) SetDescription(description string)

SetDescription sets the description of the account.

func (*AzureServicePrincipalAccount) SetEnvironmentIDs

func (a *AzureServicePrincipalAccount) SetEnvironmentIDs(environmentIds []string)

SetEnvironmentIDs sets the associated environment IDs of the account.

func (*AzureServicePrincipalAccount) SetName

func (a *AzureServicePrincipalAccount) SetName(name string)

SetName sets the name of the account.

func (*AzureServicePrincipalAccount) SetSlug added in v2.5.0

func (a *AzureServicePrincipalAccount) SetSlug(slug string)

SetSlug sets the slug of this account.

func (*AzureServicePrincipalAccount) SetSpaceID

func (a *AzureServicePrincipalAccount) SetSpaceID(spaceID string)

SetSpaceID sets the space ID of this account.

func (*AzureServicePrincipalAccount) SetTenantIDs

func (a *AzureServicePrincipalAccount) SetTenantIDs(tenantIds []string)

SetTenantIDs sets the tenant IDs associated with this account.

func (*AzureServicePrincipalAccount) SetTenantTags

func (a *AzureServicePrincipalAccount) SetTenantTags(tenantTags []string)

SetTenantTags sets the tenant tags associated with this account.

func (*AzureServicePrincipalAccount) SetTenantedDeploymentMode

func (a *AzureServicePrincipalAccount) SetTenantedDeploymentMode(mode core.TenantedDeploymentMode)

SetTenantedDeploymentMode sets the tenanted deployment mode of this account.

func (*AzureServicePrincipalAccount) Validate

func (a *AzureServicePrincipalAccount) Validate() error

Validate checks the state of this Azure service principal account and returns an error if invalid.

type AzureSubscriptionAccount

type AzureSubscriptionAccount struct {
	AzureEnvironment      string               `json:"AzureEnvironment,omitempty" validate:"omitempty,oneof=AzureCloud AzureChinaCloud AzureGermanCloud AzureUSGovernment"`
	CertificateBytes      *core.SensitiveValue `json:"CertificateBytes,omitempty"`
	CertificateThumbprint string               `json:"CertificateThumbprint,omitempty"`
	ManagementEndpoint    string               `json:"ServiceManagementEndpointBaseUri,omitempty" validate:"omitempty,uri"`
	StorageEndpointSuffix string               `json:"ServiceManagementEndpointSuffix,omitempty" validate:"omitempty,hostname"`
	SubscriptionID        *uuid.UUID           `json:"SubscriptionNumber" validate:"required"`
	// contains filtered or unexported fields
}

AzureSubscriptionAccount represents an Azure subscription account.

func NewAzureSubscriptionAccount

func NewAzureSubscriptionAccount(name string, subscriptionID uuid.UUID) (*AzureSubscriptionAccount, error)

NewAzureSubscriptionAccount creates and initializes an Azure subscription account with a name.

func (*AzureSubscriptionAccount) GetAccountType

func (a *AzureSubscriptionAccount) GetAccountType() AccountType

GetAccountType returns the type of this account.

func (*AzureSubscriptionAccount) GetDescription

func (a *AzureSubscriptionAccount) GetDescription() string

GetDescription returns the description of the account.

func (*AzureSubscriptionAccount) GetEnvironmentIDs

func (a *AzureSubscriptionAccount) GetEnvironmentIDs() []string

GetEnvironmentIDs returns the environment IDs associated with this account.

func (*AzureSubscriptionAccount) GetName

func (a *AzureSubscriptionAccount) GetName() string

GetName returns the name of the account.

func (*AzureSubscriptionAccount) GetSlug added in v2.5.0

func (a *AzureSubscriptionAccount) GetSlug() string

GetSlug returns the slug to this account.

func (*AzureSubscriptionAccount) GetSpaceID

func (a *AzureSubscriptionAccount) GetSpaceID() string

GetSpaceID returns the space ID of this account.

func (*AzureSubscriptionAccount) GetTenantIDs

func (a *AzureSubscriptionAccount) GetTenantIDs() []string

GetTenantIDs returns the tenant IDs associated with this account.

func (*AzureSubscriptionAccount) GetTenantTags

func (a *AzureSubscriptionAccount) GetTenantTags() []string

GetTenantTags returns the tenant tags assigned to this account.

func (*AzureSubscriptionAccount) GetTenantedDeploymentMode

func (a *AzureSubscriptionAccount) GetTenantedDeploymentMode() core.TenantedDeploymentMode

GetTenantedDeploymentMode returns the tenanted deployment mode of this account.

func (*AzureSubscriptionAccount) SetDescription

func (a *AzureSubscriptionAccount) SetDescription(description string)

SetDescription sets the description of the account.

func (*AzureSubscriptionAccount) SetEnvironmentIDs

func (a *AzureSubscriptionAccount) SetEnvironmentIDs(environmentIds []string)

SetEnvironmentIDs sets the associated environment IDs of the account.

func (*AzureSubscriptionAccount) SetName

func (a *AzureSubscriptionAccount) SetName(name string)

SetName sets the name of the account.

func (*AzureSubscriptionAccount) SetSlug added in v2.5.0

func (a *AzureSubscriptionAccount) SetSlug(slug string)

SetSlug sets the slug of this account.

func (*AzureSubscriptionAccount) SetSpaceID

func (a *AzureSubscriptionAccount) SetSpaceID(spaceID string)

SetSpaceID sets the space ID of this account.

func (*AzureSubscriptionAccount) SetTenantIDs

func (a *AzureSubscriptionAccount) SetTenantIDs(tenantIds []string)

SetTenantIDs sets the tenant IDs associated with this account.

func (*AzureSubscriptionAccount) SetTenantTags

func (a *AzureSubscriptionAccount) SetTenantTags(tenantTags []string)

SetTenantTags sets the tenant tags associated with this account.

func (*AzureSubscriptionAccount) SetTenantedDeploymentMode

func (a *AzureSubscriptionAccount) SetTenantedDeploymentMode(mode core.TenantedDeploymentMode)

SetTenantedDeploymentMode sets the tenanted deployment mode of this account.

func (*AzureSubscriptionAccount) Validate

func (a *AzureSubscriptionAccount) Validate() error

Validate checks the state of this account and returns an error if invalid.

type GoogleCloudPlatformAccount

type GoogleCloudPlatformAccount struct {
	JsonKey *core.SensitiveValue `validate:"required"`
	// contains filtered or unexported fields
}

GoogleCloudPlatformAccount represents a Google cloud account.

func NewGoogleCloudPlatformAccount

func NewGoogleCloudPlatformAccount(name string, jsonKey *core.SensitiveValue, options ...func(*GoogleCloudPlatformAccount)) (*GoogleCloudPlatformAccount, error)

NewGoogleCloudPlatformAccount initializes and returns a Google cloud account.

func (*GoogleCloudPlatformAccount) GetAccountType

func (a *GoogleCloudPlatformAccount) GetAccountType() AccountType

GetAccountType returns the type of this account.

func (*GoogleCloudPlatformAccount) GetDescription

func (a *GoogleCloudPlatformAccount) GetDescription() string

GetDescription returns the description of the account.

func (*GoogleCloudPlatformAccount) GetEnvironmentIDs

func (a *GoogleCloudPlatformAccount) GetEnvironmentIDs() []string

GetEnvironmentIDs returns the environment IDs associated with this account.

func (*GoogleCloudPlatformAccount) GetName

func (a *GoogleCloudPlatformAccount) GetName() string

GetName returns the name of the account.

func (*GoogleCloudPlatformAccount) GetSlug added in v2.5.0

func (a *GoogleCloudPlatformAccount) GetSlug() string

GetSlug returns the slug to this account.

func (*GoogleCloudPlatformAccount) GetSpaceID

func (a *GoogleCloudPlatformAccount) GetSpaceID() string

GetSpaceID returns the space ID of this account.

func (*GoogleCloudPlatformAccount) GetTenantIDs

func (a *GoogleCloudPlatformAccount) GetTenantIDs() []string

GetTenantIDs returns the tenant IDs associated with this account.

func (*GoogleCloudPlatformAccount) GetTenantTags

func (a *GoogleCloudPlatformAccount) GetTenantTags() []string

GetTenantTags returns the tenant tags assigned to this account.

func (*GoogleCloudPlatformAccount) GetTenantedDeploymentMode

func (a *GoogleCloudPlatformAccount) GetTenantedDeploymentMode() core.TenantedDeploymentMode

GetTenantedDeploymentMode returns the tenanted deployment mode of this account.

func (*GoogleCloudPlatformAccount) SetDescription

func (a *GoogleCloudPlatformAccount) SetDescription(description string)

SetDescription sets the description of the account.

func (*GoogleCloudPlatformAccount) SetEnvironmentIDs

func (a *GoogleCloudPlatformAccount) SetEnvironmentIDs(environmentIds []string)

SetEnvironmentIDs sets the associated environment IDs of the account.

func (*GoogleCloudPlatformAccount) SetName

func (a *GoogleCloudPlatformAccount) SetName(name string)

SetName sets the name of the account.

func (*GoogleCloudPlatformAccount) SetSlug added in v2.5.0

func (a *GoogleCloudPlatformAccount) SetSlug(slug string)

SetSlug sets the slug of this account.

func (*GoogleCloudPlatformAccount) SetSpaceID

func (a *GoogleCloudPlatformAccount) SetSpaceID(spaceID string)

SetSpaceID sets the space ID of this account.

func (*GoogleCloudPlatformAccount) SetTenantIDs

func (a *GoogleCloudPlatformAccount) SetTenantIDs(tenantIds []string)

SetTenantIDs sets the tenant IDs associated with this account.

func (*GoogleCloudPlatformAccount) SetTenantTags

func (a *GoogleCloudPlatformAccount) SetTenantTags(tenantTags []string)

SetTenantTags sets the tenant tags associated with this account.

func (*GoogleCloudPlatformAccount) SetTenantedDeploymentMode

func (a *GoogleCloudPlatformAccount) SetTenantedDeploymentMode(mode core.TenantedDeploymentMode)

SetTenantedDeploymentMode sets the tenanted deployment mode of this account.

func (*GoogleCloudPlatformAccount) Validate

func (a *GoogleCloudPlatformAccount) Validate() error

Validate checks the state of this account and returns an error if invalid.

type IAccount

type IAccount interface {
	GetAccountType() AccountType
	GetDescription() string
	GetEnvironmentIDs() []string
	GetTenantedDeploymentMode() core.TenantedDeploymentMode
	GetTenantIDs() []string
	GetTenantTags() []string
	GetSlug() string
	SetDescription(string)
	SetEnvironmentIDs([]string)
	SetTenantedDeploymentMode(core.TenantedDeploymentMode)
	SetTenantIDs([]string)
	SetTenantTags([]string)
	SetSlug(string)

	resources.IHasName
	resources.IHasSpace
	resources.IResource
}

IAccount defines the interface for accounts.

func ToAccount

func ToAccount(accountResource *AccountResource) (IAccount, error)

func ToAccountArray

func ToAccountArray(accountResources []*AccountResource) []IAccount

type ISSHKeyAccount

type ISSHKeyAccount interface {
	SetPrivateKeyPassphrase(*core.SensitiveValue)

	IAccount
}

ISSHKeyAccount defines the interface for SSH key accounts.

type IUsernamePasswordAccount

type IUsernamePasswordAccount interface {
	GetUsername() string
	SetPassword(*core.SensitiveValue)
	SetUsername(string)

	IAccount
}

IUsernamePasswordAccount defines the interface for username-password accounts.

type SSHKeyAccount

type SSHKeyAccount struct {
	PrivateKeyFile       *core.SensitiveValue `validate:"required"`
	PrivateKeyPassphrase *core.SensitiveValue
	Username             string `validate:"required"`
	// contains filtered or unexported fields
}

SSHKeyAccount represents a SSH key pair account.

func NewSSHKeyAccount

func NewSSHKeyAccount(name string, username string, privateKeyFile *core.SensitiveValue) (*SSHKeyAccount, error)

NewSSHKeyAccount initializes and returns a SSH key pair account with a name, username, and private key file.

func (*SSHKeyAccount) GetAccountType

func (a *SSHKeyAccount) GetAccountType() AccountType

GetAccountType returns the type of this account.

func (*SSHKeyAccount) GetDescription

func (a *SSHKeyAccount) GetDescription() string

GetDescription returns the description of the account.

func (*SSHKeyAccount) GetEnvironmentIDs

func (a *SSHKeyAccount) GetEnvironmentIDs() []string

GetEnvironmentIDs returns the environment IDs associated with this account.

func (*SSHKeyAccount) GetName

func (a *SSHKeyAccount) GetName() string

GetName returns the name of the account.

func (*SSHKeyAccount) GetSlug added in v2.5.0

func (a *SSHKeyAccount) GetSlug() string

GetSlug returns the slug to this account.

func (*SSHKeyAccount) GetSpaceID

func (a *SSHKeyAccount) GetSpaceID() string

GetSpaceID returns the space ID of this account.

func (*SSHKeyAccount) GetTenantIDs

func (a *SSHKeyAccount) GetTenantIDs() []string

GetTenantIDs returns the tenant IDs associated with this account.

func (*SSHKeyAccount) GetTenantTags

func (a *SSHKeyAccount) GetTenantTags() []string

GetTenantTags returns the tenant tags assigned to this account.

func (*SSHKeyAccount) GetTenantedDeploymentMode

func (a *SSHKeyAccount) GetTenantedDeploymentMode() core.TenantedDeploymentMode

GetTenantedDeploymentMode returns the tenanted deployment mode of this account.

func (*SSHKeyAccount) SetDescription

func (a *SSHKeyAccount) SetDescription(description string)

SetDescription sets the description of the account.

func (*SSHKeyAccount) SetEnvironmentIDs

func (a *SSHKeyAccount) SetEnvironmentIDs(environmentIds []string)

SetEnvironmentIDs sets the associated environment IDs of the account.

func (*SSHKeyAccount) SetName

func (a *SSHKeyAccount) SetName(name string)

SetName sets the name of the account.

func (*SSHKeyAccount) SetPrivateKeyPassphrase

func (s *SSHKeyAccount) SetPrivateKeyPassphrase(privateKeyPassphrase *core.SensitiveValue)

SetPrivateKeyPassphrase sets the private key [assphrase of this SSH key pair account.

func (*SSHKeyAccount) SetSlug added in v2.5.0

func (a *SSHKeyAccount) SetSlug(slug string)

SetSlug sets the slug of this account.

func (*SSHKeyAccount) SetSpaceID

func (a *SSHKeyAccount) SetSpaceID(spaceID string)

SetSpaceID sets the space ID of this account.

func (*SSHKeyAccount) SetTenantIDs

func (a *SSHKeyAccount) SetTenantIDs(tenantIds []string)

SetTenantIDs sets the tenant IDs associated with this account.

func (*SSHKeyAccount) SetTenantTags

func (a *SSHKeyAccount) SetTenantTags(tenantTags []string)

SetTenantTags sets the tenant tags associated with this account.

func (*SSHKeyAccount) SetTenantedDeploymentMode

func (a *SSHKeyAccount) SetTenantedDeploymentMode(mode core.TenantedDeploymentMode)

SetTenantedDeploymentMode sets the tenanted deployment mode of this account.

func (*SSHKeyAccount) Validate

func (s *SSHKeyAccount) Validate() error

Validate checks the state of this account and returns an error if invalid.

type TargetUsageEntry

type TargetUsageEntry struct {
	TargetID   string `json:"TargetId,omitempty"`
	TargetName string `json:"TargetName,omitempty"`
}

type TokenAccount

type TokenAccount struct {
	Token *core.SensitiveValue `json:"Token,omitempty" validate:"required"`
	// contains filtered or unexported fields
}

TokenAccount represents a token account.

func NewTokenAccount

func NewTokenAccount(name string, token *core.SensitiveValue) (*TokenAccount, error)

NewTokenAccount creates and initializes a token account with a name and token.

func (*TokenAccount) GetAccountType

func (a *TokenAccount) GetAccountType() AccountType

GetAccountType returns the type of this account.

func (*TokenAccount) GetDescription

func (a *TokenAccount) GetDescription() string

GetDescription returns the description of the account.

func (*TokenAccount) GetEnvironmentIDs

func (a *TokenAccount) GetEnvironmentIDs() []string

GetEnvironmentIDs returns the environment IDs associated with this account.

func (*TokenAccount) GetName

func (a *TokenAccount) GetName() string

GetName returns the name of the account.

func (*TokenAccount) GetSlug added in v2.5.0

func (a *TokenAccount) GetSlug() string

GetSlug returns the slug to this account.

func (*TokenAccount) GetSpaceID

func (a *TokenAccount) GetSpaceID() string

GetSpaceID returns the space ID of this account.

func (*TokenAccount) GetTenantIDs

func (a *TokenAccount) GetTenantIDs() []string

GetTenantIDs returns the tenant IDs associated with this account.

func (*TokenAccount) GetTenantTags

func (a *TokenAccount) GetTenantTags() []string

GetTenantTags returns the tenant tags assigned to this account.

func (*TokenAccount) GetTenantedDeploymentMode

func (a *TokenAccount) GetTenantedDeploymentMode() core.TenantedDeploymentMode

GetTenantedDeploymentMode returns the tenanted deployment mode of this account.

func (*TokenAccount) SetDescription

func (a *TokenAccount) SetDescription(description string)

SetDescription sets the description of the account.

func (*TokenAccount) SetEnvironmentIDs

func (a *TokenAccount) SetEnvironmentIDs(environmentIds []string)

SetEnvironmentIDs sets the associated environment IDs of the account.

func (*TokenAccount) SetName

func (a *TokenAccount) SetName(name string)

SetName sets the name of the account.

func (*TokenAccount) SetSlug added in v2.5.0

func (a *TokenAccount) SetSlug(slug string)

SetSlug sets the slug of this account.

func (*TokenAccount) SetSpaceID

func (a *TokenAccount) SetSpaceID(spaceID string)

SetSpaceID sets the space ID of this account.

func (*TokenAccount) SetTenantIDs

func (a *TokenAccount) SetTenantIDs(tenantIds []string)

SetTenantIDs sets the tenant IDs associated with this account.

func (*TokenAccount) SetTenantTags

func (a *TokenAccount) SetTenantTags(tenantTags []string)

SetTenantTags sets the tenant tags associated with this account.

func (*TokenAccount) SetTenantedDeploymentMode

func (a *TokenAccount) SetTenantedDeploymentMode(mode core.TenantedDeploymentMode)

SetTenantedDeploymentMode sets the tenanted deployment mode of this account.

func (*TokenAccount) Validate

func (t *TokenAccount) Validate() error

Validate checks the state of this account and returns an error if invalid.

type UsernamePasswordAccount

type UsernamePasswordAccount struct {
	Username string
	Password *core.SensitiveValue
	// contains filtered or unexported fields
}

UsernamePasswordAccount represents a username/password account.

func NewUsernamePasswordAccount

func NewUsernamePasswordAccount(name string, options ...func(*UsernamePasswordAccount)) (*UsernamePasswordAccount, error)

NewUsernamePasswordAccount creates and initializes a username/password account with a name.

func (*UsernamePasswordAccount) GetAccountType

func (a *UsernamePasswordAccount) GetAccountType() AccountType

GetAccountType returns the type of this account.

func (*UsernamePasswordAccount) GetDescription

func (a *UsernamePasswordAccount) GetDescription() string

GetDescription returns the description of the account.

func (*UsernamePasswordAccount) GetEnvironmentIDs

func (a *UsernamePasswordAccount) GetEnvironmentIDs() []string

GetEnvironmentIDs returns the environment IDs associated with this account.

func (*UsernamePasswordAccount) GetName

func (a *UsernamePasswordAccount) GetName() string

GetName returns the name of the account.

func (*UsernamePasswordAccount) GetSlug added in v2.5.0

func (a *UsernamePasswordAccount) GetSlug() string

GetSlug returns the slug to this account.

func (*UsernamePasswordAccount) GetSpaceID

func (a *UsernamePasswordAccount) GetSpaceID() string

GetSpaceID returns the space ID of this account.

func (*UsernamePasswordAccount) GetTenantIDs

func (a *UsernamePasswordAccount) GetTenantIDs() []string

GetTenantIDs returns the tenant IDs associated with this account.

func (*UsernamePasswordAccount) GetTenantTags

func (a *UsernamePasswordAccount) GetTenantTags() []string

GetTenantTags returns the tenant tags assigned to this account.

func (*UsernamePasswordAccount) GetTenantedDeploymentMode

func (a *UsernamePasswordAccount) GetTenantedDeploymentMode() core.TenantedDeploymentMode

GetTenantedDeploymentMode returns the tenanted deployment mode of this account.

func (*UsernamePasswordAccount) GetUsername

func (u *UsernamePasswordAccount) GetUsername() string

GetUsername returns the username of this username/password account.

func (*UsernamePasswordAccount) SetDescription

func (a *UsernamePasswordAccount) SetDescription(description string)

SetDescription sets the description of the account.

func (*UsernamePasswordAccount) SetEnvironmentIDs

func (a *UsernamePasswordAccount) SetEnvironmentIDs(environmentIds []string)

SetEnvironmentIDs sets the associated environment IDs of the account.

func (*UsernamePasswordAccount) SetName

func (a *UsernamePasswordAccount) SetName(name string)

SetName sets the name of the account.

func (*UsernamePasswordAccount) SetPassword

func (u *UsernamePasswordAccount) SetPassword(password *core.SensitiveValue)

SetPassword sets the password of this username/password account.

func (*UsernamePasswordAccount) SetSlug added in v2.5.0

func (a *UsernamePasswordAccount) SetSlug(slug string)

SetSlug sets the slug of this account.

func (*UsernamePasswordAccount) SetSpaceID

func (a *UsernamePasswordAccount) SetSpaceID(spaceID string)

SetSpaceID sets the space ID of this account.

func (*UsernamePasswordAccount) SetTenantIDs

func (a *UsernamePasswordAccount) SetTenantIDs(tenantIds []string)

SetTenantIDs sets the tenant IDs associated with this account.

func (*UsernamePasswordAccount) SetTenantTags

func (a *UsernamePasswordAccount) SetTenantTags(tenantTags []string)

SetTenantTags sets the tenant tags associated with this account.

func (*UsernamePasswordAccount) SetTenantedDeploymentMode

func (a *UsernamePasswordAccount) SetTenantedDeploymentMode(mode core.TenantedDeploymentMode)

SetTenantedDeploymentMode sets the tenanted deployment mode of this account.

func (*UsernamePasswordAccount) SetUsername

func (u *UsernamePasswordAccount) SetUsername(username string)

SetUsername sets the username of this username/password account.

func (*UsernamePasswordAccount) Validate

func (u *UsernamePasswordAccount) Validate() error

Validate checks the state of this account and returns an error if invalid.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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