Skip to content

Commit

Permalink
chore: fix checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
Pil0tXia committed Oct 1, 2023
1 parent d5ab5ac commit d2fbc47
Show file tree
Hide file tree
Showing 37 changed files with 624 additions and 211 deletions.
17 changes: 17 additions & 0 deletions eventmesh-admin-kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
* 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.
*/

plugins {
java
idea
Expand Down
17 changes: 17 additions & 0 deletions eventmesh-admin-kotlin/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
# 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.
#

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
Expand Down
17 changes: 17 additions & 0 deletions eventmesh-admin-kotlin/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
/*
* 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.
*/

rootProject.name = "eventmesh-admin-kotlin"

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

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.adminkotlin;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class EventmeshAdminApplication {

public static void main(String[] args) {
SpringApplication.run(EventmeshAdminApplication.class, args);
}

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
package com.apache.eventmesh.adminkotlin.config;

import static com.apache.eventmesh.adminkotlin.config.Constants.ADMIN_PROPS_PREFIX;
import static com.apache.eventmesh.adminkotlin.config.Constants.META_TYPE_NACOS;
/*
* 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.adminkotlin.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
Expand All @@ -10,7 +24,7 @@

@Data
@Component
@ConfigurationProperties(prefix = ADMIN_PROPS_PREFIX)
@ConfigurationProperties(prefix = Constants.ADMIN_PROPS_PREFIX)
public class AdminProperties {

private MetaProperties meta = new MetaProperties();
Expand All @@ -20,7 +34,7 @@ public class AdminProperties {
@Data
public static class MetaProperties {

private String type = META_TYPE_NACOS;
private String type = Constants.META_TYPE_NACOS;

private NacosProperties nacos = new NacosProperties();

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* 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.adminkotlin.config;

public class Constants {

// config
public static final String ADMIN_PROPS_PREFIX = "eventmesh";
public static final String META_TYPE_NACOS = "nacos";
public static final String META_TYPE_ETCD = "etcd";

// Open-API
public static final String HTTP_PREFIX = "http://";
public static final String HTTPS_PREFIX = "https://";
public static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";

// Nacos
public static final String NACOS_LOGIN_API = "/nacos/v1/auth/login";
public static final String NACOS_CONFIGS_API = "/nacos/v1/cs/configs";
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,35 @@
package com.apache.eventmesh.adminkotlin.config;
/*
* 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.adminkotlin.config;

import static com.apache.eventmesh.adminkotlin.config.Constants.META_TYPE_ETCD;
import static com.apache.eventmesh.adminkotlin.config.Constants.META_TYPE_NACOS;
import static org.apache.eventmesh.adminkotlin.config.Constants.META_TYPE_ETCD;
import static org.apache.eventmesh.adminkotlin.config.Constants.META_TYPE_NACOS;

import org.apache.eventmesh.adminkotlin.service.ConnectionService;
import org.apache.eventmesh.adminkotlin.service.SubscriptionService;
import org.apache.eventmesh.adminkotlin.service.impl.EtcdConnectionService;
import org.apache.eventmesh.adminkotlin.service.impl.EtcdSubscriptionService;
import org.apache.eventmesh.adminkotlin.service.impl.NacosConnectionService;
import org.apache.eventmesh.adminkotlin.service.impl.NacosSubscriptionService;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.apache.eventmesh.adminkotlin.service.ConnectionService;
import com.apache.eventmesh.adminkotlin.service.SubscriptionService;
import com.apache.eventmesh.adminkotlin.service.impl.EtcdConnectionService;
import com.apache.eventmesh.adminkotlin.service.impl.EtcdSubscriptionService;
import com.apache.eventmesh.adminkotlin.service.impl.NacosConnectionService;
import com.apache.eventmesh.adminkotlin.service.impl.NacosSubscriptionService;

/**
* Use different registry SDK depending on the configured meta type
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
package com.apache.eventmesh.adminkotlin.controller;
/*
* 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.adminkotlin.controller;

import org.apache.eventmesh.adminkotlin.service.ConnectionService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.apache.eventmesh.adminkotlin.service.ConnectionService;

import lombok.extern.slf4j.Slf4j;

@Slf4j
Expand Down
Loading

0 comments on commit d2fbc47

Please sign in to comment.