2021-08-20 10:26:56 +00:00
|
|
|
/*
|
|
|
|
GoToSocial
|
2021-12-20 17:42:19 +00:00
|
|
|
Copyright (C) 2021-2022 GoToSocial Authors admin@gotosocial.org
|
2021-08-20 10:26:56 +00:00
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Affero General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU Affero General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2021-05-27 14:06:24 +00:00
|
|
|
package federatingdb
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"net/url"
|
|
|
|
|
|
|
|
"github.com/sirupsen/logrus"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Exists returns true if the database has an entry for the specified
|
|
|
|
// id. It may not be owned by this application instance.
|
|
|
|
//
|
|
|
|
// The library makes this call only after acquiring a lock first.
|
2021-10-04 13:24:19 +00:00
|
|
|
//
|
|
|
|
// Implementation note: this just straight up isn't implemented, and doesn't *really* need to be either.
|
2021-05-27 14:06:24 +00:00
|
|
|
func (f *federatingDB) Exists(c context.Context, id *url.URL) (exists bool, err error) {
|
2021-10-11 12:37:33 +00:00
|
|
|
l := logrus.WithFields(
|
2021-05-27 14:06:24 +00:00
|
|
|
logrus.Fields{
|
|
|
|
"func": "Exists",
|
2021-10-04 13:24:19 +00:00
|
|
|
"id": id,
|
2021-05-27 14:06:24 +00:00
|
|
|
},
|
|
|
|
)
|
2021-10-04 13:24:19 +00:00
|
|
|
l.Debug("entering Exists")
|
2021-05-27 14:06:24 +00:00
|
|
|
return false, nil
|
|
|
|
}
|