Skip to content

Commit

Permalink
chore: fix mistakes and several rename
Browse files Browse the repository at this point in the history
  • Loading branch information
Lambert-Rao committed Mar 29, 2024
1 parent 413ba11 commit 486b6f3
Show file tree
Hide file tree
Showing 26 changed files with 86 additions and 104 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

@Getter
@AllArgsConstructor
public enum DataStatus {
public enum RecordStatus {
INACTIVE(0, "Inactive"),
ACTIVE(1, "Active");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import lombok.Data;

@Data
public class AclMetadata {
public class AclMetadata extends MetadataConfig {

private Long clusterId;
private String principal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,11 @@

package org.apache.eventmesh.dashboard.common.model.metadata;

import org.apache.eventmesh.dashboard.common.enums.metadata.MetadataServiceTypeEnum;

import lombok.Data;

@Data
public class ClientMetadata extends MetadataConfig {


{
this.setServiceTypeEnums(MetadataServiceTypeEnum.CLIENT);
}

private String name;

private String platform;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,12 @@
package org.apache.eventmesh.dashboard.common.model.metadata;

import org.apache.eventmesh.dashboard.common.enums.StoreType;
import org.apache.eventmesh.dashboard.common.enums.metadata.MetadataServiceTypeEnum;

import lombok.Data;

@Data
public class ClusterMetadata extends MetadataConfig {

{
this.setServiceTypeEnums(MetadataServiceTypeEnum.CLUSTER);
}

private String clusterName;

private String registryAddress;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

package org.apache.eventmesh.dashboard.common.model.metadata;

import org.apache.eventmesh.dashboard.common.enums.metadata.MetadataServiceTypeEnum;

import lombok.Data;

/**
Expand All @@ -28,9 +26,6 @@
@Data
public class ConnectionMetadata extends MetadataConfig {

{
this.setServiceTypeEnums(MetadataServiceTypeEnum.CONNECTION);
}

/**
* The type of source. Possible values are "connector" or "client".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,10 @@

package org.apache.eventmesh.dashboard.common.model.metadata;

import org.apache.eventmesh.dashboard.common.enums.metadata.MetadataServiceTypeEnum;

import lombok.Data;

@Data
public class GroupMetadata extends MetadataConfig {
{
this.setServiceTypeEnums(MetadataServiceTypeEnum.GROUP);
}

private String name;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

package org.apache.eventmesh.dashboard.common.model.metadata;

import org.apache.eventmesh.dashboard.common.enums.metadata.MetadataServiceTypeEnum;

import lombok.Data;

/**
Expand All @@ -29,8 +27,6 @@
@Data
public class MetadataConfig {

private MetadataServiceTypeEnum serviceTypeEnums;

//center url
private String registryAddress;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,13 @@

package org.apache.eventmesh.dashboard.common.model.metadata;

import org.apache.eventmesh.dashboard.common.enums.DataStatus;
import org.apache.eventmesh.dashboard.common.enums.metadata.MetadataServiceTypeEnum;
import org.apache.eventmesh.dashboard.common.enums.RecordStatus;

import lombok.Data;

@Data
public class RegistryMetadata extends MetadataConfig {

{
this.setServiceTypeEnums(MetadataServiceTypeEnum.META_NACOS);
}

private String clusterName;

Expand All @@ -50,7 +46,7 @@ public class RegistryMetadata extends MetadataConfig {
/**
* 0: not active, 1: active
*
* @see DataStatus
* @see RecordStatus
*/
private Integer status;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,11 @@

package org.apache.eventmesh.dashboard.common.model.metadata;

import org.apache.eventmesh.dashboard.common.enums.metadata.MetadataServiceTypeEnum;

import lombok.Data;

@Data
public class RuntimeMetadata extends MetadataConfig {


{
this.setServiceTypeEnums(MetadataServiceTypeEnum.RUNTIME);
}

private String host;

private Integer port;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@

import lombok.Data;

/**
* Service users are users that are used by components like mysql, kafka, etc.
*/
@Data
public class ServiceUserMetadata {

private String userName;
//service users are only store users by now
private StoreType serviceType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,12 @@
package org.apache.eventmesh.dashboard.common.model.metadata;

import org.apache.eventmesh.dashboard.common.enums.StoreType;
import org.apache.eventmesh.dashboard.common.enums.metadata.MetadataServiceTypeEnum;

import lombok.Data;

@Data
public class TopicMetadata extends MetadataConfig {

{
this.setServiceTypeEnums(MetadataServiceTypeEnum.TOPIC);
}

private StoreType storeType;

private String storeAddress;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

public class GetConfigRequest {

private List<String> registryAddress;
private List<String> nameServerAddress;

private List<String> runtimeAddress;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@

public class GetConfigResponse {

List<ConfigMetadata> configMetadataList;
private List<ConfigMetadata> configMetadataList;
private Boolean success;
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@

import java.util.concurrent.CompletableFuture;

import lombok.Data;

@Data
public class GetGroupResult {

private CompletableFuture<GetGroupsResponse> future;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
package org.apache.eventmesh.dashboard.common.model.remoting.offset;


import org.apache.eventmesh.dashboard.common.model.metadata.GroupMetadata;

import lombok.Data;

@Data
public class GetOffsetRequest {

private GroupMetadata groupMetadata;
private String bootStrapServers;

private String groupName;
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,24 @@
package org.apache.eventmesh.dashboard.common.model.remoting.offset;


import org.apache.eventmesh.dashboard.common.model.metadata.GroupMetadata;

import java.time.LocalDateTime;

import lombok.Data;

@Data
public class ResetOffsetRequest {

LocalDateTime timestamp;
Long timestamp;

Long offset;

private String topic;

private String bootStrapServers;

private Integer partitionId;

ResetOffsetMode resetOffsetMode;

GroupMetadata groupMetadata;
private String groupName;

public enum ResetOffsetMode {
EARLIEST,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

package org.apache.eventmesh.dashboard.common.model.remoting.offset;

import lombok.Data;

@Data
public class ResetOffsetResponse {

private Long offset;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@

import java.util.concurrent.CompletableFuture;

import lombok.Data;

@Data
public class ResetOffsetResult {
private Boolean success;

private CompletableFuture<ResetOffsetResponse> resetOffsetResponseCompletableFuture;
private CompletableFuture<ResetOffsetResponse> future;
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,12 @@
* limitations under the License.
*/

package org.apache.eventmesh.dashboard.common.enums.metadata;
package org.apache.eventmesh.dashboard.common.model.remoting.runtime;

public enum MetadataTypeEnum {
import lombok.Data;

CENTER,

CLUSTER,

RUNTIME,

TOPIC,

GROUP,

SUBSCRIPTION,

STORE
;
@Data
public class GetRuntimeRequest {

private String registryAddress;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.eventmesh.dashboard.common.model.remoting.runtime;

import org.apache.eventmesh.dashboard.common.model.metadata.RuntimeMetadata;

import java.util.List;

import lombok.Data;

@Data
public class GetRuntimeResponse {

private List<RuntimeMetadata> runtimeMetadata;
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,14 @@
* limitations under the License.
*/

package org.apache.eventmesh.dashboard.common.enums.metadata;
package org.apache.eventmesh.dashboard.common.model.remoting.runtime;

public enum MetadataServiceTypeEnum {
import java.util.concurrent.CompletableFuture;

RUNTIME,

CENTER_ETCD,

META_NACOS,

TOPIC,

CLUSTER,

CLIENT,

GROUP,

CONNECTION,
import lombok.Data;

@Data
public class GetRuntimeResult {

private CompletableFuture<GetRuntimeResponse> future;
}
Loading

0 comments on commit 486b6f3

Please sign in to comment.