Skip to content

Commit

Permalink
setting up validation checks in olake
Browse files Browse the repository at this point in the history
Signed-off-by: Piyush Singariya <[email protected]>
  • Loading branch information
piyushdatazip committed Dec 8, 2024
1 parent 6efb0fa commit 93703dc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions writers/local/config.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
package local

import "github.com/piyushsingariya/relec"

type Config struct {
BaseFilePath string `json:"path"`
}

// TODO: Add go struct validation in Config
func (c *Config) Validate() error {
return relec.Validate(c)
}
2 changes: 1 addition & 1 deletion writers/local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type Local struct {
pqSchemaMutex sync.Mutex // To prevent concurrent underlying map access from fraugster library
}

func (l *Local) GetConfigRef() any {
func (l *Local) GetConfigRef() protocol.Config {
l.config = &Config{}
return l.config
}
Expand Down

0 comments on commit 93703dc

Please sign in to comment.