service

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: MIT-0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetVpcIDAndRegion added in v1.1.1

func GetVpcIDAndRegion(vpcid string, region string) (vpcidRet string, regionRet string, err error)

Types

type Address added in v1.1.1

type Address struct {
	AllocationID     string
	AssociationID    string
	PrivateIpAddress string
}

type EC2Service

type EC2Service struct {
	VPCID       string
	Region      string
	ClusterName string
	EC2Client   *ec2.Client
}

func NewEC2Service

func NewEC2Service(vpcid string, region string, clusterName string) (service *EC2Service, err error)

func (*EC2Service) AllocateAddress

func (s *EC2Service) AllocateAddress() (allocationID string, publicIP string, err error)

func (*EC2Service) AssociateAddress

func (s *EC2Service) AssociateAddress(ip string, eni string, allocationID string) (err error)

func (*EC2Service) DescribeAddresses

func (s *EC2Service) DescribeAddresses(ip string, eni string) (associationID string, allocationID string, isAllocated bool, err error)

func (*EC2Service) DescribeNetworkInterfaces

func (s *EC2Service) DescribeNetworkInterfaces(ip string) (eni string, err error)

func (*EC2Service) DescribeUsedAddresses added in v1.1.1

func (s *EC2Service) DescribeUsedAddresses() (addresses []Address, err error)

func (*EC2Service) DisassociateAddress

func (s *EC2Service) DisassociateAddress(associationID string) (err error)

func (*EC2Service) ReleaseAddress

func (s *EC2Service) ReleaseAddress(allocationID string) (err error)

type ShiedService

type ShiedService struct {
	VPCID        string
	Region       string
	ShieldClient *shield.Client
}

func NewShieldService

func NewShieldService(vpcid string, region string) (service *ShiedService, err error)

func (*ShiedService) CreateProtection

func (s *ShiedService) CreateProtection(name string, resourceARN string) (err error)

func (*ShiedService) DeleteProtection

func (s *ShiedService) DeleteProtection(protectionID string) (err error)

func (*ShiedService) DescribeSubscription

func (s *ShiedService) DescribeSubscription() (account string, isSubscription bool)

func (*ShiedService) DiscribeProtection

func (s *ShiedService) DiscribeProtection(resourceARN string) (protectionID string, isProtected bool)

Jump to

Keyboard shortcuts

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