Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: segment config into app and log
- Loading branch information
Showing
13 changed files
with
65 additions
and
61 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package logger | ||
|
||
type Config struct { | ||
Json bool `yaml:"json" json:"json,omitempty" mapstructure:"json" default:"false"` | ||
} |
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 was deleted.
Oops, something went wrong.
14 changes: 7 additions & 7 deletions
14
gateway/internal/api/v1/deps.go → gateway/internal/api/deps.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,18 +1,18 @@ | ||
package v1 | ||
package api | ||
|
||
import ( | ||
"github.com/missingstudio/studio/backend/internal/ingester" | ||
"github.com/missingstudio/studio/backend/internal/ratelimiter" | ||
) | ||
|
||
type Deps struct { | ||
ingester ingester.Ingester | ||
ratelimiter *ratelimiter.RateLimiter | ||
Ingester ingester.Ingester | ||
RateLimiter *ratelimiter.RateLimiter | ||
} | ||
|
||
func NewDeps(ingester ingester.Ingester, ratelimiter *ratelimiter.RateLimiter) *Deps { | ||
return &Deps{ | ||
ingester: ingester, | ||
ratelimiter: ratelimiter, | ||
func NewDeps(ingester ingester.Ingester, ratelimiter *ratelimiter.RateLimiter) Deps { | ||
return Deps{ | ||
Ingester: ingester, | ||
RateLimiter: ratelimiter, | ||
} | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package server | ||
|
||
type Config struct { | ||
Host string `yaml:"host" json:"host,omitempty" mapstructure:"host" default:"0.0.0.0"` | ||
Port int `yaml:"port" json:"port,omitempty" mapstructure:"port" default:"8080"` | ||
} |
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