import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { RPCService } from '@loafer/ng-rpc';
import { MetaTargetHostType } from '@overflow/commons-typescript/model/meta';

@Injectable()
export class MetaTargetHostTypeService {

  public constructor(
    private rpcService: RPCService,
  ) {

  }

  public readByKey(key: string): Observable<MetaTargetHostType> {
    return this.rpcService.call<MetaTargetHostType>('MetaTargetHostTypeService.readByKey', key);
  }

  public readAll(): Observable<MetaTargetHostType[]> {
    return this.rpcService.call<MetaTargetHostType[]>('MetaTargetHostTypeService.readAll');
  }
}
