chore: update linter.
This commit is contained in:
parent
9023b046d8
commit
7414ec328c
@ -31,6 +31,8 @@
|
|||||||
"scopelint",
|
"scopelint",
|
||||||
"wsl",
|
"wsl",
|
||||||
"gomnd",
|
"gomnd",
|
||||||
|
"testpackage",
|
||||||
|
"goerr113",
|
||||||
]
|
]
|
||||||
|
|
||||||
[issues]
|
[issues]
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
// boltdbCmd represents the boltdb command
|
// boltdbCmd represents the boltdb command.
|
||||||
var boltdbCmd = &cobra.Command{
|
var boltdbCmd = &cobra.Command{
|
||||||
Use: "boltdb",
|
Use: "boltdb",
|
||||||
Short: "Dump the content of BoltDB.",
|
Short: "Dump the content of BoltDB.",
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
// consulCmd represents the consul command
|
// consulCmd represents the consul command.
|
||||||
var consulCmd = &cobra.Command{
|
var consulCmd = &cobra.Command{
|
||||||
Use: "consul",
|
Use: "consul",
|
||||||
Short: "Dump the content of Consul.",
|
Short: "Dump the content of Consul.",
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import (
|
|||||||
"github.com/spf13/cobra/doc"
|
"github.com/spf13/cobra/doc"
|
||||||
)
|
)
|
||||||
|
|
||||||
// docCmd represents the doc command
|
// docCmd represents the doc command.
|
||||||
var docCmd = &cobra.Command{
|
var docCmd = &cobra.Command{
|
||||||
Use: "doc",
|
Use: "doc",
|
||||||
Short: "Generate documentation",
|
Short: "Generate documentation",
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
// etcdCmd represents the etcd command
|
// etcdCmd represents the etcd command.
|
||||||
var etcdCmd = &cobra.Command{
|
var etcdCmd = &cobra.Command{
|
||||||
Use: "etcd",
|
Use: "etcd",
|
||||||
Short: "Dump the content of etcd.",
|
Short: "Dump the content of etcd.",
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
// fileCmd represents the file command
|
// fileCmd represents the file command.
|
||||||
var fileCmd = &cobra.Command{
|
var fileCmd = &cobra.Command{
|
||||||
Use: "file",
|
Use: "file",
|
||||||
Short: `Dump the content of the "acme.json" file.`,
|
Short: `Dump the content of the "acme.json" file.`,
|
||||||
|
|||||||
@ -14,7 +14,7 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
// kvCmd represents the kv command
|
// kvCmd represents the kv command.
|
||||||
var kvCmd = &cobra.Command{
|
var kvCmd = &cobra.Command{
|
||||||
Use: "kv",
|
Use: "kv",
|
||||||
Short: `Dump the content of a KV store.`,
|
Short: `Dump the content of a KV store.`,
|
||||||
|
|||||||
@ -16,7 +16,7 @@ import (
|
|||||||
|
|
||||||
var cfgFile string
|
var cfgFile string
|
||||||
|
|
||||||
// rootCmd represents the base command when called without any subcommands
|
// rootCmd represents the base command when called without any subcommands.
|
||||||
var rootCmd = &cobra.Command{
|
var rootCmd = &cobra.Command{
|
||||||
Use: "traefik-certs-dumper",
|
Use: "traefik-certs-dumper",
|
||||||
Short: "Dump Let's Encrypt certificates from Traefik.",
|
Short: "Dump Let's Encrypt certificates from Traefik.",
|
||||||
|
|||||||
@ -13,7 +13,7 @@ var (
|
|||||||
date = "I don't remember exactly"
|
date = "I don't remember exactly"
|
||||||
)
|
)
|
||||||
|
|
||||||
// versionCmd represents the version command
|
// versionCmd represents the version command.
|
||||||
var versionCmd = &cobra.Command{
|
var versionCmd = &cobra.Command{
|
||||||
Use: "version",
|
Use: "version",
|
||||||
Short: "Display version",
|
Short: "Display version",
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
// zookeeperCmd represents the zookeeper command
|
// zookeeperCmd represents the zookeeper command.
|
||||||
var zookeeperCmd = &cobra.Command{
|
var zookeeperCmd = &cobra.Command{
|
||||||
Use: "zookeeper",
|
Use: "zookeeper",
|
||||||
Short: "Dump the content of zookeeper.",
|
Short: "Dump the content of zookeeper.",
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import (
|
|||||||
v1 "github.com/ldez/traefik-certs-dumper/v2/dumper/v1"
|
v1 "github.com/ldez/traefik-certs-dumper/v2/dumper/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// CertificateOld is used to store certificate info
|
// CertificateOld is used to store certificate info.
|
||||||
type CertificateOld struct {
|
type CertificateOld struct {
|
||||||
Domain string
|
Domain string
|
||||||
CertURL string
|
CertURL string
|
||||||
@ -15,7 +15,7 @@ type CertificateOld struct {
|
|||||||
Certificate []byte
|
Certificate []byte
|
||||||
}
|
}
|
||||||
|
|
||||||
// AccountOld is used to store lets encrypt registration info
|
// AccountOld is used to store lets encrypt registration info.
|
||||||
type AccountOld struct {
|
type AccountOld struct {
|
||||||
Email string
|
Email string
|
||||||
Registration *registration.Resource
|
Registration *registration.Resource
|
||||||
@ -26,18 +26,18 @@ type AccountOld struct {
|
|||||||
HTTPChallenge map[string]map[string][]byte
|
HTTPChallenge map[string]map[string][]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
// DomainsCertificates stores a certificate for multiple domains
|
// DomainsCertificates stores a certificate for multiple domains.
|
||||||
type DomainsCertificates struct {
|
type DomainsCertificates struct {
|
||||||
Certs []*DomainsCertificate
|
Certs []*DomainsCertificate
|
||||||
}
|
}
|
||||||
|
|
||||||
// ChallengeCert stores a challenge certificate
|
// ChallengeCert stores a challenge certificate.
|
||||||
type ChallengeCert struct {
|
type ChallengeCert struct {
|
||||||
Certificate []byte
|
Certificate []byte
|
||||||
PrivateKey []byte
|
PrivateKey []byte
|
||||||
}
|
}
|
||||||
|
|
||||||
// DomainsCertificate contains a certificate for multiple domains
|
// DomainsCertificate contains a certificate for multiple domains.
|
||||||
type DomainsCertificate struct {
|
type DomainsCertificate struct {
|
||||||
Domains v1.Domain
|
Domains v1.Domain
|
||||||
Certificate *CertificateOld
|
Certificate *CertificateOld
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import (
|
|||||||
"github.com/go-acme/lego/v3/registration"
|
"github.com/go-acme/lego/v3/registration"
|
||||||
)
|
)
|
||||||
|
|
||||||
// StoredData represents the data managed by the Store
|
// StoredData represents the data managed by the Store.
|
||||||
type StoredData struct {
|
type StoredData struct {
|
||||||
Account *Account
|
Account *Account
|
||||||
Certificates []*Certificate
|
Certificates []*Certificate
|
||||||
@ -13,20 +13,20 @@ type StoredData struct {
|
|||||||
TLSChallenges map[string]*Certificate
|
TLSChallenges map[string]*Certificate
|
||||||
}
|
}
|
||||||
|
|
||||||
// Certificate is a struct which contains all data needed from an ACME certificate
|
// Certificate is a struct which contains all data needed from an ACME certificate.
|
||||||
type Certificate struct {
|
type Certificate struct {
|
||||||
Domain Domain
|
Domain Domain
|
||||||
Certificate []byte
|
Certificate []byte
|
||||||
Key []byte
|
Key []byte
|
||||||
}
|
}
|
||||||
|
|
||||||
// Domain holds a domain name with SANs
|
// Domain holds a domain name with SANs.
|
||||||
type Domain struct {
|
type Domain struct {
|
||||||
Main string
|
Main string
|
||||||
SANs []string
|
SANs []string
|
||||||
}
|
}
|
||||||
|
|
||||||
// Account is used to store lets encrypt registration info
|
// Account is used to store lets encrypt registration info.
|
||||||
type Account struct {
|
type Account struct {
|
||||||
Email string
|
Email string
|
||||||
Registration *registration.Resource
|
Registration *registration.Resource
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user