Documentation ¶
Overview ¶
mongoplayground: a sandbox to test and share MongoDB queries Copyright (C) 2023 Adrien Petel
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/>.
mongoplayground: a sandbox to test and share MongoDB queries Copyright (C) 2022 Adrien Petel
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/>.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewServer ¶
func NewServer(mongoUri string, dropFirst bool, cloudflareInfo *CloudflareInfo, mailInfo *MailInfo, googleDriveInfo *GoogleDriveInfo) (*http.Server, error)
NewServer initialize a badger and a mongodb connection, and return an http server
Types ¶
type CloudflareInfo ¶
type CloudflareInfo struct {
// contains filtered or unexported fields
}
func NewCloudflareInfo ¶
func NewCloudflareInfo(zoneID, apiToken string) *CloudflareInfo
type GoogleDriveInfo ¶
type GoogleDriveInfo struct {
// contains filtered or unexported fields
}
func NewGoogleDriveInfo ¶
func NewGoogleDriveInfo(dir string, token, credentials any) *GoogleDriveInfo
type LokiLogger ¶
type LokiLogger struct {
// contains filtered or unexported fields
}
func NewLokiLogger ¶
func NewLokiLogger(host string, port int) *LokiLogger
func (*LokiLogger) Send ¶
func (l *LokiLogger) Send() error
Send send the logs in the buffer to loki. The message sent looks like this:
{ "streams": [ { "stream": { "app": "mongoplayground" }, "values": [ [ "1633228233000000000", "fail to load page with id v : invalid page id length" ], [ "1633228235000000000", "fail to load page with id vk : invalid page id length" ] ] } ] }