Skip to content

Commit

Permalink
Move internal packages to an internal folder
Browse files Browse the repository at this point in the history
  • Loading branch information
fguillot committed Aug 11, 2023
1 parent c234903 commit dd4bdb0
Show file tree
Hide file tree
Showing 433 changed files with 1,122 additions and 1,124 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ DOCKER_IMAGE := miniflux/miniflux
VERSION := $(shell git describe --tags --abbrev=0)
COMMIT := $(shell git rev-parse --short HEAD)
BUILD_DATE := `date +%FT%T%z`
LD_FLAGS := "-s -w -X 'miniflux.app/v2/version.Version=$(VERSION)' -X 'miniflux.app/v2/version.Commit=$(COMMIT)' -X 'miniflux.app/v2/version.BuildDate=$(BUILD_DATE)'"
LD_FLAGS := "-s -w -X 'miniflux.app/v2/internal/version.Version=$(VERSION)' -X 'miniflux.app/v2/internal/version.Commit=$(COMMIT)' -X 'miniflux.app/v2/internal/version.BuildDate=$(BUILD_DATE)'"
PKG_LIST := $(shell go list ./... | grep -v /vendor/)
DB_URL := postgres://postgres:postgres@localhost/miniflux_test?sslmode=disable
DEB_IMG_ARCH := amd64
Expand Down Expand Up @@ -122,7 +122,7 @@ integration-test:
./miniflux-test >/tmp/miniflux.log 2>&1 & echo "$$!" > "/tmp/miniflux.pid"

while ! nc -z localhost 8080; do sleep 1; done
go test -v -tags=integration -count=1 miniflux.app/v2/tests
go test -v -tags=integration -count=1 miniflux.app/v2/internal/tests

clean-integration-test:
@ kill -9 `cat /tmp/miniflux.pid`
Expand Down
4 changes: 2 additions & 2 deletions client/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Miniflux API Client
===================

