Search in sources :

Example 1 with SchemaStorage

use of com.spotify.protoman.registry.storage.SchemaStorage in project protoman by spotify.

the class Main method createSchemaRegistry.

private static SchemaRegistry createSchemaRegistry() {
    final Storage gcsStorage = StorageOptions.getDefaultInstance().getService();
    final SchemaStorage schemaStorage = GcsSchemaStorage.create(gcsStorage, BUCKET_NAME);
    return SchemaRegistry.create(schemaStorage, DefaultSchemaValidator.withDefaultRules(), SemverSchemaVersioner.create(), ProtocDescriptorBuilder.factoryBuilder().build());
}
Also used : SchemaStorage(com.spotify.protoman.registry.storage.SchemaStorage) GcsSchemaStorage(com.spotify.protoman.registry.storage.GcsSchemaStorage) Storage(com.google.cloud.storage.Storage) SchemaStorage(com.spotify.protoman.registry.storage.SchemaStorage) GcsSchemaStorage(com.spotify.protoman.registry.storage.GcsSchemaStorage)

Aggregations

Storage (com.google.cloud.storage.Storage)1 GcsSchemaStorage (com.spotify.protoman.registry.storage.GcsSchemaStorage)1 SchemaStorage (com.spotify.protoman.registry.storage.SchemaStorage)1