Documentation ¶
Index ¶
- Constants
- func GetClient(context *endly.Context) (*apigateway.APIGateway, error)
- func New() endly.Service
- func SetAPIInfo(restAPI *apigateway.RestApi, aMap data.Map)
- type PutIntegrationInput
- type RemoveRestAPIInput
- type ResetAPIEvent
- type ResourceMethod
- type RestMethodInfo
- type RestResourceInfo
- type SetupDeploymentInput
- type SetupMethodInput
- type SetupResourceInput
- type SetupResourceOutput
- type SetupRestAPIInput
- type SetupRestAPIOutput
Constants ¶
const (
//ServiceID aws api gateway service id.
ServiceID = "aws/apigateway"
)
Variables ¶
This section is empty.
Functions ¶
func GetClient ¶
func GetClient(context *endly.Context) (*apigateway.APIGateway, error)
GetClient returns apigateway client from context
func SetAPIInfo ¶
func SetAPIInfo(restAPI *apigateway.RestApi, aMap data.Map)
Types ¶
type PutIntegrationInput ¶
type PutIntegrationInput apigateway.PutIntegrationInput
func (PutIntegrationInput) Diff ¶
func (i PutIntegrationInput) Diff(source *apigateway.Integration) []*apigateway.PatchOperation
Diff computes patches
type RemoveRestAPIInput ¶
type RemoveRestAPIInput struct {
Name *string
}
RemoveRestAPI removes API for supplied name
func (*RemoveRestAPIInput) Validate ¶
func (i *RemoveRestAPIInput) Validate() error
type ResetAPIEvent ¶
type ResetAPIEvent struct { Name string ID string Endpoint string Resources []*RestResourceInfo }
ResetAPIEvent represents rest API event
func NewResetAPIEvent ¶
func NewResetAPIEvent(output *SetupRestAPIOutput) *ResetAPIEvent
func (*ResetAPIEvent) Messages ¶
func (e *ResetAPIEvent) Messages() []*msg.Message
type ResourceMethod ¶
type ResourceMethod struct { FunctionName string HttpMethod string *apigateway.PutMethodInput *apigateway.PutIntegrationInput *lambda.AddPermissionInput }
ResourceMethod represents resource method
func (*ResourceMethod) Init ¶
func (i *ResourceMethod) Init() error
Initialise resource with the following defaults
<ul>
<li>AuthorizationType: NONE</li> <li>HttpMethod: ANY</li> <li>ApiKeyRequired: false</li> <li>IntegrationHttpMethod: POST</li> <li>Type: AWS_PROXY</li> <li>Uri: arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/${function.arn}/invocations</li>
</ul>
It supports data substitution on uri attribute i.e. - $function.arn - $function.region - $function.accountID - $restAPI.ID - $uuid.next
func (*ResourceMethod) Validate ¶
func (i *ResourceMethod) Validate() error
type RestMethodInfo ¶
Represents reset method event part
type RestResourceInfo ¶
type RestResourceInfo struct { Path string ID string Methods []*RestMethodInfo TestCLI string }
Represents reset resource event part
type SetupDeploymentInput ¶
type SetupDeploymentInput apigateway.CreateDeploymentInput
func (*SetupDeploymentInput) Diff ¶
func (i *SetupDeploymentInput) Diff(source *apigateway.CreateDeploymentInput) []*apigateway.PatchOperation
type SetupMethodInput ¶
type SetupMethodInput apigateway.PutMethodInput
SetupMethodInput setups method input
func (SetupMethodInput) Diff ¶
func (i SetupMethodInput) Diff(source *apigateway.Method) []*apigateway.PatchOperation
Diff computes patches
type SetupResourceInput ¶
type SetupResourceInput struct { Path string apigateway.CreateResourceInput `yaml:",inline" json:",inline"` Methods []*ResourceMethod }
SetupResourceInput represents resource input
func (*SetupResourceInput) ParentPath ¶
func (i *SetupResourceInput) ParentPath() string
ParentPath returns parent path
func (*SetupResourceInput) Validate ¶
func (i *SetupResourceInput) Validate() error
type SetupResourceOutput ¶
type SetupResourceOutput struct { *apigateway.Resource `yaml:",inline" json:",inline"` ResourceMethods map[string]*apigateway.Method }
SetupResourceOutput represents setup resource output
type SetupRestAPIInput ¶
type SetupRestAPIInput struct { apigateway.CreateRestApiInput `yaml:",inline" json:",inline"` Resources []*SetupResourceInput apigateway.CreateDeploymentInput `yaml:",inline" json:",inline"` }
SetupRestAPIInput represent a request to setup API with specified resources
func (*SetupRestAPIInput) Init ¶
func (i *SetupRestAPIInput) Init() error
func (*SetupRestAPIInput) Validate ¶
func (i *SetupRestAPIInput) Validate() error
Validate checks is input is valud
type SetupRestAPIOutput ¶
type SetupRestAPIOutput struct { *apigateway.RestApi Resources []*SetupResourceOutput Stage *apigateway.Stage EndpointURL string Region string }
SetupRestAPIInput represent setup API response
func (*SetupRestAPIOutput) Messages ¶
func (o *SetupRestAPIOutput) Messages() []*msg.Message
Messages returns messages