SchemaRegistry interface
表示已註冊架構的存放區。
由 SchemaRegistryClient 實作,以使用 Azure 架構登錄服務來儲存架構。
方法
get |
依標識碼取得現有的架構。 |
get |
取得現有架構的識別碼,其中包含相符的名稱、群組、類型和定義。 |
register |
註冊新的架構,並傳回其標識碼。 如果指定名稱的架構不存在於指定的群組中,則會在版本 1 建立架構。 如果指定名稱的架構已存在於指定的群組中,則會在最新版本 + 1 建立架構。 |
方法詳細資料
getSchema(string, GetSchemaOptions)
依標識碼取得現有的架構。
function getSchema(schemaId: string, options?: GetSchemaOptions): Promise<Schema>
參數
- schemaId
-
string
唯一的架構標識碼。
- options
- GetSchemaOptions
傳回
Promise<Schema>
具有指定標識碼的架構。
getSchemaProperties(SchemaDescription, GetSchemaPropertiesOptions)
取得現有架構的識別碼,其中包含相符的名稱、群組、類型和定義。
function getSchemaProperties(schema: SchemaDescription, options?: GetSchemaPropertiesOptions): Promise<SchemaProperties>
參數
- schema
- SchemaDescription
要比對的架構。
- options
- GetSchemaPropertiesOptions
傳回
Promise<SchemaProperties>
相符的架構標識碼。
registerSchema(SchemaDescription, RegisterSchemaOptions)
註冊新的架構,並傳回其標識碼。
如果指定名稱的架構不存在於指定的群組中,則會在版本 1 建立架構。 如果指定名稱的架構已存在於指定的群組中,則會在最新版本 + 1 建立架構。
function registerSchema(schema: SchemaDescription, options?: RegisterSchemaOptions): Promise<SchemaProperties>
參數
- schema
- SchemaDescription
要註冊的架構。
- options
- RegisterSchemaOptions
傳回
Promise<SchemaProperties>
已註冊的架構標識碼。