Documentation ¶
Index ¶
- func GetJSONPatch(source interface{}, dest interface{}) ([]jsonpatch.JsonPatchOperation, error)
- func GetPatchOperations(source interface{}, dest interface{}) ([]*svcsdk.PatchOperation, error)
- type Client
- type GatewayClient
- func (c *GatewayClient) GetResource(ctx context.Context, in *svcsdk.GetResourceInput, opts ...request.Option) (*svcsdk.Resource, error)
- func (c *GatewayClient) GetRestAPIByID(ctx context.Context, id *string) (*svcsdk.RestApi, error)
- func (c *GatewayClient) GetRestAPIRootResource(ctx context.Context, id *string) (*string, error)
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 ¶
GetRestAPIByID retrieves the current values of sdk RestApi resource from AWS represented by id
func (*GatewayClient) GetRestAPIRootResource ¶
GetRestAPIRootResource retrieves the root resource for a RestApi from AWS represented by id