contractItems;
20 |
21 | @Data
22 | @NoArgsConstructor
23 | @AllArgsConstructor
24 | public static class RepCopyContractItem {
25 | private String contractName;
26 | private String contractSource;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/contract/entity/ReqAddAddress.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.contract.entity;
17 |
18 | public class ReqAddAddress {
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/src/main/resources/templates/node/node-group-genesis.tpl:
--------------------------------------------------------------------------------
1 | [consensus]
2 | ; consensus algorithm now support PBFT(consensus_type=pbft), Raft(consensus_type=raft)
3 | ; and rpbft(consensus_type=rpbft)
4 | consensus_type=pbft
5 | ; the max number of transactions of a block
6 | max_trans_num=1000
7 | ; rpbft related configuration
8 | ; the sealers num of each consensus epoch
9 | epoch_sealer_num=[(${sealerCount})]
10 | ; the number of generated blocks each epoch
11 | epoch_block_num=1000
12 | ; the node id of consensusers
13 | [# th:each="nodeId,iter : ${nodeIdList}"]node.[(${iter.index})]=[(${nodeId})]
14 | [/]
15 |
16 | [state]
17 | type=storage
18 | [tx]
19 | ; transaction gas limit
20 | gas_limit=300000000
21 | [group]
22 | id=[(${groupId})]
23 | timestamp=[(${timestamp})]
24 | [evm]
25 | enable_free_storage=false
26 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/deploy/entity/ReqCheckHost.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.node.mgr.deploy.entity;
16 |
17 | import java.util.List;
18 | import lombok.Data;
19 |
20 | @Data
21 | public class ReqCheckHost {
22 | List hostIdList;
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/front/frontinterface/entity/GroupHandleResult.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.node.mgr.front.frontinterface.entity;
15 |
16 | import lombok.Data;
17 |
18 | @Data
19 | public class GroupHandleResult {
20 | private String code;
21 | private String message;
22 | }
23 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/node/entity/Node.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.node.entity;
17 |
18 | import lombok.Data;
19 |
20 | /**
21 | * receive node info entity.
22 | */
23 | @Data
24 | public class Node {
25 | private String nodeId;
26 | private String nodeType;
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/account/entity/ImageToken.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.node.mgr.account.entity;
15 |
16 | import lombok.Data;
17 |
18 | /**
19 | * image token of verify code
20 | */
21 | @Data
22 | public class ImageToken {
23 |
24 | private String base64Image;
25 | private String token;
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/base/annotation/entity/CurrentAccountInfo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.node.mgr.base.annotation.entity;
15 |
16 | import lombok.Data;
17 |
18 | /**
19 | * Entity class of account info.
20 | */
21 | @Data
22 | public class CurrentAccountInfo {
23 | String account;
24 | Integer roleId;
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/front/entity/NodeHeartBeat.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.front.entity;
17 |
18 | import java.math.BigInteger;
19 | import lombok.Data;
20 |
21 | @Data
22 | public class NodeHeartBeat {
23 | private BigInteger blockNumber;
24 | private BigInteger pbftView;
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/monitor/entity/PageTransInfo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.monitor.entity;
17 |
18 | import java.time.LocalDateTime;
19 | import lombok.Data;
20 |
21 | @Data
22 | public class PageTransInfo {
23 |
24 | private int transCount;
25 | private LocalDateTime time;
26 | }
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/front/entity/TotalTransCountInfo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.front.entity;
17 |
18 | import java.math.BigInteger;
19 | import lombok.Data;
20 |
21 | @Data
22 | public class TotalTransCountInfo {
23 | private BigInteger txSum;
24 | private BigInteger blockNumber;
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/account/entity/LoginInfo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.account.entity;
17 |
18 | import lombok.Data;
19 |
20 | /**
21 | * login param from web request
22 | */
23 | @Data
24 | public class LoginInfo {
25 |
26 | private String account;
27 | private String accountPwd;
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/front/frontinterface/entity/FailInfo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.node.mgr.front.frontinterface.entity;
15 |
16 | import java.time.Instant;
17 | import lombok.Data;
18 |
19 | @Data
20 | public class FailInfo {
21 |
22 | private Instant latestTime;
23 | private int failCount;
24 | private String failUrl;
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/precompiled/entity/PermissionState.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.precompiled.entity;
17 |
18 | import lombok.Data;
19 |
20 | @Data
21 | public class PermissionState {
22 | private int deployAndCreate;
23 | private int cns;
24 | private int sysConfig;
25 | private int node;
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/appintegration/entity/BasicInfo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.node.mgr.appintegration.entity;
15 |
16 | import lombok.Data;
17 |
18 | @Data
19 | public class BasicInfo {
20 | private Integer encryptType;
21 | private Integer sslCryptoType;
22 | private String fiscoBcosVersion;
23 | private String webaseVersion;
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/monitor/entity/UserMonitorResult.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.node.mgr.monitor.entity;
15 |
16 | import lombok.Data;
17 |
18 | /**
19 | * user monitor result info.
20 | */
21 | @Data
22 | public class UserMonitorResult implements Cloneable {
23 |
24 | private String userName;
25 | private Integer userType;
26 | }
27 |
28 |
29 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/base/enums/HasPk.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.base.enums;
17 |
18 | public enum HasPk {
19 | HAS(1), NONE(2);
20 |
21 | private int value;
22 |
23 | private HasPk(Integer value) {
24 | this.value = value;
25 | }
26 |
27 | public int getValue() {
28 | return this.value;
29 | }
30 | }
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/cert/entity/CertHandle.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.cert.entity;
17 |
18 | import lombok.Data;
19 |
20 | import javax.validation.constraints.NotBlank;
21 |
22 | /**
23 | * param for web request
24 | */
25 | @Data
26 | public class CertHandle {
27 | private String content;
28 | private String fingerPrint;
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/account/token/TbToken.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.account.token;
17 |
18 | import lombok.Data;
19 |
20 | import java.time.LocalDateTime;
21 |
22 | @Data
23 | public class TbToken {
24 | private String token;
25 | private String value;
26 | private LocalDateTime expireTime;
27 | private LocalDateTime createTime;
28 | }
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/base/enums/AppType.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.base.enums;
17 |
18 | public enum AppType {
19 | TEMPLATE(1), NEW(2);
20 |
21 | private int value;
22 |
23 | private AppType(Integer type) {
24 | this.value = type;
25 | }
26 |
27 | public int getValue() {
28 | return this.value;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/front/frontinterface/entity/FrontUrlInfo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.webank.webase.node.mgr.front.frontinterface.entity;
18 |
19 | import lombok.Data;
20 |
21 | /**
22 | * vo of front's frontId and built url to request front
23 | */
24 | @Data
25 | public class FrontUrlInfo {
26 | private Integer frontId;
27 | private String url;
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/node/entity/ReqUpdate.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.node.mgr.node.entity;
16 |
17 | import javax.validation.constraints.NotBlank;
18 | import lombok.Data;
19 |
20 | @Data
21 | public class ReqUpdate {
22 | @NotBlank
23 | private String nodeId;
24 | private String nodeIp;
25 | private String city;
26 | private String agency;
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/monitor/entity/UnusualUserInfo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.monitor.entity;
17 |
18 | import java.time.LocalDateTime;
19 | import lombok.Data;
20 |
21 | @Data
22 | public class UnusualUserInfo {
23 |
24 | private String userName;
25 | private int transCount;
26 | private String hashs;
27 | private LocalDateTime time;
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/contract/entity/RspSystemProxy.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.contract.entity;
17 |
18 | import lombok.Data;
19 |
20 | /**
21 | * deploy interface parameter.
22 | */
23 | @Data
24 | public class RspSystemProxy {
25 | private String name;
26 | private String address;
27 | private String cache;
28 | private Integer blockNumber;
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/base/enums/EnableStatus.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.base.enums;
17 |
18 | public enum EnableStatus {
19 | ON(1), OFF(0);
20 |
21 | private int value;
22 |
23 | private EnableStatus(Integer onOrOff) {
24 | this.value = onOrOff;
25 | }
26 |
27 | public int getValue() {
28 | return this.value;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/base/enums/AlertLevelType.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.base.enums;
17 |
18 | public enum AlertLevelType {
19 | HIGH(1), MIDDLE(2), LOW(3);
20 |
21 | private int value;
22 |
23 | AlertLevelType(Integer type) {
24 | this.value = type;
25 | }
26 |
27 | public int getValue() {
28 | return this.value;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/node/entity/RspCity.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.node.mgr.node.entity;
16 |
17 | import lombok.Data;
18 |
19 | /**
20 | * response for city in china map
21 | */
22 | @Data
23 | public class RspCity {
24 |
25 | /**
26 | * city id
27 | */
28 | private String city;
29 | /**
30 | * node count
31 | */
32 | private Integer count;
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/transdaily/SeventDaysTrans.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.transdaily;
17 |
18 | import java.time.LocalDate;
19 | import lombok.Data;
20 |
21 | /**
22 | * Entity class of Trading within seven days.
23 | */
24 | @Data
25 | public class SeventDaysTrans {
26 |
27 | private LocalDate day;
28 | private int groupId;
29 | private int transCount;
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/deploy/entity/ReqAddHost.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.node.mgr.deploy.entity;
16 |
17 | import javax.validation.constraints.NotBlank;
18 | import lombok.Data;
19 |
20 | @Data
21 | public class ReqAddHost {
22 | @NotBlank
23 | private String sshIp;
24 | /**
25 | * host's default directory
26 | */
27 | @NotBlank
28 | private String rootDir;
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/precompiled/entity/CrudHandle.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.precompiled.entity;
17 |
18 | import javax.validation.constraints.NotBlank;
19 | import lombok.Data;
20 |
21 |
22 | @Data
23 | public class CrudHandle {
24 | private int groupId;
25 | @NotBlank
26 | private String fromAddress;
27 | private String signUserId;
28 | private String sql;
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/block/entity/MinMaxBlock.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.block.entity;
17 |
18 | import java.math.BigInteger;
19 | import lombok.Data;
20 |
21 | /**
22 | * result of min max block number.
23 | */
24 | @Data
25 | public class MinMaxBlock {
26 |
27 | private Integer groupId;
28 | private BigInteger maxBlockNumber;
29 | private BigInteger minBLockNumber;
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/contract/entity/ReqListContract.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.node.mgr.contract.entity;
16 |
17 | import java.util.List;
18 | import lombok.Data;
19 |
20 | @Data
21 | public class ReqListContract {
22 | private Integer groupId;
23 | private String account;
24 | /**
25 | * list contract by multi path
26 | */
27 | private List contractPathList;
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/account/entity/PasswordInfo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.account.entity;
17 |
18 | import javax.validation.constraints.NotBlank;
19 | import lombok.Data;
20 |
21 | /**
22 | * entity to update password.
23 | */
24 | @Data
25 | public class PasswordInfo {
26 | @NotBlank
27 | private String oldAccountPwd;
28 | @NotBlank
29 | private String newAccountPwd;
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/base/enums/AlertRuleType.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.webank.webase.node.mgr.base.enums;
18 |
19 | public enum AlertRuleType {
20 | NODE_ALERT(1), AUDIT_ALERT(2), CERT_ALERT(3);
21 |
22 | private int value;
23 |
24 | AlertRuleType(Integer type) {
25 | this.value = type;
26 | }
27 |
28 | public int getValue() {
29 | return this.value;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/base/enums/ContractType.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.base.enums;
17 |
18 | public enum ContractType {
19 | GENERALCONTRACT(0), SYSTEMCONTRACT(1), APPIMPORT(2);
20 |
21 | private int value;
22 |
23 | private ContractType(Integer type) {
24 | this.value = type;
25 | }
26 |
27 | public int getValue() {
28 | return this.value;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/base/enums/RoleType.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.base.enums;
17 |
18 | public enum RoleType {
19 | ADMIN(100000), VISITOR(100001), DEVELOPER(100002);
20 |
21 | private Integer value;
22 |
23 | private RoleType(Integer value) {
24 | this.value = value;
25 | }
26 |
27 | public Integer getValue() {
28 | return this.value;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/precompiled/entity/SysConfigParam.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.precompiled.entity;
17 |
18 | import lombok.Data;
19 |
20 | @Data
21 | public class SysConfigParam {
22 |
23 | // private Long id;
24 | private int groupId;
25 | private String fromAddress;
26 | private String signUserId;
27 | private String configKey;
28 | private String configValue;
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/user/entity/KeyPair.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.user.entity;
17 |
18 | import lombok.Data;
19 |
20 | @Data
21 | public class KeyPair {
22 |
23 | private String privateKey;
24 | private String publicKey;
25 | private String address;
26 | /**
27 | * for pull user from front
28 | */
29 | private String userName;
30 | private Integer userId;
31 | }
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/base/enums/OperateStatus.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.webank.webase.node.mgr.base.enums;
18 |
19 | /**
20 | * result code of operate group
21 | */
22 | public enum OperateStatus {
23 | SUCCESS(0), FAIL(1);
24 |
25 | private int value;
26 |
27 | OperateStatus(Integer result) {
28 | this.value = result;
29 | }
30 |
31 | public int getValue() {
32 | return this.value;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/base/enums/UserType.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.base.enums;
17 |
18 | /**
19 | * user type.
20 | */
21 | public enum UserType {
22 | GENERALUSER(1), SYSTEMUSER(2);
23 |
24 | private int value;
25 |
26 | private UserType(Integer type) {
27 | this.value = type;
28 | }
29 |
30 | public int getValue() {
31 | return this.value;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/contract/entity/QueryByBinParam.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.contract.entity;
17 |
18 | import javax.validation.constraints.NotBlank;
19 | import javax.validation.constraints.NotNull;
20 | import lombok.Data;
21 |
22 | @Data
23 | public class QueryByBinParam {
24 | @NotNull
25 | private Integer groupId;
26 | @NotBlank
27 | private String partOfBytecodeBin;
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/method/entity/NewMethodInputParam.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.node.mgr.method.entity;
15 |
16 |
17 | import java.util.List;
18 | import javax.validation.constraints.NotNull;
19 | import lombok.Data;
20 |
21 | /**
22 | * entity of newMethod input.
23 | */
24 | @Data
25 | public class NewMethodInputParam {
26 | @NotNull
27 | private Integer groupId;
28 | @NotNull
29 | List methodList;
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/base/enums/ScpTypeEnum.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.base.enums;
17 |
18 | import lombok.AllArgsConstructor;
19 | import lombok.Getter;
20 | import lombok.ToString;
21 |
22 | /**
23 | *
24 | */
25 |
26 | @Getter
27 | @ToString
28 | @AllArgsConstructor
29 | public enum ScpTypeEnum {
30 | UP("up"),
31 | DOWNLOAD ( "down"),
32 | ;
33 |
34 | private String value;
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/monitor/entity/UnusualContractInfo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.monitor.entity;
17 |
18 | import java.time.LocalDateTime;
19 | import lombok.Data;
20 |
21 | @Data
22 | public class UnusualContractInfo {
23 |
24 | private String contractName;
25 | private String contractAddress;
26 | private int transCount;
27 | private String hashs;
28 | private LocalDateTime time;
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/contract/entity/ContractPathParam.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.node.mgr.contract.entity;
16 |
17 | import lombok.AllArgsConstructor;
18 | import lombok.Data;
19 | import lombok.NoArgsConstructor;
20 |
21 | @Data
22 | @NoArgsConstructor
23 | @AllArgsConstructor
24 | public class ContractPathParam {
25 | private Integer groupId;
26 | private String contractPath;
27 | private String account;
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/base/enums/RequestType.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.node.mgr.base.enums;
16 |
17 | /**
18 | * HTTP request types
19 | */
20 | public enum RequestType {
21 | GET(0), POST(1), PUT(2), DELETE(3);
22 |
23 | private int value;
24 |
25 | private RequestType(Integer type) {
26 | this.value = type;
27 | }
28 |
29 | public int getValue() {
30 | return this.value;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/deploy/entity/ReqUpgrade.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.node.mgr.deploy.entity;
16 |
17 | import javax.validation.constraints.NotBlank;
18 | import javax.validation.constraints.Positive;
19 |
20 | import lombok.Data;
21 |
22 | @Data
23 | public class ReqUpgrade {
24 |
25 | @Positive
26 | private int newTagId;
27 |
28 |
29 | @NotBlank
30 | String chainName = "default_chain";
31 |
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/method/entity/Method.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.method.entity;
17 |
18 | import javax.validation.constraints.NotBlank;
19 | import lombok.Data;
20 |
21 | /**
22 | * method input entity.
23 | */
24 | @Data
25 | public class Method {
26 | @NotBlank
27 | private String methodId;
28 | @NotBlank
29 | private String abiInfo;
30 | @NotBlank
31 | private String methodType;
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/base/enums/TransType.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.node.mgr.base.enums;
15 |
16 | /**
17 | * type of transaction.
18 | *
19 | * 0:contract deploy, 1:function call
20 | */
21 | public enum TransType {
22 | DEPLOY(0), CALL(1);
23 |
24 | private int value;
25 |
26 | TransType(Integer type) {
27 | this.value = type;
28 | }
29 |
30 | public int getValue() {
31 | return this.value;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/contract/entity/ReqQueryCns.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.contract.entity;
17 |
18 | import javax.validation.constraints.NotBlank;
19 | import javax.validation.constraints.NotNull;
20 | import lombok.Data;
21 |
22 | /**
23 | * ReqQueryCns.
24 | */
25 | @Data
26 | public class ReqQueryCns {
27 | @NotNull
28 | private Integer groupId;
29 | @NotBlank
30 | private String contractAddress;
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/monitor/entity/ContractMonitorResult.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.node.mgr.monitor.entity;
15 |
16 | import lombok.Data;
17 |
18 | /**
19 | * contract monitor result info.
20 | */
21 | @Data
22 | public class ContractMonitorResult {
23 | private String contractName;
24 | private String contractAddress;
25 | private String interfaceName;
26 | private Integer transType;
27 | private Integer transUnusualType;
28 | }
29 |
--------------------------------------------------------------------------------
/docker/build/Dockerfile:
--------------------------------------------------------------------------------
1 | #FROM openjdk:8-jdk-alpine as prod
2 | FROM ubuntu:18.04 as prod
3 |
4 | #RUN apk --no-cache add bash curl wget
5 | RUN apt-get update \
6 | && apt-get -y install openjdk-8-jre \
7 | && apt-get -y install mysql-client \
8 | && rm -rf /var/lib/apt/lists/*
9 |
10 | COPY script /dist/script
11 | COPY gradle /dist/gradle
12 | COPY lib /dist/lib
13 | COPY conf_template /dist/conf
14 | COPY apps /dist/apps
15 |
16 | WORKDIR /dist
17 | EXPOSE 5001
18 |
19 | ENV CLASSPATH "/dist/conf/:/dist/apps/*:/dist/lib/*"
20 |
21 | ENV JAVA_OPTS " -server -Dfile.encoding=UTF-8 -Xmx512m -Xms512m -Xmn256m -Xss512k -XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/log/heap_error.log -XX:+UseG1GC -XX:MaxGCPauseMillis=200 "
22 | ENV APP_MAIN "com.webank.webase.node.mgr.Application"
23 |
24 | # start commond
25 | ENTRYPOINT java ${JAVA_OPTS} -Djdk.tls.namedGroups="secp256k1", -Duser.timezone="Asia/Shanghai" -Djava.security.egd=file:/dev/./urandom, -Djava.library.path=/dist/conf -cp ${CLASSPATH} ${APP_MAIN}
26 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/appintegration/entity/AppRegisterInfo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.node.mgr.appintegration.entity;
15 |
16 | import javax.validation.constraints.NotBlank;
17 | import javax.validation.constraints.NotNull;
18 | import lombok.Data;
19 |
20 | @Data
21 | public class AppRegisterInfo {
22 | @NotBlank
23 | private String appIp;
24 | @NotNull
25 | private Integer appPort;
26 | @NotBlank
27 | private String appLink;
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/contract/scaffold/entity/RspFile.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.node.mgr.contract.scaffold.entity;
16 |
17 | import lombok.AllArgsConstructor;
18 | import lombok.Data;
19 | import lombok.NoArgsConstructor;
20 |
21 | /**
22 | * @author marsli
23 | */
24 | @Data
25 | @NoArgsConstructor
26 | @AllArgsConstructor
27 | public class RspFile {
28 | private String fileName;
29 | private String fileStreamBase64;
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/base/enums/ConsensusType.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.node.mgr.base.enums;
16 |
17 | /**
18 | * 共识类型,用于判断front_group_map的类型
19 | * 优先使用共识类型,其次观察类型
20 | */
21 | public enum ConsensusType {
22 | SEALER(1), OBSERVER(2);
23 |
24 | private int value;
25 |
26 | ConsensusType(int type) {
27 | this.value = type;
28 | }
29 |
30 | public int getValue() {
31 | return this.value;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/base/enums/SqlSortType.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.base.enums;
17 |
18 | /**
19 | * Enumeration of mysql sql sort type.
20 | */
21 | public enum SqlSortType {
22 | DESC("DESC"), ASC("ASC");
23 |
24 | private String value;
25 |
26 | private SqlSortType(String value) {
27 | this.value = value;
28 | }
29 |
30 | public String getValue() {
31 | return this.value;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/front/frontinterface/entity/PeerOfSyncStatus.java:
--------------------------------------------------------------------------------
1 | ///**
2 | // * Copyright 2014-2021 the original author or authors.
3 | // *
4 | // * Licensed under the Apache License, Version 2.0 (the "License");
5 | // * you may not use this file except in compliance with the License.
6 | // * You may obtain a copy of the License at
7 | // *
8 | // * http://www.apache.org/licenses/LICENSE-2.0
9 | // *
10 | // * Unless required by applicable law or agreed to in writing, software
11 | // * distributed under the License is distributed on an "AS IS" BASIS,
12 | // * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // * See the License for the specific language governing permissions and
14 | // * limitations under the License.
15 | // */
16 | //package com.webank.webase.node.mgr.frontinterface.entity;
17 | //
18 | //import java.math.BigInteger;
19 | //import lombok.Data;
20 | //
21 | //@Data
22 | //public class PeerOfSyncStatus {
23 | // private BigInteger blockNumber;
24 | // private String genesisHash;
25 | // private String latestHash;
26 | // private String nodeId;
27 | //}
28 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/tools/pagetools/entity/MapHandle.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.tools.pagetools.entity;
17 |
18 | import lombok.Data;
19 |
20 | /**
21 | * data unit to handle map2PagedList tool
22 | */
23 | @Data
24 | public class MapHandle{
25 | private String key;
26 | private Object data;
27 |
28 | public MapHandle(String key, Object data) {
29 | this.key = key;
30 | this.data = data;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/base/enums/MonitorUserType.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.node.mgr.base.enums;
15 |
16 | /**
17 | * monitor result type of user.
18 | *
19 | * 0:normal, 1:abnormal.
20 | */
21 | public enum MonitorUserType {
22 | NORMAL(0), ABNORMAL(1);
23 |
24 | private int value;
25 |
26 | MonitorUserType(Integer type) {
27 | this.value = type;
28 | }
29 |
30 | public int getValue() {
31 | return this.value;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/base/enums/OptionType.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.base.enums;
17 |
18 | import lombok.AllArgsConstructor;
19 | import lombok.Getter;
20 | import lombok.ToString;
21 |
22 | @Getter
23 | @ToString
24 | @AllArgsConstructor
25 | public enum OptionType {
26 | DEPLOY_CHAIN("Deploy chain."),
27 | MODIFY_CHAIN("Add nodes, delete node, upgrade chain."),
28 | ;
29 |
30 | private String description;
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/front/entity/FrontInfo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.node.mgr.front.entity;
15 |
16 | import javax.validation.constraints.NotBlank;
17 | import javax.validation.constraints.NotNull;
18 | import lombok.Data;
19 |
20 | @Data
21 | public class FrontInfo {
22 | @NotBlank
23 | private String frontIp;
24 | @NotNull
25 | private Integer frontPort;
26 | /**
27 | * deprecated in v1.5.1
28 | */
29 | private String agency;
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/front/entity/FrontNodeConfig.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.node.mgr.front.entity;
15 |
16 | import lombok.Data;
17 |
18 | @Data
19 | public class FrontNodeConfig {
20 | private String orgName;
21 | private String p2pip;
22 | private String listenip;
23 | private Integer rpcport;
24 | private Integer p2pport;
25 | private Integer channelPort;
26 | private String groupDataPath;
27 | private boolean enableStatistic;
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/node/entity/NodeInfo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.node.entity;
17 |
18 | import lombok.Data;
19 |
20 | @Data
21 | public class NodeInfo {
22 |
23 | private String systemproxyaddress;
24 | private String p2pip;
25 | private String orgName;
26 | private String listenip;
27 | private Integer rpcport;
28 | private Integer p2pport;
29 | private Integer channelPort;
30 | private String datadir;
31 | }
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/user/entity/UpdateUserInputParam.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.node.mgr.user.entity;
15 |
16 | import javax.validation.constraints.NotBlank;
17 | import javax.validation.constraints.NotNull;
18 | import lombok.Data;
19 | import lombok.NoArgsConstructor;
20 |
21 | @Data
22 | @NoArgsConstructor
23 | public class UpdateUserInputParam {
24 |
25 | @NotNull
26 | public Integer userId;
27 | @NotBlank
28 | public String description;
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/base/enums/DeployType.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.node.mgr.base.enums;
16 |
17 | /**
18 | * related with constant-deployType in application.yml
19 | */
20 | public enum DeployType {
21 | MANUAL(0), VISUAL_DEPLOY(1);
22 |
23 | private int value;
24 |
25 | private DeployType(Integer type) {
26 | this.value = type;
27 | }
28 |
29 | public int getValue() {
30 | return this.value;
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 节点管理服务
2 | [](https://webasedoc.readthedocs.io/zh_CN/latest/docs/WeBASE/CONTRIBUTING.html)
3 | [](https://www.codefactor.io/repository/github/webankblockchain/webase-node-manager)
4 | [](https://github.com/WeBankBlockchain/WeBASE-Node-Manager)
5 | [](http://www.apache.org/licenses/)
6 | [](https://github.com/WeBankBlockchain/WeBASE-Node-Manager/releases)
7 |
8 | ## 简介
9 | WeBASE-Node-Manager处理前端页面所有web请求,管理各个节点的状态,管理链上所有智能合约,对区块链的数据进行统计、分析,对异常交易的审计,私钥管理等。 详细介绍请查看[WeBASE-Node-Manager在线文档](https://webasedoc.readthedocs.io/zh_CN/latest/docs/WeBASE-Node-Manager/index.html)
10 |
11 | ## 贡献说明
12 | 请阅读我们的贡献文档,了解如何贡献代码,并提交你的贡献。
13 |
14 | 希望在您的参与下,WeBASE会越来越好!
15 |
16 | ## 社区
17 | 联系我们:webase@webank.com
18 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/appintegration/entity/UpdatePasswordInfo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.node.mgr.appintegration.entity;
15 |
16 | import javax.validation.constraints.NotBlank;
17 | import lombok.Data;
18 |
19 | /**
20 | * entity to update password.
21 | */
22 | @Data
23 | public class UpdatePasswordInfo {
24 | @NotBlank
25 | private String account;
26 | @NotBlank
27 | private String oldAccountPwd;
28 | @NotBlank
29 | private String newAccountPwd;
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/frontgroupmap/entity/FrontGroup.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.frontgroupmap.entity;
17 |
18 | import lombok.Data;
19 |
20 | @Data
21 | public class FrontGroup {
22 | private Integer mapId;
23 | private Integer groupId;
24 | private String groupName;
25 | private Integer frontId;
26 | private String frontIp;
27 | private Integer frontPort;
28 | private Integer status;
29 | private Integer type;
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/group/entity/ReqUpdateDesc.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.node.mgr.group.entity;
16 |
17 | import javax.validation.constraints.NotNull;
18 | import lombok.AllArgsConstructor;
19 | import lombok.Data;
20 | import lombok.NoArgsConstructor;
21 |
22 | @Data
23 | @NoArgsConstructor
24 | @AllArgsConstructor
25 | public class ReqUpdateDesc {
26 | @NotNull
27 | private Integer groupId;
28 | @NotNull
29 | private String description;
30 | }
31 |
--------------------------------------------------------------------------------
/script/deploy/check_container_exist.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | FOUND=0
4 | NOT_FOUND=1
5 | PARAM_ERROR=2
6 |
7 | containerName=""
8 |
9 | ####### 参数解析 #######
10 | cmdname=$(basename "$0")
11 |
12 | # usage help doc.
13 | usage() {
14 | cat << USAGE >&2
15 | Usage:
16 | $cmdname [-c containerName]
17 |
18 | -c chainPath + nodeDir, ex: webasedefault_chainnode0
19 | USAGE
20 | exit ${PARAM_ERROR}
21 | }
22 |
23 |
24 | while getopts c:h OPT;do
25 | case ${OPT} in
26 | c)
27 | containerName="$OPTARG"
28 | ;;
29 | h)
30 | usage
31 | exit ${PARAM_ERROR}
32 | ;;
33 | \?)
34 | usage
35 | exit ${PARAM_ERROR}
36 | ;;
37 | esac
38 | done
39 |
40 |
41 | # use shell script for ansible not support | pipe to grep
42 | function grepContainer() {
43 | docker ps | grep "${containerName}"
44 | if [ $? -ne 0 ] ;then
45 | echo "grep ${containerName} not found"
46 | exit ${NOT_FOUND}
47 | else
48 | echo "Found ${containerName}"
49 | exit ${FOUND}
50 | fi
51 | }
52 | grepContainer
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/precompiled/entity/CnsParam.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.precompiled.entity;
17 |
18 | import lombok.Data;
19 |
20 | @Data
21 | public class CnsParam {
22 |
23 | private int groupId;
24 | private String fromAddress;
25 | private String signUserId;
26 | private String contractNameAndVersion;
27 | private String version;
28 | // register
29 | private String contractAddress;
30 | private String abi;
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/precompiled/entity/PermissionParam.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.precompiled.entity;
17 |
18 |
19 | import lombok.Data;
20 |
21 | @Data
22 | public class PermissionParam {
23 |
24 | private int groupId;
25 | private String permissionType;
26 | private String fromAddress;
27 | private String signUserId;
28 | private String address;
29 | private String tableName;
30 | private PermissionState permissionState;
31 | }
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/front/frontinterface/entity/RspStatBlock.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.node.mgr.front.frontinterface.entity;
16 |
17 | import java.math.BigInteger;
18 | import lombok.AllArgsConstructor;
19 | import lombok.Data;
20 | import lombok.NoArgsConstructor;
21 |
22 | @Data
23 | @AllArgsConstructor
24 | @NoArgsConstructor
25 | public class RspStatBlock {
26 | private BigInteger blockNumber;
27 | private Long timestamp;
28 | private int txCount;
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/appintegration/entity/AppAddInfo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.node.mgr.appintegration.entity;
15 |
16 | import javax.validation.constraints.NotBlank;
17 | import lombok.Data;
18 |
19 | @Data
20 | public class AppAddInfo {
21 | private Integer id;
22 | @NotBlank
23 | private String appName;
24 | @NotBlank
25 | private String appDocLink;
26 | @NotBlank
27 | private String appDesc;
28 | private String appIcon;
29 | private String appDetail;
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/group/entity/RspOperateResult.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.webank.webase.node.mgr.group.entity;
18 |
19 | import lombok.AllArgsConstructor;
20 | import lombok.Data;
21 |
22 | /**
23 | * entity of batch operate group
24 | * etc: batch start, batch generate, batch query group status
25 | */
26 | @Data
27 | @AllArgsConstructor
28 | public class RspOperateResult {
29 | private Integer frontId;
30 | // 0-success, others-fail
31 | private Integer code;
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/monitor/entity/ChainTransInfo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.monitor.entity;
17 |
18 | import java.math.BigInteger;
19 | import lombok.AllArgsConstructor;
20 | import lombok.Data;
21 | import lombok.NoArgsConstructor;
22 |
23 | @Data
24 | @NoArgsConstructor
25 | @AllArgsConstructor
26 | public class ChainTransInfo {
27 | private String from;
28 | private String to;
29 | private String input;
30 | private BigInteger blockNumber;
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/group/entity/GroupGeneral.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.group.entity;
17 |
18 | import java.math.BigInteger;
19 | import lombok.Data;
20 |
21 | @Data
22 | public class GroupGeneral {
23 |
24 | private Integer groupId;
25 | private int orgCount;
26 | private int nodeCount;
27 | private int contractCount;
28 | private BigInteger transactionCount = BigInteger.ZERO;
29 | private BigInteger latestBlock = BigInteger.ZERO;
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/account/role/RoleMapper.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.account.role;
17 |
18 | import java.util.List;
19 | import org.apache.ibatis.annotations.Param;
20 |
21 | /**
22 | * mapper about tb_role.
23 | */
24 | public interface RoleMapper {
25 |
26 | TbRole queryRoleById(@Param("roleId") Integer roleId);
27 |
28 | Integer countOfRole(@Param("param") RoleListParam param);
29 |
30 | List listOfRole(@Param("param") RoleListParam param);
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/base/enums/TransUnusualType.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.node.mgr.base.enums;
15 |
16 | /**
17 | *unusual type of transaction.
18 | *
19 | * 0:normal, 1:abnormal contract, 2:abnormal function.
20 | */
21 | public enum TransUnusualType {
22 | NORMAL(0), CONTRACT(1), FUNCTION(2);
23 |
24 | private int value;
25 |
26 | TransUnusualType(Integer type) {
27 | this.value = type;
28 | }
29 |
30 | public int getValue() {
31 | return this.value;
32 | }
33 | }
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/front/entity/FrontParam.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.node.mgr.front.entity;
15 |
16 | import lombok.AllArgsConstructor;
17 | import lombok.Data;
18 | import lombok.NoArgsConstructor;
19 |
20 | @Data
21 | @NoArgsConstructor
22 | @AllArgsConstructor
23 | public class FrontParam {
24 | private Integer frontId;
25 | private String nodeId;
26 | private Integer groupId;
27 | private String frontIp;
28 | private Integer frontPort;
29 | private Integer frontStatus;
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/contract/entity/QueryContractParam.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.node.mgr.contract.entity;
15 |
16 | import lombok.Data;
17 |
18 | @Data
19 | public class QueryContractParam {
20 |
21 | private Integer groupId;
22 | private String contractName;
23 | @Deprecated
24 | private String account;
25 | private String contractAddress;
26 | private Integer contractStatus;
27 | private Integer pageNumber;
28 | private Integer pageSize;
29 | private String contractPath;
30 |
31 | }
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/account/entity/AccountInfo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.account.entity;
17 |
18 | import javax.validation.constraints.NotBlank;
19 | import javax.validation.constraints.NotNull;
20 | import lombok.Data;
21 |
22 | /**
23 | * param to add an Daccount
24 | */
25 | @Data
26 | public class AccountInfo {
27 | @NotBlank
28 | private String account;
29 | private String accountPwd;
30 | @NotNull
31 | private Integer roleId;
32 | private String email;
33 | }
34 |
--------------------------------------------------------------------------------
/src/test/java/node/mgr/test/base/TestBase.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package node.mgr.test.base;
18 |
19 | import com.webank.webase.node.mgr.Application;
20 | import org.junit.runner.RunWith;
21 | import org.springframework.boot.test.context.SpringBootTest;
22 | import org.springframework.test.context.junit4.SpringRunner;
23 | import org.springframework.test.context.web.WebAppConfiguration;
24 |
25 | @RunWith(SpringRunner.class)
26 | @SpringBootTest(classes = Application.class)
27 | @WebAppConfiguration
28 | public class TestBase {
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/statistic/result/PerformanceData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.statistic.result;
17 |
18 | /**
19 | * Performance data handle(DTO) of monitor and performance module
20 | * performance response to web
21 | */
22 | @lombok.Data
23 | public class PerformanceData {
24 | private String metricType;
25 | private Data data;
26 |
27 | public PerformanceData(String metricType, Data data) {
28 | this.metricType = metricType;
29 | this.data = data;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/test/java/node/mgr/test/group/GroupServiceTest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package node.mgr.test.group;
18 |
19 | import com.webank.webase.node.mgr.group.GroupService;
20 | import node.mgr.test.base.TestBase;
21 | import org.junit.Test;
22 | import org.springframework.beans.factory.annotation.Autowired;
23 |
24 | public class GroupServiceTest extends TestBase {
25 |
26 | @Autowired
27 | private GroupService groupService;
28 |
29 | @Test
30 | public void testCheckGroupGenesisSame() {
31 | groupService.resetGroupList();
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/base/enums/TableName.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.base.enums;
17 |
18 | /**
19 | * table name.
20 | */
21 | public enum TableName {
22 | BLOCK("tb_block_"),TRANS("tb_trans_hash_"),MONITOR("tb_user_transaction_monitor_");
23 | String value;
24 | TableName(String value){
25 | this.value = value;
26 | }
27 |
28 | public String getValue() {
29 | return value;
30 | }
31 | public String getTableName(int i){
32 | return value+i;
33 | };
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/account/role/TbRole.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.account.role;
17 |
18 | import java.time.LocalDateTime;
19 | import lombok.Data;
20 |
21 | /**
22 | * Entity class of table tb_role.
23 | */
24 | @Data
25 | public class TbRole {
26 |
27 | private Integer roleId;
28 | private String roleName;
29 | private String roleNameZh;
30 | private Integer roleStatus;
31 | private String description;
32 | private LocalDateTime createTime;
33 | private LocalDateTime modifyTime;
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/group/entity/ReqOperateGroup.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.webank.webase.node.mgr.group.entity;
18 |
19 | import lombok.AllArgsConstructor;
20 | import lombok.Data;
21 | import lombok.NoArgsConstructor;
22 |
23 | import javax.validation.constraints.NotBlank;
24 | import javax.validation.constraints.NotNull;
25 |
26 | @Data
27 | @NoArgsConstructor
28 | @AllArgsConstructor
29 | public class ReqOperateGroup {
30 | @NotNull
31 | private Integer generateGroupId;
32 | @NotBlank
33 | private String type;
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/group/entity/StatisticalGroupTransInfo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.node.mgr.group.entity;
17 |
18 | import java.math.BigInteger;
19 | import java.time.LocalDate;
20 | import lombok.Data;
21 |
22 | /**
23 | * The latest statistics trans on all groups.
24 | */
25 | @Data
26 | public class StatisticalGroupTransInfo {
27 | private Integer groupId;
28 | private LocalDate maxDay;
29 | private BigInteger blockNumber = BigInteger.ZERO;
30 | private BigInteger transCount = BigInteger.ZERO;
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/node/mgr/node/entity/PeerInfo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2021 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.node.mgr.node.entity;
15 |
16 | import com.fasterxml.jackson.annotation.JsonProperty;
17 | import java.util.List;
18 | import lombok.Data;
19 | import lombok.NoArgsConstructor;
20 |
21 | @Data
22 | @NoArgsConstructor
23 | public class PeerInfo {
24 |
25 | private String IPAndPort;
26 | @JsonProperty("NodeID")
27 | private String nodeId;
28 | private List