platformhubaccounts

package
v2.93.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccountTypePlatformHubAwsAccount = PlatformHubAccountType("AmazonWebServicesAccount")
)

Variables

This section is empty.

Functions

func Delete

func Delete(client newclient.Client, id string) error

Delete removes a Platform Hub account with the specified ID.

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

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.

Jump to

Keyboard shortcuts

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