attachments

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2025 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	// contains filtered or unexported fields
}

func NewAPI

func NewAPI(client HttpClient, taskWaiter TaskWaiter, logger Log) *API

func (*API) Create

func (a *API) Create(ctx context.Context, subscription int, tgwId int) (int, error)

func (*API) CreateActiveActive

func (a *API) CreateActiveActive(ctx context.Context, subscription int, regionId int, tgwId int) (int, error)

func (*API) Delete

func (a *API) Delete(ctx context.Context, subscription int, tgwId int) error

func (*API) DeleteActiveActive

func (a *API) DeleteActiveActive(ctx context.Context, subscription int, regionId int, tgwId int) error

func (*API) Get

func (a *API) Get(ctx context.Context, subscription int) (*GetAttachmentsTask, error)

func (*API) GetActiveActive

func (a *API) GetActiveActive(ctx context.Context, subscription int, regionId int) (*GetAttachmentsTask, error)

func (*API) Update

func (a *API) Update(ctx context.Context, subscription int, tgwId int, cidrs []*string) error

func (*API) UpdateActiveActive

func (a *API) UpdateActiveActive(ctx context.Context, subscription int, regionId int, tgwId int, cidrs []*string) error

type Cidr

type Cidr struct {
	CidrAddress *string `json:"cidrAddress,omitempty"`
	Status      *string `json:"status,omitempty"`
}

type GetAttachmentsTask

type GetAttachmentsTask struct {
	CommandType *string   `json:"commandType,omitempty"`
	Description *string   `json:"description,omitempty"`
	Status      *string   `json:"status,omitempty"`
	ID          *string   `json:"taskId,omitempty"`
	Response    *Response `json:"response,omitempty"`
}

type HttpClient

type HttpClient interface {
	Get(ctx context.Context, name, path string, responseBody interface{}) error
	Post(ctx context.Context, name, path string, requsetBody interface{}, responseBody interface{}) error
	Put(ctx context.Context, name, path string, requestBody interface{}, responseBody interface{}) error
	Delete(ctx context.Context, name, path string, responseBody interface{}) error
}

type Log

type Log interface {
	Printf(format string, args ...interface{})
}

type NotFound

type NotFound struct {
	// contains filtered or unexported fields
}

func (*NotFound) Error

func (f *NotFound) Error() string

type NotFoundActiveActive

type NotFoundActiveActive struct {
	// contains filtered or unexported fields
}

func (*NotFoundActiveActive) Error

func (f *NotFoundActiveActive) Error() string

type Resource

type Resource struct {
	TransitGatewayAttachment []*TransitGatewayAttachment `json:"tgws,omitempty"`
}

type Response

type Response struct {
	ResourceId *int      `json:"resourceId,omitempty"`
	Resource   *Resource `json:"resource,omitempty"`
}

type TaskWaiter

type TaskWaiter interface {
	WaitForResourceId(ctx context.Context, id string) (int, error)
	Wait(ctx context.Context, id string) error
}

type TransitGatewayAttachment

type TransitGatewayAttachment struct {
	Id               *int    `json:"id,omitempty"`
	AwsTgwUid        *string `json:"awsTgwUid,omitempty"`
	AttachmentUid    *string `json:"attachmentUid,omitempty"`
	Status           *string `json:"status,omitempty"`
	AttachmentStatus *string `json:"attachmentStatus,omitempty"`
	AwsAccountId     *string `json:"awsAccountId,omitempty"`
	Cidrs            []*Cidr `json:"cidrs,omitempty"`
}

Jump to

Keyboard shortcuts

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