Showing 1 of 2 files from the diff.
Other files ignored by Codecov
test/backup.ts has changed.

@@ -13,13 +13,14 @@
Loading
13 13
 * limitations under the License.
14 14
 */
15 15
16 -
import {promisifyAll} from '@google-cloud/promisify';
16 +
import {promisifyAll, callbackifyAll} from '@google-cloud/promisify';
17 17
import {Instance} from './instance';
18 18
import {
19 19
  IOperation,
20 20
  LongRunningCallback,
21 21
  RequestCallback,
22 22
  ResourceCallback,
23 +
  NormalCallback,
23 24
} from './common';
24 25
import {EnumKey, Spanner, RequestConfig, TranslateEnumKeys} from '.';
25 26
import {
@@ -77,6 +78,11 @@
Loading
77 78
  ): void;
78 79
  <T>(config: RequestConfig, callback: RequestCallback<T>): void;
79 80
}
81 +
export type GetStateCallback = NormalCallback<
82 +
  EnumKey<typeof databaseAdmin.spanner.admin.database.v1.Backup.State>
83 +
>;
84 +
export type GetExpireTimeCallback = NormalCallback<PreciseDate>;
85 +
export type ExistsCallback = NormalCallback<boolean>;
80 86
/**
81 87
 * The {@link Backup} class represents a Cloud Spanner backup.
82 88
 *
@@ -185,7 +191,6 @@
Loading
185 191
    );
186 192
  }
187 193
188 -
  getMetadata(): Promise<GetMetadataResponse>;
189 194
  getMetadata(gaxOptions?: CallOptions): Promise<GetMetadataResponse>;
190 195
  getMetadata(callback: GetMetadataCallback): void;
191 196
  getMetadata(gaxOptions: CallOptions, callback: GetMetadataCallback): void;
@@ -248,6 +253,12 @@
Loading
248 253
    );
249 254
  }
250 255
256 +
  getState(): Promise<
257 +
    | EnumKey<typeof databaseAdmin.spanner.admin.database.v1.Backup.State>
258 +
    | undefined
259 +
    | null
260 +
  >;
261 +
  getState(callback: GetStateCallback): void;
251 262
  /**
252 263
   * Retrieves the state of the backup.
253 264
   *
@@ -256,6 +267,7 @@
Loading
256 267
   * @see {@link #getMetadata}
257 268
   *
258 269
   * @method Backup#getState
270 +
   * @param {GetStateCallback} [callback] Callback function.
259 271
   * @returns {Promise<EnumKey<typeof, databaseAdmin.spanner.admin.database.v1.Backup.State> | undefined>}
260 272
   *     When resolved, contains the current state of the backup if it exists.
261 273
   *
@@ -276,6 +288,8 @@
Loading
276 288
    return backupInfo.state;
277 289
  }
278 290
291 +
  getExpireTime(): Promise<PreciseDate | undefined>;
292 +
  getExpireTime(callback: GetExpireTimeCallback): void;
279 293
  /**
280 294
   * Retrieves the expiry time of the backup.
281 295
   *
@@ -299,6 +313,8 @@
Loading
299 313
    return new PreciseDate(backupInfo.expireTime as DateStruct);
300 314
  }
301 315
316 +
  exists(): Promise<boolean>;
317 +
  exists(callback: ExistsCallback): void;
302 318
  /**
303 319
   * Checks whether the backup exists.
304 320
   *
@@ -492,6 +508,15 @@
Loading
492 508
  exclude: ['getState', 'getExpireTime', 'exists'],
493 509
});
494 510
511 +
/*! Developer Documentation
512 +
 *
513 +
 * All async methods (except for streams) will return a Promise in the event
514 +
 * that a callback is omitted.
515 +
 */
516 +
callbackifyAll(Backup, {
517 +
  exclude: ['create', 'getMetadata', 'updateExpireTime', 'delete'],
518 +
});
519 +
495 520
/**
496 521
 * Reference to the {@link Backup} class.
497 522
 * @name module:@google-cloud/spanner.Backup
Files Coverage
bin 0.00%
src 99.35%
Project Totals (21 files) 98.27%
actions 10
Build #125339493 -
actions 12
Build #125339493 -
actions windows
Build #125339493 -
actions 13
Build #125339493 -

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading