Skip to content

Commit

Permalink
Merge pull request #118 from quarkiverse/task/update-quarkus-3.14
Browse files Browse the repository at this point in the history
Update to Quarkus 3.14
  • Loading branch information
kdubb authored Aug 20, 2024
2 parents d3d3f49 + 0a10995 commit 4a86104
Show file tree
Hide file tree
Showing 11 changed files with 227 additions and 250 deletions.
37 changes: 0 additions & 37 deletions cli/src/main/java/io/quarkiverse/authzed/AuthzedClientCreator.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
package io.quarkiverse.authzed.client.deployment;

import io.quarkus.runtime.annotations.ConfigItem;
import io.quarkiverse.authzed.runtime.config.AuthzedConfig;
import io.quarkus.runtime.annotations.ConfigPhase;
import io.quarkus.runtime.annotations.ConfigRoot;
import io.smallrye.config.ConfigMapping;

@ConfigRoot(name = "authzed", phase = ConfigPhase.BUILD_TIME)
public class AuthzedBuildTimeConfig {
@ConfigRoot(phase = ConfigPhase.BUILD_TIME)
@ConfigMapping(prefix = AuthzedConfig.PREFIX)
public interface AuthzedBuildTimeConfig {

/**
* Dev services configuration.
*/
@ConfigItem
public DevServicesAuthzedConfig devservices;
DevServicesAuthzedConfig devservices();

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,38 @@
import java.util.OptionalInt;

import io.quarkus.runtime.annotations.ConfigGroup;
import io.quarkus.runtime.annotations.ConfigItem;
import io.smallrye.config.WithDefault;

@ConfigGroup
public class DashboardConfig {
public interface DashboardConfig {

/**
* Flag to enable dashboard (defaults to true)
*/
@ConfigItem(defaultValue = "true")
public Boolean enabled;
@WithDefault("true")
Boolean enabled();

/**
* The container port the dashboard will be bound to.
*/
@ConfigItem(defaultValue = "8443")
public Integer port;
@WithDefault("8443")
Integer port();

/**
* Optional host port the dashboard will be bound to.
* <p>
* If not defined, the port will be chosen randomly.
*/
@ConfigItem
public OptionalInt hostPort;
OptionalInt hostPort();

/**
* The path to the TLS certificate.
*/
@ConfigItem
public Optional<String> tlsCertPath;
Optional<String> tlsCertPath();

/**
* The path to the TLS key.
*/
@ConfigItem
public Optional<String> tlsKeyPath;
Optional<String> tlsKeyPath();

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@

import java.util.Optional;

import io.quarkus.runtime.annotations.ConfigGroup;
import io.quarkus.runtime.annotations.ConfigItem;
import io.smallrye.config.WithDefault;

@ConfigGroup
public class DevServicesAuthzedConfig {
public interface DevServicesAuthzedConfig {

static final String DEFAULT_IMAGE = "authzed/spicedb";
String DEFAULT_IMAGE = "authzed/spicedb";

static final String DEFAULT_IMAGE_TAG = "v1.11.0";
String DEFAULT_IMAGE_TAG = "v1.11.0";

static final String DEFAULT_SERVICE_NAME = "authzed";
String DEFAULT_SERVICE_NAME = "authzed";

/**
* If DevServices has been explicitly enabled or disabled. DevServices is generally enabled
Expand All @@ -21,14 +19,13 @@ public class DevServicesAuthzedConfig {
* When DevServices is enabled Quarkus will attempt to automatically configure and start
* a database when running in 'dev' or 'test' mode.
*/
@ConfigItem(defaultValue = "true")
public Boolean enabled;
@WithDefault("true")
Boolean enabled();

/**
* The container image name to use, for container based DevServices providers.
*/
@ConfigItem
public Optional<String> imageName;
Optional<String> imageName();

/**
* Indicates if the Authzed instance managed by Quarkus DevServices is shared.
Expand All @@ -41,8 +38,8 @@ public class DevServicesAuthzedConfig {
* <p>
* Container sharing is only used in 'dev' mode.
*/
@ConfigItem(defaultValue = "true")
public boolean shared;
@WithDefault("true")
boolean shared();

/**
* The value of the {@code quarkus-dev-service-authzed} label attached to the started container.
Expand All @@ -54,23 +51,21 @@ public class DevServicesAuthzedConfig {
* <p>
* This property is used when you need multiple shared Authzed instances.
*/
@ConfigItem(defaultValue = "authzed")
public String serviceName;
@WithDefault("authzed")
String serviceName();

/**
* Schema to upload during DevServices initialization.
*/
@ConfigItem
public Optional<String> schema;
Optional<String> schema();

/**
* Location of schema file to upload during DevServices initialization.
* <p>
* The location can be prefixed with {@code classpath:} or {@code filesystem:} to specify where the file
* will be read from; if not prefixed, it will be read from the classpath.
*/
@ConfigItem
public Optional<String> schemaLocation;
Optional<String> schemaLocation();

/**
* Authorization tuples to upload during DevServices initialization.
Expand All @@ -79,8 +74,7 @@ public class DevServicesAuthzedConfig {
* @implNote Initialization of tuples will only happen if an schema is also defined via
* {@link #schema} or {@link #schemaLocation}.
*/
@ConfigItem
public Optional<String> authorizationTuples;
Optional<String> authorizationTuples();

/**
* Location of authorization tuples file to upload during DevServices initialization.
Expand All @@ -92,37 +86,32 @@ public class DevServicesAuthzedConfig {
* @implNote Initialization of tuples will only happen if an schema is also defined via
* {@link #schema} or {@link #schemaLocation}.
*/
@ConfigItem
public Optional<String> authorizationTuplesLocation;
Optional<String> authorizationTuplesLocation();

/**
* Dashboard configuration
*/
@ConfigItem
public GrpcConfig grpc;
GrpcConfig grpc();

/**
* Dashboard configuration
*/
@ConfigItem
public DashboardConfig dashboard;
DashboardConfig dashboard();

/**
* Http configuration
*/
@ConfigItem
public HttpConfig http;
HttpConfig http();

/**
* Metrics configuration
*/
@ConfigItem
public MetricsConfig metrics;
MetricsConfig metrics();

/**
* operationType configuration
*/
@ConfigItem(defaultValue = "CREATE")
public String operationType;
@WithDefault("CREATE")
String operationType();

}
Loading

0 comments on commit 4a86104

Please sign in to comment.