FakeFunctionService class base
Testing fake for FunctionService.
- Implemented types
Constructors
-
FakeFunctionService({Future<
Function$> getFunction(GetFunctionRequest request)?, Future<ListFunctionsResponse> listFunctions(ListFunctionsRequest request)?, Future<Operation< createFunction(CreateFunctionRequest request)?, Future<Function$, OperationMetadata> >Operation< updateFunction(UpdateFunctionRequest request)?, Future<Function$, OperationMetadata> >Operation< deleteFunction(DeleteFunctionRequest request)?, Future<Empty, OperationMetadata> >GenerateUploadUrlResponse> generateUploadUrl(GenerateUploadUrlRequest request)?, Future<GenerateDownloadUrlResponse> generateDownloadUrl(GenerateDownloadUrlRequest request)?, Future<ListRuntimesResponse> listRuntimes(ListRuntimesRequest request)?, Future<ListLocationsResponse> listLocations(ListLocationsRequest request)?, Future<Policy> setIamPolicy(SetIamPolicyRequest request)?, Future<Policy> getIamPolicy(GetIamPolicyRequest request)?, Future<TestIamPermissionsResponse> testIamPermissions(TestIamPermissionsRequest request)?, Future<ListOperationsResponse> listOperations(ListOperationsRequest request)?, Future<Operation< getOperation<T, S> >T extends ProtoMessage, S extends ProtoMessage>(Operation< })T, S> request)?
Properties
Methods
-
close(
) → void -
Closes the client and cleans up any resources associated with it.
override
-
createFunction(
CreateFunctionRequest request) → Future< Operation< Function$, OperationMetadata> > -
Creates a new function. If a function with the given name already exists in
the specified project, the long running operation will return
ALREADY_EXISTSerror.override -
deleteFunction(
DeleteFunctionRequest request) → Future< Operation< Empty, OperationMetadata> > -
Deletes a function with the given name from the specified project. If the
given function is used by some trigger, the trigger will be updated to
remove this function.
override
-
generateDownloadUrl(
GenerateDownloadUrlRequest request) → Future< GenerateDownloadUrlResponse> -
Returns a signed URL for downloading deployed function source code.
The URL is only valid for a limited period and should be used within
30 minutes of generation.
For more information about the signed URL usage see:
https://cloud.google.com/storage/docs/access-control/signed-urls
override
-
generateUploadUrl(
GenerateUploadUrlRequest request) → Future< GenerateUploadUrlResponse> -
Returns a signed URL for uploading a function source code.
For more information about the signed URL usage see:
https://cloud.google.com/storage/docs/access-control/signed-urls.
Once the function source code upload is complete, the used signed
URL should be provided in CreateFunction or UpdateFunction request
as a reference to the function source code.
override
-
getFunction(
GetFunctionRequest request) → Future< Function$> -
Returns a function with the given name from the requested project.
override
-
getIamPolicy(
GetIamPolicyRequest request) → Future< Policy> -
Gets the access control policy for a resource. Returns an empty policy
if the resource exists and does not have a policy set.
override
-
getOperation<
T extends ProtoMessage, S extends ProtoMessage> (Operation< T, S> request) → Future<Operation< T, S> > -
Provides the
Operationsservice functionality in this service.override -
listFunctions(
ListFunctionsRequest request) → Future< ListFunctionsResponse> -
Returns a list of functions that belong to the requested project.
override
-
listLocations(
ListLocationsRequest request) → Future< ListLocationsResponse> -
Lists information about the supported locations for this service.
override
-
listOperations(
ListOperationsRequest request) → Future< ListOperationsResponse> -
Provides the
Operationsservice functionality in this service.override -
listRuntimes(
ListRuntimesRequest request) → Future< ListRuntimesResponse> -
Returns a list of runtimes that are supported for the requested project.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setIamPolicy(
SetIamPolicyRequest request) → Future< Policy> -
Sets the access control policy on the specified resource. Replaces
any existing policy.
override
-
testIamPermissions(
TestIamPermissionsRequest request) → Future< TestIamPermissionsResponse> -
Returns permissions that a caller has on the specified resource. If the
resource does not exist, this will return an empty set of
permissions, not a
NOT_FOUNDerror.override -
toString(
) → String -
A string representation of this object.
inherited
-
updateFunction(
UpdateFunctionRequest request) → Future< Operation< Function$, OperationMetadata> > -
Updates existing function.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited