-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Move File and Token schema
- Loading branch information
1 parent
70b75fe
commit ffd3ac4
Showing
10 changed files
with
45 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...tream/sink/type/tablesink/keboola/file.go → ...pe/tablesink/keboola/bridge/model/file.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package keboola | ||
package model | ||
|
||
import ( | ||
"github.com/keboola/go-client/pkg/keboola" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 11 additions & 7 deletions
18
internal/pkg/service/stream/sink/type/tablesink/keboola/bridge/model/schema/schema.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,27 @@ | ||
package schema | ||
|
||
import "github.com/keboola/keboola-as-code/internal/pkg/service/common/etcdop/serde" | ||
import ( | ||
"github.com/keboola/keboola-as-code/internal/pkg/service/common/etcdop/serde" | ||
fileSchema "github.com/keboola/keboola-as-code/internal/pkg/service/stream/sink/type/tablesink/keboola/bridge/model/repository/file/schema" | ||
tokenSchema "github.com/keboola/keboola-as-code/internal/pkg/service/stream/sink/type/tablesink/keboola/bridge/model/repository/token/schema" | ||
) | ||
|
||
type Schema struct { | ||
token Token | ||
file File | ||
token tokenSchema.Token | ||
file fileSchema.File | ||
} | ||
|
||
func New(s *serde.Serde) Schema { | ||
return Schema{ | ||
token: forToken(s), | ||
file: forFile(s), | ||
token: tokenSchema.New(s), | ||
file: fileSchema.New(s), | ||
} | ||
} | ||
|
||
func (s Schema) Token() Token { | ||
func (s Schema) Token() tokenSchema.Token { | ||
return s.token | ||
} | ||
|
||
func (s Schema) File() File { | ||
func (s Schema) File() fileSchema.File { | ||
return s.file | ||
} |
2 changes: 1 addition & 1 deletion
2
...ream/sink/type/tablesink/keboola/token.go → ...e/tablesink/keboola/bridge/model/token.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package keboola | ||
package model | ||
|
||
import ( | ||
"github.com/keboola/go-client/pkg/keboola" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters