diff --git a/config/backend_plugin.go b/config/backend_plugin.go index ee78fbb7a7a..bf0f3f0ee60 100644 --- a/config/backend_plugin.go +++ b/config/backend_plugin.go @@ -1,22 +1,24 @@ -/* - * Copyright © 2015-2018 Aeneas Rekkas - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Aeneas Rekkas - * @copyright 2015-2018 Aeneas Rekkas - * @license Apache-2.0 - */ +// +// Copyright © 2015-2018 Aeneas Rekkas +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// @author Aeneas Rekkas +// @copyright 2015-2018 Aeneas Rekkas +// @license Apache-2.0 +// + +// +build !noplugin package config diff --git a/config/backend_plugin_noplugin.go b/config/backend_plugin_noplugin.go new file mode 100644 index 00000000000..bf9c404f351 --- /dev/null +++ b/config/backend_plugin_noplugin.go @@ -0,0 +1,37 @@ +// +// Copyright © 2015-2018 Gorka Lerchundi Osa +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// @author Gorka Lerchundi Osa +// @copyright 2015-2018 Gorka Lerchundi Osa +// @license Apache-2.0 +// + +// +build noplugin + +package config + +import ( + "github.com/pkg/errors" + "github.com/sirupsen/logrus" +) + +type PluginConnection struct { + Config *Config + Logger logrus.FieldLogger +} + +func (c *PluginConnection) Load() error { + return errors.New("config: unable to load plugin connection because 'noplugin' tag was declared") +}