Documentation ¶
Index ¶
- Constants
- func GetClient(context *endly.Context) (*apigateway.APIGateway, error)
- func New() endly.Service
- func SetAPIInfo(restAPI *apigateway.RestApi, aMap data.Map)
- type CreateAuthorizerInput
- type GetRestAPIInput
- type GetRestAPIOutput
- 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 CreateAuthorizerInput ¶
type CreateAuthorizerInput struct { apigateway.CreateAuthorizerInput FunctionName string }
func (CreateAuthorizerInput) Diff ¶
func (i CreateAuthorizerInput) Diff(source *apigateway.Authorizer) []*apigateway.PatchOperation
Diff computes patches
func (*CreateAuthorizerInput) Init ¶
func (i *CreateAuthorizerInput) Init() error
type GetRestAPIInput ¶
GetRestAPIInput endpoint URL inpit
func (*GetRestAPIInput) Init ¶
func (i *GetRestAPIInput) Init() error
func (*GetRestAPIInput) Validate ¶
func (i *GetRestAPIInput) Validate() error
type GetRestAPIOutput ¶
type GetRestAPIOutput struct { *apigateway.RestApi EndpointURL string ` json:",inline"` }
GetRestAPIInput endpoint URL output
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 Authorizer 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.SessionID - $uuid.next
func (*ResourceMethod) Validate ¶
func (i *ResourceMethod) Validate() error
type RestMethodInfo ¶
type RestMethodInfo struct { HTTPMethod string URI *string Type *string AuthorizationType *string AuthorizerID *string }
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 `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 `json:",inline"` ResourceMethods map[string]*apigateway.Method }
SetupResourceOutput represents setup resource output
type SetupRestAPIInput ¶
type SetupRestAPIInput struct { apigateway.CreateRestApiInput ` json:",inline"` Resources []*SetupResourceInput apigateway.CreateDeploymentInput ` json:",inline"` Authorizers []*CreateAuthorizerInput GatewayResponse []*apigateway.PutGatewayResponseInput Redeploy bool }
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 Authorizers []*apigateway.Authorizer Stage *apigateway.Stage EndpointURL string Region string }
SetupRestAPIInput represent setup API response
func (*SetupRestAPIOutput) Messages ¶
func (o *SetupRestAPIOutput) Messages() []*msg.Message
Messages returns messages