Documentation
¶
Index ¶
- Constants
- func Delete(client newclient.Client, id string) error
- type IPlatformHubAccount
- type PlatformHubAccountResource
- func (r *PlatformHubAccountResource) GetAccountType() PlatformHubAccountType
- func (r *PlatformHubAccountResource) GetDescription() string
- func (r *PlatformHubAccountResource) GetName() string
- func (r *PlatformHubAccountResource) SetDescription(description string)
- func (r *PlatformHubAccountResource) SetName(name string)
- func (r *PlatformHubAccountResource) ToPlatformHubAccount() (IPlatformHubAccount, error)
- type PlatformHubAccountType
- type PlatformHubAwsAccount
- func (a *PlatformHubAwsAccount) GetAccountType() PlatformHubAccountType
- func (a *PlatformHubAwsAccount) GetDescription() string
- func (a *PlatformHubAwsAccount) GetName() string
- func (a *PlatformHubAwsAccount) SetDescription(description string)
- func (a *PlatformHubAwsAccount) SetName(name string)
- func (a *PlatformHubAwsAccount) Validate() error
Constants ¶
const (
AccountTypePlatformHubAwsAccount = PlatformHubAccountType("AmazonWebServicesAccount")
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IPlatformHubAccount ¶
type IPlatformHubAccount interface {
GetAccountType() PlatformHubAccountType
GetDescription() string
SetDescription(string)
resources.IHasName
resources.IResource
}
IPlatformHubAccount defines the interface for Platform Hub accounts.
func Add ¶
func Add(client newclient.Client, platformHubAccount IPlatformHubAccount) (IPlatformHubAccount, error)
Add creates a new Platform Hub account.
func GetByID ¶
func GetByID(client newclient.Client, id string) (IPlatformHubAccount, error)
GetByID returns the Platform Hub account that matches the input ID.
func Update ¶
func Update(client newclient.Client, platformHubAccount IPlatformHubAccount) (IPlatformHubAccount, error)
Update modifies a Platform Hub account.
type PlatformHubAccountResource ¶
type PlatformHubAccountResource struct {
AccountType PlatformHubAccountType `json:"AccountType" validate:"required,oneof=AmazonWebServicesAccount"`
Description string `json:"Description,omitempty"`
Name string `json:"Name" validate:"required,notall"`
AccessKey string `json:"AccessKey,omitempty"`
SecretKey *core.SensitiveValue `json:"SecretKey,omitempty"`
resources.Resource
}
PlatformHubAccountResource represents details for all Platform Hub accounts.
func NewPlatformHubAccountResource ¶
func NewPlatformHubAccountResource(name string, accountType PlatformHubAccountType) *PlatformHubAccountResource
NewPlatformHubAccountResource creates and initializes a Platform Hub account resource.
func ToPlatformHubAccountResource ¶
func ToPlatformHubAccountResource(account IPlatformHubAccount) (*PlatformHubAccountResource, error)
ToPlatformHubAccountResource converts a concrete account type to PlatformHubAccountResource.
func (*PlatformHubAccountResource) GetAccountType ¶
func (r *PlatformHubAccountResource) GetAccountType() PlatformHubAccountType
GetAccountType returns the type of this account resource.
func (*PlatformHubAccountResource) GetDescription ¶
func (r *PlatformHubAccountResource) GetDescription() string
GetDescription returns the description of this account resource.
func (*PlatformHubAccountResource) GetName ¶
func (r *PlatformHubAccountResource) GetName() string
GetName returns the name of this account resource.
func (*PlatformHubAccountResource) SetDescription ¶
func (r *PlatformHubAccountResource) SetDescription(description string)
SetDescription sets the description of the account resource.
func (*PlatformHubAccountResource) SetName ¶
func (r *PlatformHubAccountResource) SetName(name string)
SetName sets the name of this account resource.
func (*PlatformHubAccountResource) ToPlatformHubAccount ¶
func (r *PlatformHubAccountResource) ToPlatformHubAccount() (IPlatformHubAccount, error)
ToPlatformHubAccount converts a PlatformHubAccountResource to the appropriate concrete account type.
type PlatformHubAccountType ¶
type PlatformHubAccountType string
type PlatformHubAwsAccount ¶
type PlatformHubAwsAccount struct {
AccessKey string `json:"AccessKey" validate:"required"`
SecretKey *core.SensitiveValue `json:"SecretKey" validate:"required"`
// contains filtered or unexported fields
}
PlatformHubAwsAccount represents a Platform Hub AWS account.
func NewPlatformHubAwsAccount ¶
func NewPlatformHubAwsAccount(name string, accessKey string, secretKey *core.SensitiveValue) (*PlatformHubAwsAccount, error)
NewPlatformHubAwsAccount initializes and returns a Platform Hub AWS account with a name, access key, and secret key.
func (*PlatformHubAwsAccount) GetAccountType ¶
func (a *PlatformHubAwsAccount) GetAccountType() PlatformHubAccountType
GetAccountType returns the type of this account.
func (*PlatformHubAwsAccount) GetDescription ¶
func (a *PlatformHubAwsAccount) GetDescription() string
GetDescription returns the description of the account.
func (*PlatformHubAwsAccount) GetName ¶
func (a *PlatformHubAwsAccount) GetName() string
GetName returns the name of the account.
func (*PlatformHubAwsAccount) SetDescription ¶
func (a *PlatformHubAwsAccount) SetDescription(description string)
SetDescription sets the description of the account.
func (*PlatformHubAwsAccount) SetName ¶
func (a *PlatformHubAwsAccount) SetName(name string)
SetName sets the name of the account.
func (*PlatformHubAwsAccount) Validate ¶
func (a *PlatformHubAwsAccount) Validate() error
Validate checks the state of this account and returns an error if invalid.