예제 #1
0
def policy_from_source_code(source_code):
    # type: (str) -> Dict[str, Any]
    from chalice.analyzer import get_client_calls_for_app
    client_calls = get_client_calls_for_app(source_code)
    builder = PolicyBuilder()
    policy = builder.build_policy_from_api_calls(client_calls)
    return policy
예제 #2
0
파일: policy.py 프로젝트: kenfusion/chalice
def policy_from_source_code(source_code):
    # type: (str) -> Dict[str, Any]
    from chalice.analyzer import get_client_calls_for_app
    client_calls = get_client_calls_for_app(source_code)
    builder = PolicyBuilder()
    policy = builder.build_policy_from_api_calls(client_calls)
    return policy
예제 #3
0
def chalice_aws_calls(source_code):
    real_source_code = dedent(source_code)
    calls = analyzer.get_client_calls_for_app(real_source_code)
    return calls
예제 #4
0
def chalice_aws_calls(source_code):
    real_source_code = dedent(source_code)
    calls = analyzer.get_client_calls_for_app(real_source_code)
    return calls