Add godot linter to harmonitze toplevel comments (#3650)

This commit is contained in:
Robert Kaussow
2024-05-13 22:58:21 +02:00
committed by GitHub
parent 83eba294c7
commit 89e100cfd1
144 changed files with 302 additions and 302 deletions

View File

@@ -77,7 +77,7 @@ type forgeFetcherContext struct {
timeout time.Duration
}
// fetch config by timeout
// fetch attempts to fetch the configuration file(s) for the given config string.
func (f *forgeFetcherContext) fetch(c context.Context, config string) ([]*types.FileMeta, error) {
ctx, cancel := context.WithTimeout(c, f.timeout)
defer cancel()

View File

@@ -31,7 +31,7 @@ type http struct {
privateKey crypto.PrivateKey
}
// configData same as forge.FileMeta but with json tags and string data
// configData same as forge.FileMeta but with json tags and string data.
type configData struct {
Name string `json:"name"`
Data string `json:"data"`

View File

@@ -16,7 +16,7 @@ package encryption
import "errors"
// common
// Common.
const (
rawKeyConfigFlag = "encryption-raw-key"
tinkKeysetFilepathConfigFlag = "encryption-tink-keyset"
@@ -39,7 +39,7 @@ var (
)
const (
// error wrapping templates
// Error wrapping templates.
errTemplateFailedInitializingUnencrypted = "failed initializing server in unencrypted mode: %w"
errTemplateFailedInitializing = "failed initializing encryption service: %w"
errTemplateFailedEnablingEncryption = "failed enabling encryption: %w"
@@ -53,13 +53,13 @@ const (
errTemplateBase64DecryptionFailed = "decryption error: Base64 decryption failed. Cause: %w"
errTemplateDecryptionFailed = "decryption error: %w"
// error messages
// Error messages.
errMessageTemplateUnsupportedKeyType = "unsupported encryption key type: %s"
errMessageCantUseBothServices = "cannot use raw encryption key and tink keyset at the same time"
errMessageNoKeysProvided = "encryption enabled but no keys provided"
errMessageFailedRotatingEncryption = "failed rotating encryption"
// log messages
// Log messages.
logMessageEncryptionEnabled = "encryption enabled"
logMessageEncryptionDisabled = "encryption disabled"
logMessageEncryptionKeyRegistered = "registered new encryption key"
@@ -69,9 +69,9 @@ const (
logMessageClientsDecrypted = "disabled encryption on registered service"
)
// tink
// Tink.
const (
// error wrapping templates
// Error wrapping templates.
errTemplateTinkFailedLoadingKeyset = "failed loading encryption keyset: %w"
errTemplateTinkFailedValidatingKeyset = "failed validating encryption keyset: %w"
errTemplateTinkFailedInitializeFileWatcher = "failed initializing keyset file watcher: %w"
@@ -80,18 +80,18 @@ const (
errTemplateTinkFailedReadingKeyset = "failed reading encryption keyset from file: %w"
errTemplateTinkFailedInitializingAEAD = "failed initializing AEAD instance: %w"
// error messages
// Error messages.
errMessageTinkKeysetFileWatchFailed = "failed watching encryption keyset file changes"
// log message templates
// Log message templates.
logTemplateTinkKeysetFileChanged = "changes detected in encryption keyset file: '%s'. Encryption service will be reloaded"
logTemplateTinkLoadingKeyset = "loading encryption keyset from file: %s"
logTemplateTinkFailedClosingKeysetFile = "could not close keyset file: %s"
)
// aes
// AES.
const (
// error wrapping templates
// Error wrapping templates.
errTemplateAesFailedLoadingCipher = "failed loading encryption cipher: %w"
errTemplateAesFailedCalculatingHash = "failed calculating hash: %w"
errTemplateAesFailedGeneratingKey = "failed generating key from passphrase: %w"

View File

@@ -21,7 +21,7 @@ import (
"github.com/rs/zerolog/log"
)
// Watch keyset file events to detect key rotations and hot reload keys
// Watch keyset file events to detect key rotations and hot reload keys.
func (svc *tinkEncryptionService) initFileWatcher() error {
watcher, err := fsnotify.NewWatcher()
if err != nil {

View File

@@ -14,7 +14,7 @@
package types
// EncryptionBuilder is user API to obtain correctly configured encryption
// EncryptionBuilder is user API to obtain correctly configured encryption.
type EncryptionBuilder interface {
WithClient(client EncryptionClient) EncryptionBuilder
Build() error

View File

@@ -30,7 +30,7 @@ type EncryptedSecretStore struct {
encryption types.EncryptionService
}
// ensure wrapper match interface
// Ensure wrapper match interface.
var _ model.SecretStore = new(EncryptedSecretStore)
func NewSecretStore(secretStore model.SecretStore) *EncryptedSecretStore {

View File

@@ -97,7 +97,7 @@ func (f *filesystem) RegistryList(_ *model.Repo, p *model.ListOptions) ([]*model
return model.ApplyPagination(p, regs), nil
}
// decodeAuth decodes a base64 encoded string and returns username and password
// decodeAuth decodes a base64 encoded string and returns username and password.
func decodeAuth(authStr string) (string, string, error) {
if authStr == "" {
return "", "", nil

View File

@@ -72,7 +72,7 @@ func setupConfigService(c *cli.Context, privateSignatureKey crypto.PrivateKey) (
return configFetcher, nil
}
// setupSignatureKeys generate or load key pair to sign webhooks requests (i.e. used for service extensions)
// setupSignatureKeys generate or load key pair to sign webhooks requests (i.e. used for service extensions).
func setupSignatureKeys(_store store.Store) (crypto.PrivateKey, crypto.PublicKey, error) {
privKeyID := "signature-private-key"