Documentation
¶
Index ¶
- type FunctionChecker
- type Service
- func (s *Service) AddLayerVersionPermission(w http.ResponseWriter, r *http.Request, layerName string, versionNumber int)
- func (s *Service) AddPermission(w http.ResponseWriter, r *http.Request, functionName string)
- func (s *Service) GetLayerVersionPolicy(w http.ResponseWriter, r *http.Request, layerName string, versionNumber int)
- func (s *Service) GetPolicy(w http.ResponseWriter, r *http.Request, functionName string)
- func (s *Service) RemoveLayerVersionPermission(w http.ResponseWriter, r *http.Request, layerName string, versionNumber int, ...)
- func (s *Service) RemovePermission(w http.ResponseWriter, r *http.Request, functionName, statementId string)
- type Statement
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FunctionChecker ¶
FunctionChecker allows the permissions service to verify that a function exists without importing the function_crud package directly.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service manages in-memory resource-based policies for Lambda functions and layers.
func New ¶
func New(region, account string, checker FunctionChecker) *Service
func (*Service) AddLayerVersionPermission ¶
func (s *Service) AddLayerVersionPermission(w http.ResponseWriter, r *http.Request, layerName string, versionNumber int)
POST /2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy
func (*Service) AddPermission ¶
POST /2015-03-31/functions/{FunctionName}/policy
func (*Service) GetLayerVersionPolicy ¶
func (s *Service) GetLayerVersionPolicy(w http.ResponseWriter, r *http.Request, layerName string, versionNumber int)
GET /2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy
func (*Service) RemoveLayerVersionPermission ¶
func (s *Service) RemoveLayerVersionPermission(w http.ResponseWriter, r *http.Request, layerName string, versionNumber int, statementId string)
DELETE /2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy/{StatementId}
func (*Service) RemovePermission ¶
func (s *Service) RemovePermission(w http.ResponseWriter, r *http.Request, functionName, statementId string)
DELETE /2015-03-31/functions/{FunctionName}/policy/{StatementId}
type Statement ¶
type Statement struct {
Sid string `json:"Sid"`
Effect string `json:"Effect"`
Principal any `json:"Principal"` // string or {"Service": "..."} etc.
Action string `json:"Action"`
Resource string `json:"Resource,omitempty"`
Condition map[string]map[string]string `json:"Condition,omitempty"`
}
Statement represents a single entry in a Lambda resource-based policy.
Click to show internal directories.
Click to hide internal directories.