apigateway

package
v0.27.1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetJSONPatch

func GetJSONPatch(source interface{}, dest interface{}) ([]jsonpatch.JsonPatchOperation, error)

GetJSONPatch returns a jsonpatch of diff between source and dest

func GetPatchOperations

func GetPatchOperations(source interface{}, dest interface{}) ([]*svcsdk.PatchOperation, error)

GetPatchOperations returns a jsonpatch of diff between source and dest adapted to the type expected by the Update*Input shapes of this service

Types

type Client

type Client interface {
	GetRestAPIRootResource(context.Context, *string) (*string, error)
	GetRestAPIByID(context.Context, *string) (*svcsdk.RestApi, error)
	GetResource(context.Context, *svcsdk.GetResourceInput, ...request.Option) (*svcsdk.Resource, error)
}

Client represents a custom client to retrieve information from AWS related to apigateway svc

type GatewayClient

type GatewayClient struct {
	Client svcksdkapi.APIGatewayAPI
}

GatewayClient is the actual implementation of a Client to retrieve information from AWS. This is required because Update*Input shapes in this service expect a jsonpatch as its body. instead of the actual fields of the resource to be passed

func (*GatewayClient) GetResource

func (c *GatewayClient) GetResource(ctx context.Context, in *svcsdk.GetResourceInput, opts ...request.Option) (*svcsdk.Resource, error)

GetResource retrieves the current values for a Resource from AWS using a GetResourceInput. This is just a wrapper to simplify mocking

func (*GatewayClient) GetRestAPIByID

func (c *GatewayClient) GetRestAPIByID(ctx context.Context, id *string) (*svcsdk.RestApi, error)

GetRestAPIByID retrieves the current values of sdk RestApi resource from AWS represented by id

func (*GatewayClient) GetRestAPIRootResource

func (c *GatewayClient) GetRestAPIRootResource(ctx context.Context, id *string) (*string, error)

GetRestAPIRootResource retrieves the root resource for a RestApi from AWS represented by id

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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