mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2026-05-05 22:56:09 +02:00
Merge pull request #5418 from gofogo/chore-code-quality-added-linters-v0
chore(codebase): add linters for json/yaml tags
This commit is contained in:
commit
f7442dc696
@ -14,6 +14,8 @@ linters:
|
||||
- unconvert
|
||||
- unused
|
||||
- whitespace
|
||||
- decorder # Check declaration order and count of types, constants, variables and functions. https://golangci-lint.run/usage/linters/#decorder
|
||||
- tagalign # Check that struct tags are well aligned. https://golangci-lint.run/usage/linters/#tagalign
|
||||
- predeclared # Find code that shadows one of Go's predeclared identifiers
|
||||
- sloglint # Ensure consistent code style when using log/slog
|
||||
- asciicheck # Checks that all code identifiers does not have non-ASCII symbols in the name
|
||||
|
||||
@ -85,13 +85,13 @@ type AlibabaCloudProvider struct {
|
||||
}
|
||||
|
||||
type alibabaCloudConfig struct {
|
||||
RegionID string `json:"regionId" yaml:"regionId"`
|
||||
AccessKeyID string `json:"accessKeyId" yaml:"accessKeyId"`
|
||||
RegionID string `json:"regionId" yaml:"regionId"`
|
||||
AccessKeyID string `json:"accessKeyId" yaml:"accessKeyId"`
|
||||
AccessKeySecret string `json:"accessKeySecret" yaml:"accessKeySecret"`
|
||||
VPCID string `json:"vpcId" yaml:"vpcId"`
|
||||
RoleName string `json:"-" yaml:"-"` // For ECS RAM role only
|
||||
StsToken string `json:"-" yaml:"-"`
|
||||
ExpireTime time.Time `json:"-" yaml:"-"`
|
||||
VPCID string `json:"vpcId" yaml:"vpcId"`
|
||||
RoleName string `json:"-" yaml:"-"` // For ECS RAM role only
|
||||
StsToken string `json:"-" yaml:"-"`
|
||||
ExpireTime time.Time `json:"-" yaml:"-"`
|
||||
}
|
||||
|
||||
// NewAlibabaCloudProvider creates a new Alibaba Cloud provider.
|
||||
|
||||
@ -35,16 +35,16 @@ import (
|
||||
|
||||
// config represents common config items for Azure DNS and Azure Private DNS
|
||||
type config struct {
|
||||
Cloud string `json:"cloud" yaml:"cloud"`
|
||||
TenantID string `json:"tenantId" yaml:"tenantId"`
|
||||
SubscriptionID string `json:"subscriptionId" yaml:"subscriptionId"`
|
||||
ResourceGroup string `json:"resourceGroup" yaml:"resourceGroup"`
|
||||
Location string `json:"location" yaml:"location"`
|
||||
ClientID string `json:"aadClientId" yaml:"aadClientId"`
|
||||
ClientSecret string `json:"aadClientSecret" yaml:"aadClientSecret"`
|
||||
UseManagedIdentityExtension bool `json:"useManagedIdentityExtension" yaml:"useManagedIdentityExtension"`
|
||||
Cloud string `json:"cloud" yaml:"cloud"`
|
||||
TenantID string `json:"tenantId" yaml:"tenantId"`
|
||||
SubscriptionID string `json:"subscriptionId" yaml:"subscriptionId"`
|
||||
ResourceGroup string `json:"resourceGroup" yaml:"resourceGroup"`
|
||||
Location string `json:"location" yaml:"location"`
|
||||
ClientID string `json:"aadClientId" yaml:"aadClientId"`
|
||||
ClientSecret string `json:"aadClientSecret" yaml:"aadClientSecret"`
|
||||
UseManagedIdentityExtension bool `json:"useManagedIdentityExtension" yaml:"useManagedIdentityExtension"`
|
||||
UseWorkloadIdentityExtension bool `json:"useWorkloadIdentityExtension" yaml:"useWorkloadIdentityExtension"`
|
||||
UserAssignedIdentityID string `json:"userAssignedIdentityID" yaml:"userAssignedIdentityID"`
|
||||
UserAssignedIdentityID string `json:"userAssignedIdentityID" yaml:"userAssignedIdentityID"`
|
||||
ActiveDirectoryAuthorityHost string `json:"activeDirectoryAuthorityHost" yaml:"activeDirectoryAuthorityHost"`
|
||||
}
|
||||
|
||||
|
||||
@ -186,11 +186,11 @@ type IBMCloudProvider struct {
|
||||
}
|
||||
|
||||
type ibmcloudConfig struct {
|
||||
Endpoint string `json:"endpoint" yaml:"endpoint"`
|
||||
APIKey string `json:"apiKey" yaml:"apiKey"`
|
||||
Endpoint string `json:"endpoint" yaml:"endpoint"`
|
||||
APIKey string `json:"apiKey" yaml:"apiKey"`
|
||||
CRN string `json:"instanceCrn" yaml:"instanceCrn"`
|
||||
IAMURL string `json:"iamUrl" yaml:"iamUrl"`
|
||||
InstanceID string `json:"-" yaml:"-"`
|
||||
IAMURL string `json:"iamUrl" yaml:"iamUrl"`
|
||||
InstanceID string `json:"-" yaml:"-"`
|
||||
}
|
||||
|
||||
// ibmcloudChange differentiates between ChangActions
|
||||
|
||||
@ -75,10 +75,10 @@ type TencentCloudProvider struct {
|
||||
}
|
||||
|
||||
type tencentCloudConfig struct {
|
||||
RegionId string `json:"regionId" yaml:"regionId"`
|
||||
SecretId string `json:"secretId" yaml:"secretId"`
|
||||
SecretKey string `json:"secretKey" yaml:"secretKey"`
|
||||
VPCId string `json:"vpcId" yaml:"vpcId"`
|
||||
RegionId string `json:"regionId" yaml:"regionId"`
|
||||
SecretId string `json:"secretId" yaml:"secretId"`
|
||||
SecretKey string `json:"secretKey" yaml:"secretKey"`
|
||||
VPCId string `json:"vpcId" yaml:"vpcId"`
|
||||
InternetEndpoint bool `json:"internetEndpoint" yaml:"internetEndpoint"`
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user