[![PkgGoDev](https://pkg.go.dev/badge/miniflux.app/client)](https://pkg.go.dev/miniflux.app/client)
[![PkgGoDev](https://pkg.go.dev/badge/miniflux.app/v2/client)](https://pkg.go.dev/miniflux.app/v2/client)

Client library for Miniflux REST API.

Installation
------------

```bash
go get -u miniflux.app/client
go get -u miniflux.app/v2/client
```

Example
Expand Down
6 changes: 3 additions & 3 deletions api/api.go → internal/api/api.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package api // import "miniflux.app/v2/api"
package api // import "miniflux.app/v2/internal/api"

import (
"net/http"

"miniflux.app/v2/storage"
"miniflux.app/v2/worker"
"miniflux.app/v2/internal/storage"
"miniflux.app/v2/internal/worker"

"github.com/gorilla/mux"
)
Expand Down
10 changes: 5 additions & 5 deletions api/category.go → internal/api/category.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package api // import "miniflux.app/v2/api"
package api // import "miniflux.app/v2/internal/api"

import (
json_parser "encoding/json"
"net/http"
"time"

"miniflux.app/v2/http/request"
"miniflux.app/v2/http/response/json"
"miniflux.app/v2/model"
"miniflux.app/v2/validator"
"miniflux.app/v2/internal/http/request"
"miniflux.app/v2/internal/http/response/json"
"miniflux.app/v2/internal/model"
"miniflux.app/v2/internal/validator"
)

func (h *handler) createCategory(w http.ResponseWriter, r *http.Request) {
Expand Down
22 changes: 11 additions & 11 deletions api/entry.go → internal/api/entry.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package api // import "miniflux.app/v2/api"
package api // import "miniflux.app/v2/internal/api"

import (
json_parser "encoding/json"
Expand All @@ -11,16 +11,16 @@ import (
"strings"
"time"

"miniflux.app/v2/config"
"miniflux.app/v2/http/request"
"miniflux.app/v2/http/response/json"
"miniflux.app/v2/integration"
"miniflux.app/v2/model"
"miniflux.app/v2/proxy"
"miniflux.app/v2/reader/processor"
"miniflux.app/v2/storage"
"miniflux.app/v2/url"
"miniflux.app/v2/validator"
"miniflux.app/v2/internal/config"
"miniflux.app/v2/internal/http/request"
"miniflux.app/v2/internal/http/response/json"
"miniflux.app/v2/internal/integration"
"miniflux.app/v2/internal/model"
"miniflux.app/v2/internal/proxy"
"miniflux.app/v2/internal/reader/processor"
"miniflux.app/v2/internal/storage"
"miniflux.app/v2/internal/url"
"miniflux.app/v2/internal/validator"
)

func (h *handler) getEntryFromBuilder(w http.ResponseWriter, r *http.Request, b *storage.EntryQueryBuilder) {
Expand Down
12 changes: 6 additions & 6 deletions api/feed.go → internal/api/feed.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package api // import "miniflux.app/v2/api"
package api // import "miniflux.app/v2/internal/api"

import (
json_parser "encoding/json"
"net/http"
"time"

"miniflux.app/v2/http/request"
"miniflux.app/v2/http/response/json"
"miniflux.app/v2/model"
feedHandler "miniflux.app/v2/reader/handler"
"miniflux.app/v2/validator"
"miniflux.app/v2/internal/http/request"
"miniflux.app/v2/internal/http/response/json"
"miniflux.app/v2/internal/model"
feedHandler "miniflux.app/v2/internal/reader/handler"
"miniflux.app/v2/internal/validator"
)

func (h *handler) createFeed(w http.ResponseWriter, r *http.Request) {
Expand Down
6 changes: 3 additions & 3 deletions api/icon.go → internal/api/icon.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package api // import "miniflux.app/v2/api"
package api // import "miniflux.app/v2/internal/api"

import (
"net/http"

"miniflux.app/v2/http/request"
"miniflux.app/v2/http/response/json"
"miniflux.app/v2/internal/http/request"
"miniflux.app/v2/internal/http/response/json"
)

func (h *handler) feedIcon(w http.ResponseWriter, r *http.Request) {
Expand Down
10 changes: 5 additions & 5 deletions api/middleware.go → internal/api/middleware.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package api // import "miniflux.app/v2/api"
package api // import "miniflux.app/v2/internal/api"

import (
"context"
"net/http"

"miniflux.app/v2/http/request"
"miniflux.app/v2/http/response/json"
"miniflux.app/v2/logger"
"miniflux.app/v2/storage"
"miniflux.app/v2/internal/http/request"
"miniflux.app/v2/internal/http/response/json"
"miniflux.app/v2/internal/logger"
"miniflux.app/v2/internal/storage"
)

type middleware struct {
Expand Down
10 changes: 5 additions & 5 deletions api/opml.go → internal/api/opml.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package api // import "miniflux.app/v2/api"
package api // import "miniflux.app/v2/internal/api"

import (
"net/http"

"miniflux.app/v2/http/request"
"miniflux.app/v2/http/response/json"
"miniflux.app/v2/http/response/xml"
"miniflux.app/v2/reader/opml"
"miniflux.app/v2/internal/http/request"
"miniflux.app/v2/internal/http/response/json"
"miniflux.app/v2/internal/http/response/xml"
"miniflux.app/v2/internal/reader/opml"
)

func (h *handler) exportFeeds(w http.ResponseWriter, r *http.Request) {
Expand Down
4 changes: 2 additions & 2 deletions api/payload.go → internal/api/payload.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package api // import "miniflux.app/v2/api"
package api // import "miniflux.app/v2/internal/api"

import (
"miniflux.app/v2/model"
"miniflux.app/v2/internal/model"
)

type feedIconResponse struct {
Expand Down
10 changes: 5 additions & 5 deletions api/subscription.go → internal/api/subscription.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package api // import "miniflux.app/v2/api"
package api // import "miniflux.app/v2/internal/api"

import (
json_parser "encoding/json"
"net/http"

"miniflux.app/v2/http/response/json"
"miniflux.app/v2/model"
"miniflux.app/v2/reader/subscription"
"miniflux.app/v2/validator"
"miniflux.app/v2/internal/http/response/json"
"miniflux.app/v2/internal/model"
"miniflux.app/v2/internal/reader/subscription"
"miniflux.app/v2/internal/validator"
)

func (h *handler) discoverSubscriptions(w http.ResponseWriter, r *http.Request) {
Expand Down
10 changes: 5 additions & 5 deletions api/user.go → internal/api/user.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package api // import "miniflux.app/v2/api"
package api // import "miniflux.app/v2/internal/api"

import (
json_parser "encoding/json"
"errors"
"net/http"

"miniflux.app/v2/http/request"
"miniflux.app/v2/http/response/json"
"miniflux.app/v2/model"
"miniflux.app/v2/validator"
"miniflux.app/v2/internal/http/request"
"miniflux.app/v2/internal/http/response/json"
"miniflux.app/v2/internal/model"
"miniflux.app/v2/internal/validator"
)

func (h *handler) currentUser(w http.ResponseWriter, r *http.Request) {
Expand Down
2 changes: 1 addition & 1 deletion cli/ask_credentials.go → internal/cli/ask_credentials.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package cli // import "miniflux.app/v2/cli"
package cli // import "miniflux.app/v2/internal/cli"

import (
"bufio"
Expand Down
12 changes: 6 additions & 6 deletions cli/cleanup_tasks.go → internal/cli/cleanup_tasks.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package cli // import "miniflux.app/v2/cli"
package cli // import "miniflux.app/v2/internal/cli"

import (
"time"

"miniflux.app/v2/config"
"miniflux.app/v2/logger"
"miniflux.app/v2/metric"
"miniflux.app/v2/model"
"miniflux.app/v2/storage"
"miniflux.app/v2/internal/config"
"miniflux.app/v2/internal/logger"
"miniflux.app/v2/internal/metric"
"miniflux.app/v2/internal/model"
"miniflux.app/v2/internal/storage"
)

func runCleanupTasks(store *storage.Storage) {
Expand Down
16 changes: 8 additions & 8 deletions cli/cli.go → internal/cli/cli.go
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package cli // import "miniflux.app/v2/cli"
package cli // import "miniflux.app/v2/internal/cli"

import (
"flag"
"fmt"

"miniflux.app/v2/config"
"miniflux.app/v2/database"
"miniflux.app/v2/locale"
"miniflux.app/v2/logger"
"miniflux.app/v2/storage"
"miniflux.app/v2/ui/static"
"miniflux.app/v2/version"
"miniflux.app/v2/internal/config"
"miniflux.app/v2/internal/database"
"miniflux.app/v2/internal/locale"
"miniflux.app/v2/internal/logger"
"miniflux.app/v2/internal/storage"
"miniflux.app/v2/internal/ui/static"
"miniflux.app/v2/internal/version"
)

const (
Expand Down
12 changes: 6 additions & 6 deletions cli/create_admin.go → internal/cli/create_admin.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package cli // import "miniflux.app/v2/cli"
package cli // import "miniflux.app/v2/internal/cli"

import (
"fmt"
"os"

"miniflux.app/v2/config"
"miniflux.app/v2/logger"
"miniflux.app/v2/model"
"miniflux.app/v2/storage"
"miniflux.app/v2/validator"
"miniflux.app/v2/internal/config"
"miniflux.app/v2/internal/logger"
"miniflux.app/v2/internal/model"
"miniflux.app/v2/internal/storage"
"miniflux.app/v2/internal/validator"
)

func createAdmin(store *storage.Storage) {
Expand Down
16 changes: 8 additions & 8 deletions cli/daemon.go → internal/cli/daemon.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package cli // import "miniflux.app/v2/cli"
package cli // import "miniflux.app/v2/internal/cli"

import (
"context"
Expand All @@ -11,13 +11,13 @@ import (
"syscall"
"time"

"miniflux.app/v2/config"
httpd "miniflux.app/v2/http/server"
"miniflux.app/v2/logger"
"miniflux.app/v2/metric"
"miniflux.app/v2/storage"
"miniflux.app/v2/systemd"
"miniflux.app/v2/worker"
"miniflux.app/v2/internal/config"
httpd "miniflux.app/v2/internal/http/server"
"miniflux.app/v2/internal/logger"
"miniflux.app/v2/internal/metric"
"miniflux.app/v2/internal/storage"
"miniflux.app/v2/internal/systemd"
"miniflux.app/v2/internal/worker"
)

func startDaemon(store *storage.Storage) {
Expand Down
4 changes: 2 additions & 2 deletions cli/flush_sessions.go → internal/cli/flush_sessions.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package cli // import "miniflux.app/v2/cli"
package cli // import "miniflux.app/v2/internal/cli"

import (
"fmt"
"os"

"miniflux.app/v2/storage"
"miniflux.app/v2/internal/storage"
)

func flushSessions(store *storage.Storage) {
Expand Down
Loading

0 comments on commit dd4bdb0

Please sign in to comment.