Skip to content

Commit

Permalink
reorder
Browse files Browse the repository at this point in the history
  • Loading branch information
mkysel committed Aug 26, 2024
1 parent 796c207 commit bd516aa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: go.mod
- run: go install github.com/segmentio/golines
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
args: --timeout=5m --config .golangci.yaml
- run: go install github.com/segmentio/golines
- name: golines
uses: nickcharlton/diff-check@main
with:
Expand Down
24 changes: 12 additions & 12 deletions pkg/config/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,29 @@ type ApiOptions struct {
}

type ContractsOptions struct {
RpcUrl string `long:"rpc-url" description:"Blockchain RPC URL"`
NodesContractAddress string `long:"nodes-address" description:"Node contract address"`
RpcUrl string `long:"rpc-url" description:"Blockchain RPC URL"`
NodesContractAddress string `long:"nodes-address" description:"Node contract address"`
MessagesContractAddress string `long:"messages-address" description:"Message contract address"`
RefreshInterval time.Duration `long:"refresh-interval" description:"Refresh interval" default:"60s"`
RefreshInterval time.Duration `long:"refresh-interval" description:"Refresh interval" default:"60s"`
}

type DbOptions struct {
ReaderConnectionString string `long:"reader-connection-string" description:"Reader connection string"`
WriterConnectionString string `long:"writer-connection-string" description:"Writer connection string" required:"true"`
ReadTimeout time.Duration `long:"read-timeout" description:"Timeout for reading from the database" default:"10s"`
WriteTimeout time.Duration `long:"write-timeout" description:"Timeout for writing to the database" default:"10s"`
MaxOpenConns int `long:"max-open-conns" description:"Maximum number of open connections" default:"80"`
WaitForDB time.Duration `long:"wait-for" description:"wait for DB on start, up to specified duration"`
WriterConnectionString string `long:"writer-connection-string" description:"Writer connection string" required:"true"`
ReadTimeout time.Duration `long:"read-timeout" description:"Timeout for reading from the database" default:"10s"`
WriteTimeout time.Duration `long:"write-timeout" description:"Timeout for writing to the database" default:"10s"`
MaxOpenConns int `long:"max-open-conns" description:"Maximum number of open connections" default:"80"`
WaitForDB time.Duration `long:"wait-for" description:"wait for DB on start, up to specified duration"`
}

type ServerOptions struct {
LogLevel string `short:"l" long:"log-level" description:"Define the logging level, supported strings are: DEBUG, INFO, WARN, ERROR, DPANIC, PANIC, FATAL, and their lower-case forms." default:"INFO"`
LogLevel string `short:"l" long:"log-level" description:"Define the logging level, supported strings are: DEBUG, INFO, WARN, ERROR, DPANIC, PANIC, FATAL, and their lower-case forms." default:"INFO"`
//nolint:staticcheck
LogEncoding string ` long:"log-encoding" description:"Log encoding format. Either console or json" default:"console" choice:"console"`
LogEncoding string `long:"log-encoding" description:"Log encoding format. Either console or json" choice:"console" choice:"json" default:"console"`

PrivateKeyString string `long:"private-key" description:"Private key to use for the node"`

API ApiOptions `group:"API Options" namespace:"api"`
DB DbOptions `group:"Database Options" namespace:"db"`
API ApiOptions `group:"API Options" namespace:"api"`
DB DbOptions `group:"Database Options" namespace:"db"`
Contracts ContractsOptions `group:"Contracts Options" namespace:"contracts"`
}

0 comments on commit bd516aa

Please sign in to comment.