Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix linting #4578

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/http/services/owncloud/ocdav/ocdav.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ type Config struct {
FavoriteStorageDrivers map[string]map[string]interface{} `mapstructure:"favorite_storage_drivers"`
PublicLinkDownload *ConfigPublicLinkDownload `mapstructure:"publiclink_download"`
DisabledOpenInAppPaths []string `mapstructure:"disabled_open_in_app_paths"`
Notifications map[string]interface{} `mapstructure:"notifications" docs:"Settings for the Notification Helper"`
Notifications map[string]interface{} `docs:"Settings for the Notification Helper" mapstructure:"notifications"`
}

func (c *Config) ApplyDefaults() {
Expand Down
10 changes: 5 additions & 5 deletions pkg/notification/handler/emailhandler/emailhandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ type EmailHandler struct {
}

type config struct {
SMTPAddress string `mapstructure:"smtp_server" docs:";The hostname and port of the SMTP server."`
SenderLogin string `mapstructure:"sender_login" docs:";The email to be used to send mails."`
SenderPassword string `mapstructure:"sender_password" docs:";The sender's password."`
DisableAuth bool `mapstructure:"disable_auth" docs:"false;Whether to disable SMTP auth."`
DefaultSender string `mapstructure:"default_sender" docs:"[email protected];Default sender when not specified in the trigger."`
SMTPAddress string `docs:";The hostname and port of the SMTP server." mapstructure:"smtp_server"`
SenderLogin string `docs:";The email to be used to send mails." mapstructure:"sender_login"`
SenderPassword string `docs:";The sender's password." mapstructure:"sender_password"`
DisableAuth bool `docs:"false;Whether to disable SMTP auth." mapstructure:"disable_auth"`
DefaultSender string `docs:"[email protected];Default sender when not specified in the trigger." mapstructure:"default_sender"`
}

func (c *config) ApplyDefaults() {
Expand Down
10 changes: 5 additions & 5 deletions pkg/notification/notificationhelper/notificationhelper.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ type NotificationHelper struct {

// Config contains the configuration for the Notification Helper.
type Config struct {
NatsAddress string `mapstructure:"nats_address" docs:";The NATS server address."`
NatsToken string `mapstructure:"nats_token" docs:";The token to authenticate against the NATS server"`
NatsStream string `mapstructure:"nats_stream" docs:"reva-notifications;The notifications NATS stream."`
Templates map[string]interface{} `mapstructure:"templates" docs:";Notification templates for the service."`
NatsAddress string `docs:";The NATS server address." mapstructure:"nats_address"`
NatsToken string `docs:";The token to authenticate against the NATS server" mapstructure:"nats_token"`
NatsStream string `docs:"reva-notifications;The notifications NATS stream." mapstructure:"nats_stream"`
Templates map[string]interface{} `docs:";Notification templates for the service." mapstructure:"templates"`
}

func defaultConfig() *Config {
Expand Down Expand Up @@ -130,7 +130,7 @@ func (nh *NotificationHelper) Stop() {
return
}
if err := nh.nc.Drain(); err != nil {
nh.Log.Error().Err(err)
nh.Log.Error().Err(err).Msg("error drainning connection")
}
}

Expand Down
10 changes: 5 additions & 5 deletions pkg/notification/template/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ const validTemplateNameRegex = "[a-zA-Z0-9-]"

// RegistrationRequest represents a Template registration request.
type RegistrationRequest struct {
Name string `mapstructure:"name" json:"name"`
Handler string `mapstructure:"handler" json:"handler"`
BodyTmplPath string `mapstructure:"body_template_path" json:"body_template_path"`
SubjectTmplPath string `mapstructure:"subject_template_path" json:"subject_template_path"`
Persistent bool `mapstructure:"persistent" json:"persistent"`
Name string `json:"name" mapstructure:"name"`
Handler string `json:"handler" mapstructure:"handler"`
BodyTmplPath string `json:"body_template_path" mapstructure:"body_template_path"`
SubjectTmplPath string `json:"subject_template_path" mapstructure:"subject_template_path"`
Persistent bool `json:"persistent" mapstructure:"persistent"`
}

// Template represents a notification template.
Expand Down
Loading