Skip to content

Commit

Permalink
feat: Make flag DTO public (#2376)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaspoignant authored Sep 19, 2024
1 parent c42b045 commit 7e20e6a
Show file tree
Hide file tree
Showing 17 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cmd/editor/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ package main

import (
echoadapter "github.com/awslabs/aws-lambda-go-api-proxy/echo"
"github.com/thomaspoignant/go-feature-flag/model/dto"
"net/http"
"os"

"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
custommiddleware "github.com/thomaspoignant/go-feature-flag/cmd/relayproxy/api/middleware"
"github.com/thomaspoignant/go-feature-flag/cmd/relayproxy/log"
"github.com/thomaspoignant/go-feature-flag/internal/dto"
"github.com/thomaspoignant/go-feature-flag/internal/flag"
"github.com/thomaspoignant/go-feature-flag/internal/utils"
"github.com/thomaspoignant/go-feature-flag/model"
Expand Down
2 changes: 1 addition & 1 deletion cmd/jsonschema-generator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"github.com/invopop/jsonschema"
"github.com/jessevdk/go-flags"
"github.com/thomaspoignant/go-feature-flag/internal/dto"
"github.com/thomaspoignant/go-feature-flag/model/dto"
"log"
"os"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/lint/linter.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package main
import (
"encoding/json"
"fmt"
"github.com/thomaspoignant/go-feature-flag/model/dto"
"os"
"strings"

"github.com/BurntSushi/toml"
"github.com/thomaspoignant/go-feature-flag/internal/dto"
"k8s.io/apimachinery/pkg/util/yaml"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/migrationcli/converter/converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import (
"bytes"
"encoding/json"
"fmt"
"github.com/thomaspoignant/go-feature-flag/model/dto"
"os"
"strings"

"github.com/BurntSushi/toml"

"github.com/thomaspoignant/go-feature-flag/internal/dto"
"github.com/thomaspoignant/go-feature-flag/internal/flag"
"gopkg.in/yaml.v3"
)
Expand Down
2 changes: 1 addition & 1 deletion feature_flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package ffclient
import (
"context"
"fmt"
"github.com/thomaspoignant/go-feature-flag/model/dto"
"github.com/thomaspoignant/go-feature-flag/retriever/fileretriever"
"log"
"log/slog"
Expand All @@ -11,7 +12,6 @@ import (
"time"

"github.com/thomaspoignant/go-feature-flag/exporter"
"github.com/thomaspoignant/go-feature-flag/internal/dto"
"github.com/thomaspoignant/go-feature-flag/retriever"
"github.com/thomaspoignant/go-feature-flag/utils/fflog"

Expand Down
2 changes: 1 addition & 1 deletion internal/cache/cache.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package cache

import (
"github.com/thomaspoignant/go-feature-flag/internal/dto"
"github.com/thomaspoignant/go-feature-flag/internal/flag"
"github.com/thomaspoignant/go-feature-flag/model/dto"
)

// Cache is the interface to represent a cache in the system.
Expand Down
3 changes: 1 addition & 2 deletions internal/cache/cache_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"encoding/json"
"errors"
"github.com/google/go-cmp/cmp"
"github.com/thomaspoignant/go-feature-flag/model/dto"
"github.com/thomaspoignant/go-feature-flag/utils/fflog"
"log/slog"
"os"
Expand All @@ -13,8 +14,6 @@ import (

"github.com/BurntSushi/toml"

"github.com/thomaspoignant/go-feature-flag/internal/dto"

"github.com/thomaspoignant/go-feature-flag/internal/flag"
"gopkg.in/yaml.v3"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/cache/cache_manager_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cache_test

import (
"github.com/thomaspoignant/go-feature-flag/internal/dto"
"github.com/thomaspoignant/go-feature-flag/model/dto"
"github.com/thomaspoignant/go-feature-flag/utils/fflog"
"gopkg.in/yaml.v3"
"log/slog"
Expand Down
2 changes: 1 addition & 1 deletion internal/cache/in_memory_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cache

import (
"fmt"
"github.com/thomaspoignant/go-feature-flag/internal/dto"
"github.com/thomaspoignant/go-feature-flag/model/dto"
"github.com/thomaspoignant/go-feature-flag/utils/fflog"
"log/slog"

Expand Down
2 changes: 1 addition & 1 deletion internal/cache/in_memory_cache_test.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package cache_test

import (
"github.com/thomaspoignant/go-feature-flag/model/dto"
"testing"

"github.com/stretchr/testify/assert"
"github.com/thomaspoignant/go-feature-flag/internal/cache"
"github.com/thomaspoignant/go-feature-flag/internal/dto"
"github.com/thomaspoignant/go-feature-flag/internal/flag"
"github.com/thomaspoignant/go-feature-flag/testutils/testconvert"
)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package dto_test

import (
"github.com/thomaspoignant/go-feature-flag/ffcontext"
"github.com/thomaspoignant/go-feature-flag/model/dto"
"testing"
"time"

Expand All @@ -10,7 +11,6 @@ import (
"github.com/thomaspoignant/go-feature-flag/testutils/flagv1"

"github.com/stretchr/testify/assert"
"github.com/thomaspoignant/go-feature-flag/internal/dto"
"github.com/thomaspoignant/go-feature-flag/internal/flag"
"github.com/thomaspoignant/go-feature-flag/testutils/testconvert"
)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion testutils/flagv1/convert.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package flagv1

import "github.com/thomaspoignant/go-feature-flag/internal/dto"
import (
"github.com/thomaspoignant/go-feature-flag/model/dto"
)

func ConvertDtoToV1(d dto.DTO) FlagData {
var r Rollout
Expand Down
2 changes: 1 addition & 1 deletion variation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"github.com/thomaspoignant/go-feature-flag/exporter/logsexporter"
"github.com/thomaspoignant/go-feature-flag/ffcontext"
"github.com/thomaspoignant/go-feature-flag/internal/cache"
"github.com/thomaspoignant/go-feature-flag/internal/dto"
"github.com/thomaspoignant/go-feature-flag/internal/flag"
"github.com/thomaspoignant/go-feature-flag/model"
"github.com/thomaspoignant/go-feature-flag/model/dto"
"github.com/thomaspoignant/go-feature-flag/retriever/fileretriever"
"github.com/thomaspoignant/go-feature-flag/testutils"
"github.com/thomaspoignant/go-feature-flag/testutils/flagv1"
Expand Down

0 comments on commit 7e20e6a

Please sign in to comment.