backend-plugin-api: convert all core service definitions to interfaces

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-01-03 14:50:39 +01:00
parent 16054afdec
commit 6a4419041b
12 changed files with 49 additions and 49 deletions
@@ -17,4 +17,4 @@
import { PluginCacheManager } from '@backstage/backend-common';
/** @public */
export type CacheService = PluginCacheManager;
export interface CacheService extends PluginCacheManager {}
@@ -19,4 +19,4 @@ import { Config } from '@backstage/config';
/**
* @public
*/
export type ConfigService = Config;
export interface ConfigService extends Config {}
@@ -17,4 +17,4 @@
import { PluginDatabaseManager } from '@backstage/backend-common';
/** @public */
export type DatabaseService = PluginDatabaseManager;
export interface DatabaseService extends PluginDatabaseManager {}
@@ -28,7 +28,7 @@
*
* @public
*/
export type DiscoveryService = {
export interface DiscoveryService {
/**
* Returns the internal HTTP base URL for a given plugin, without a trailing slash.
*
@@ -60,4 +60,4 @@ export type DiscoveryService = {
* like `https://backstage.example.com/api/catalog`
*/
getExternalBaseUrl(pluginId: string): Promise<string>;
};
}
@@ -14,10 +14,7 @@
* limitations under the License.
*/
import {
PermissionAuthorizer,
PermissionEvaluator,
} from '@backstage/plugin-permission-common';
import { PermissionEvaluator } from '@backstage/plugin-permission-common';
/** @public */
export type PermissionsService = PermissionEvaluator | PermissionAuthorizer;
export interface PermissionsService extends PermissionEvaluator {}
@@ -17,4 +17,4 @@
import { LifecycleService } from './LifecycleService';
/** @public */
export type RootLifecycleService = LifecycleService;
export interface RootLifecycleService extends LifecycleService {}
@@ -17,4 +17,4 @@
import { LoggerService } from './LoggerService';
/** @public */
export type RootLoggerService = LoggerService;
export interface RootLoggerService extends LoggerService {}
@@ -17,4 +17,4 @@
import { PluginTaskScheduler } from '@backstage/backend-tasks';
/** @public */
export type SchedulerService = PluginTaskScheduler;
export interface SchedulerService extends PluginTaskScheduler {}
@@ -17,4 +17,4 @@
import { TokenManager } from '@backstage/backend-common';
/** @public */
export type TokenManagerService = TokenManager;
export interface TokenManagerService extends TokenManager {}
@@ -21,7 +21,7 @@ import { Readable } from 'stream';
*
* @public
*/
export type UrlReaderService = {
export interface UrlReaderService {
/**
* Reads a single file and return its content.
*/
@@ -36,7 +36,7 @@ export type UrlReaderService = {
* Searches for a file in a tree using a glob pattern.
*/
search(url: string, options?: SearchOptions): Promise<SearchResponse>;
};
}
/**
* An options object for readUrl operations.