Documentation
¶
Index ¶
- Constants
- func GetStatusCode(err error) int
- func IgnoreNotFoundError(err error) error
- func IsConflictError(err error) bool
- func IsNotFound(err error) bool
- func IsolatedNetworkToPartialUpdate(network iaas.CreateIsolatedNetworkPayload) iaas.PartialUpdateNetworkPayload
- type DNSClient
- type DNSZone
- type Error
- type Factory
- type IaaSClient
- type LoadBalancingClient
- type StatusCodeError
Constants ¶
View Source
const (
UserAgent = "gardener-extension-provider-stackit"
)
Variables ¶
This section is empty.
Functions ¶
func GetStatusCode ¶
GetStatusCode returns the attached error code if the given error implements StatusCodeError or 0 otherwise.
func IgnoreNotFoundError ¶
IgnoreNotFoundError ignore not found error
func IsConflictError ¶
func IsNotFound ¶
func IsolatedNetworkToPartialUpdate ¶
func IsolatedNetworkToPartialUpdate(network iaas.CreateIsolatedNetworkPayload) iaas.PartialUpdateNetworkPayload
Types ¶
type DNSClient ¶
type DNSClient interface {
ListZones(ctx context.Context) ([]DNSZone, error)
CreateOrUpdateRecordSet(ctx context.Context, zoneID, name, recordType string, records []string, ttl int64) error
DeleteRecordSet(ctx context.Context, zoneID, name, recordType string) error
}
func NewDNSClient ¶
func NewDNSClient(ctx context.Context, endpoints stackitv1alpha1.APIEndpoints, credentials *stackit.Credentials) (DNSClient, error)
type Error ¶
Error is an error returned by SDK helper functions in this package.
func NewNotFoundError ¶
func (*Error) GetStatusCode ¶
type Factory ¶
type Factory interface {
// DNS returns a STACKIT DNS service client.
DNS(context.Context, client.Client, corev1.SecretReference) (DNSClient, error)
// LoadBalancing returns a STACKIT load balancing service client.
LoadBalancing(context.Context, client.Client, corev1.SecretReference) (LoadBalancingClient, error)
// IaaS returns a STACKIT IaaS service client.
IaaS(context.Context, client.Client, corev1.SecretReference) (IaaSClient, error)
}
Factory produces clients for various STACKIT services.
type IaaSClient ¶
type IaaSClient interface {
ProjectID() string
// Network
CreateIsolatedNetwork(ctx context.Context, payload iaas.CreateIsolatedNetworkPayload) (*iaas.Network, error)
GetNetworkById(ctx context.Context, id string) (*iaas.Network, error)
GetNetworkByName(ctx context.Context, name string) ([]iaas.Network, error)
UpdateNetwork(ctx context.Context, networkId string, payload iaas.PartialUpdateNetworkPayload) (*iaas.Network, error)
DeleteNetwork(ctx context.Context, networkID string) error
CreateSecurityGroup(ctx context.Context, payload iaas.CreateSecurityGroupPayload) (*iaas.SecurityGroup, error)
DeleteSecurityGroup(ctx context.Context, securityGroupId string) error
GetSecurityGroupByName(ctx context.Context, name string) ([]iaas.SecurityGroup, error)
GetSecurityGroupById(ctx context.Context, securityGroupId string) (*iaas.SecurityGroup, error)
CreateSecurityGroupRule(ctx context.Context, securityGroupId string, wantedRule iaas.SecurityGroupRule) (*iaas.SecurityGroupRule, error)
ReconcileSecurityGroupRules(ctx context.Context, log logr.Logger, securityGroup *iaas.SecurityGroup, wantedRules []iaas.SecurityGroupRule) error
UpdateSecurityGroupRules(ctx context.Context, group *iaas.SecurityGroup, desiredRules []iaas.SecurityGroupRule, allowDelete func(rule *iaas.SecurityGroupRule) bool) (modified bool, err error)
CreateServer(ctx context.Context, payload iaas.CreateServerPayload) (*iaas.Server, error)
DeleteServer(ctx context.Context, serverId string) error
GetServerByName(ctx context.Context, name string) ([]iaas.Server, error)
CreatePublicIp(ctx context.Context, payload iaas.CreatePublicIPPayload) (*iaas.PublicIp, error)
DeletePublicIp(ctx context.Context, publicIpId string) error
GetPublicIpByLabels(ctx context.Context, selector stackit.LabelSelector) ([]iaas.PublicIp, error)
AddPublicIpToServer(ctx context.Context, serverId, publicIpId string) error
GetKeypair(ctx context.Context, name string) (*iaas.Keypair, error)
CreateKeypair(ctx context.Context, name, publicKey string) (*iaas.Keypair, error)
DeleteKeypair(ctx context.Context, name string) error
}
func NewIaaSClient ¶
func NewIaaSClient(region string, endpoints stackitv1alpha1.APIEndpoints, credentials *stackit.Credentials) (IaaSClient, error)
type LoadBalancingClient ¶
type LoadBalancingClient interface {
ListLoadBalancers(ctx context.Context) ([]loadbalancer.LoadBalancer, error)
DeleteLoadBalancer(ctx context.Context, lbName string) error
GetLoadBalancer(ctx context.Context, id string) (*loadbalancer.LoadBalancer, error)
}
func NewLoadBalancingClient ¶
func NewLoadBalancingClient(ctx context.Context, region string, endpoints stackitv1alpha1.APIEndpoints, credentials *stackit.Credentials) (LoadBalancingClient, error)
type StatusCodeError ¶
StatusCodeError is a common interface implemented by Error and the SDK's GenericOpenAPIError.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package client is a generated GoMock package.
|
Package client is a generated GoMock package. |
|
dns
Package dns is a generated GoMock package.
|
Package dns is a generated GoMock package. |
|
iaas
Package iaas is a generated GoMock package.
|
Package iaas is a generated GoMock package. |
|
loadbalancer
Package loadbalancer is a generated GoMock package.
|
Package loadbalancer is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.