apache / dubbo-admin

The ops and reference implementation for Apache Dubbo
https://dubbo.apache.org
Apache License 2.0
3.99k stars 2.17k forks source link

Refactor go struct #1008

Closed AlbumenJ closed 1 year ago

AlbumenJ commented 1 year ago

What is the purpose of the change

➜  dubbo-admin git:(0303_refactor) tree
.
├── LICENSE
├── NOTICE
├── README.md
├── README_ZH.md
├── cmd
│   ├── admin
│   │   ├── README.md
│   │   └── main.go
│   └── authority
│       └── main.go
├── coverage.txt
├── deploy
│   ├── admin
│   │   └── conf
│   │       └── dubboadmin.yml
│   ├── charts
│   │   └── admin-stack
│   │       ├── Chart.yaml
│   │       ├── README.md
│   │       └── charts
│   ├── crd.yaml
│   ├── deployment.yml
│   ├── docker
│   │   └── authority
│   │       └── Dockerfile
│   ├── example-peerauthentication.yaml
│   ├── kubernetes
│   │   ├── dubbo-admin
│   │   ├── grafana
│   │   ├── nacos
│   │   ├── prometheus
│   │   └── zookeeper
│   └── permission.yml
├── docs
│   └── images
├── dubbo-admin-ui
├── go.mod
├── go.sum
└── pkg
    ├── admin
    │   ├── cache
    │   │   └── interface_registry_cache.go
    │   ├── config
    │   │   ├── address_config.go
    │   │   └── config.go
    │   ├── constant
    │   │   └── const.go
    │   ├── handlers
    │   │   └── service.go
    │   ├── imports
    │   │   └── imports.go
    │   ├── model
    │   │   ├── entity.go
    │   │   ├── provider.go
    │   │   └── registry_source.go
    │   ├── router
    │   │   └── router.go
    │   ├── services
    │   │   ├── provider_service.go
    │   │   ├── provider_service_impl.go
    │   │   └── registry_service_sync.go
    │   └── util
    │       ├── Tool.go
    │       ├── base_service_metadata.go
    │       ├── hash.go
    │       └── sync_utils.go
    └── authority
        ├── apis
        │   └── dubbo.apache.org
        │       └── v1beta1
        │           ├── doc.go
        │           ├── register.go
        │           ├── type.go
        │           └── zz_generated.deepcopy.go
        ├── cert
        │   ├── storage.go
        │   ├── storage_test.go
        │   ├── util.go
        │   └── util_test.go
        ├── config
        │   └── options.go
        ├── generated
        │   ├── applyconfiguration
        │   │   ├── dubbo.apache.org
        │   │   │   └── v1beta1
        │   │   │       ├── authenticationpolicy.go
        │   │   │       ├── authenticationpolicyextend.go
        │   │   │       ├── authenticationpolicyrule.go
        │   │   │       ├── authenticationpolicysource.go
        │   │   │       ├── authenticationpolicyspec.go
        │   │   │       ├── authenticationpolicytarget.go
        │   │   │       ├── authorizationpolicy.go
        │   │   │       ├── authorizationpolicycondition.go
        │   │   │       ├── authorizationpolicyextend.go
        │   │   │       ├── authorizationpolicymatch.go
        │   │   │       ├── authorizationpolicyrule.go
        │   │   │       ├── authorizationpolicysource.go
        │   │   │       ├── authorizationpolicyspec.go
        │   │   │       └── authorizationpolicytarget.go
        │   │   ├── internal
        │   │   │   └── internal.go
        │   │   └── utils.go
        │   ├── clientset
        │   │   └── versioned
        │   │       ├── clientset.go
        │   │       ├── fake
        │   │       │   ├── clientset_generated.go
        │   │       │   ├── doc.go
        │   │       │   └── register.go
        │   │       ├── scheme
        │   │       │   ├── doc.go
        │   │       │   └── register.go
        │   │       └── typed
        │   │           └── dubbo.apache.org
        │   │               └── v1beta1
        │   │                   ├── authenticationpolicy.go
        │   │                   ├── authorizationpolicy.go
        │   │                   ├── doc.go
        │   │                   ├── dubbo.apache.org_client.go
        │   │                   ├── fake
        │   │                   │   ├── doc.go
        │   │                   │   ├── fake_authenticationpolicy.go
        │   │                   │   ├── fake_authorizationpolicy.go
        │   │                   │   └── fake_dubbo.apache.org_client.go
        │   │                   └── generated_expansion.go
        │   ├── informers
        │   │   └── externalversions
        │   │       ├── dubbo.apache.org
        │   │       │   ├── interface.go
        │   │       │   └── v1beta1
        │   │       │       ├── authenticationpolicy.go
        │   │       │       ├── authorizationpolicy.go
        │   │       │       └── interface.go
        │   │       ├── factory.go
        │   │       ├── generic.go
        │   │       └── internalinterfaces
        │   │           └── factory_interfaces.go
        │   └── listers
        │       └── dubbo.apache.org
        │           └── v1beta1
        │               ├── authenticationpolicy.go
        │               ├── authorizationpolicy.go
        │               └── expansion_generated.go
        ├── k8s
        │   ├── client.go
        │   ├── controller.go
        │   └── controller_test.go
        ├── logger
        │   └── log.go
        ├── patch
        │   ├── javasdk.go
        │   └── javasdk_test.go
        ├── rule
        │   ├── authentication
        │   │   ├── definition.go
        │   │   └── handler.go
        │   └── authorization
        │       ├── definition.go
        │       └── handler.go
        ├── security
        │   ├── server.go
        │   └── server_test.go
        ├── v1alpha1
        │   ├── ca.pb.go
        │   ├── ca.proto
        │   ├── ca_grpc.pb.go
        │   ├── ca_impl.go
        │   └── ca_impl_test.go
        └── webhook
            └── server.go

Brief changelog

XX

Verifying this change

XXXX

Follow this checklist to help us incorporate your contribution quickly and easily:

codecov-commenter commented 1 year ago

Codecov Report

Merging #1008 (def4262) into refactor-with-go (5b14d8f) will not change coverage. The diff coverage is 30.55%.

:exclamation: Current head def4262 differs from pull request most recent head c9469ec. Consider uploading reports for the commit c9469ec to get more accurate results

Impacted file tree graph

@@                Coverage Diff                @@
##           refactor-with-go    #1008   +/-   ##
=================================================
  Coverage             32.21%   32.21%           
=================================================
  Files                     9        9           
  Lines                  1164     1164           
=================================================
  Hits                    375      375           
  Misses                  757      757           
  Partials                 32       32           
Impacted Files Coverage Δ
pkg/authority/cert/storage.go 77.77% <ø> (ø)
pkg/authority/cert/util.go 77.55% <ø> (ø)
pkg/authority/k8s/client.go 0.00% <ø> (ø)
pkg/authority/k8s/controller.go 0.00% <0.00%> (ø)
pkg/authority/patch/javasdk.go 75.75% <ø> (ø)
pkg/authority/v1alpha1/ca.pb.go 7.29% <ø> (ø)
pkg/authority/v1alpha1/ca_grpc.pb.go 0.00% <ø> (ø)
pkg/authority/security/server.go 57.84% <90.00%> (ø)
pkg/authority/v1alpha1/ca_impl.go 78.57% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5b14d8f...c9469ec. Read the comment docs.

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information