Skip to content

Commit

Permalink
Merge pull request #276 from Darkren/feature/apply-readme-generator
Browse files Browse the repository at this point in the history
Apply readme generator
  • Loading branch information
jdknives authored Apr 27, 2020
2 parents eca53df + 4f9e990 commit d1567c8
Show file tree
Hide file tree
Showing 7 changed files with 150 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ stop: ## Stop running skywire-visor on host
config: ## Generate skywire.json
-./skywire-cli visor gen-config -o ./skywire.json -r

generate: ## Generate mocks and config README's
go generate ./...

clean: ## Clean project: remove created binaries and apps
-rm -rf ./apps
-rm -f ./skywire-visor ./skywire-cli ./setup-node ./hypervisor
Expand Down
23 changes: 23 additions & 0 deletions pkg/hypervisor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Config

- `public_key` (PubKey)
- `secret_key` (SecKey)
- `db_path` (string)
- `enable_auth` (bool)
- `cookies` ([CookieConfig](#CookieConfig))
- `dmsg_discovery` (string)
- `dmsg_port` (uint16)
- `http_addr` (string)
- `enable_tls` (bool)
- `tls_cert_file` (string)
- `tls_key_file` (string)


# CookieConfig

- `hash_key` (Key)
- `block_key` (Key)
- `expires_duration` (Duration)
- `path` (string)
- `domain` (string)
- `-` (bool)
2 changes: 2 additions & 0 deletions pkg/hypervisor/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import (
"github.com/SkycoinProject/skywire-mainnet/pkg/util/pathutil"
)

//go:generate readmegen -n Config -o ./README.md ./config.go

const (
defaultHTTPAddr = ":8000"
defaultCookieExpiration = 12 * time.Hour
Expand Down
13 changes: 13 additions & 0 deletions pkg/setup/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Config

- `public_key` (PubKey)
- `secret_key` (SecKey)
- `dmsg` ([DmsgConfig](#DmsgConfig))
- `transport_discovery` (string)
- `log_level` (string)


# DmsgConfig

- `discovery` (string)
- `sessions_count` (int)
9 changes: 5 additions & 4 deletions pkg/setup/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ package setup
import (
"time"

"github.com/SkycoinProject/skywire-mainnet/pkg/snet"

"github.com/SkycoinProject/dmsg/cipher"
)

//go:generate readmegen -n Config -o ./README.md ./config.go

// Various timeouts for setup node.
const (
RequestTimeout = time.Second * 60
Expand All @@ -17,10 +21,7 @@ type Config struct {
PubKey cipher.PubKey `json:"public_key"`
SecKey cipher.SecKey `json:"secret_key"`

Dmsg struct {
Discovery string `json:"discovery"`
SessionsCount int `json:"sessions_count"`
}
Dmsg snet.DmsgConfig `json:"dmsg"`

TransportDiscovery string `json:"transport_discovery"`

Expand Down
102 changes: 102 additions & 0 deletions pkg/visor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Config

- `-` (*string)
- `log` (*[Logger](#Logger))
- `flushMu` ([Mutex](#Mutex))
- `version` (string)
- `key_pair` (*[KeyPair](#KeyPair))
- `dmsg` (*[DmsgConfig](#DmsgConfig))
- `dmsg_pty` (*[DmsgPtyConfig](#DmsgPtyConfig))
- `stcp` (*[STCPConfig](#STCPConfig))
- `transport` (*[TransportConfig](#TransportConfig))
- `routing` (*[RoutingConfig](#RoutingConfig))
- `uptime_tracker` (*[UptimeTrackerConfig](#UptimeTrackerConfig))
- `apps` ([][AppConfig](#AppConfig))
- `trusted_visors` ()
- `hypervisors` ([][HypervisorConfig](#HypervisorConfig))
- `apps_path` (string)
- `local_path` (string)
- `log_level` (string)
- `shutdown_timeout` (Duration)
- `interfaces` (*[InterfaceConfig](#InterfaceConfig))
- `app_server_addr` (string)
- `restart_check_delay` (string)


# DmsgPtyConfig

- `port` (uint16)
- `authorization_file` (string)
- `cli_network` (string)
- `cli_address` (string)


# TransportConfig

- `discovery` (string)
- `log_store` (*[LogStoreConfig](#LogStoreConfig))


# KeyPair

- `public_key` (PubKey)
- `secret_key` (SecKey)


# RoutingConfig

- `setup_nodes` ()
- `route_finder` (string)
- `route_finder_timeout` (Duration)


# UptimeTrackerConfig

- `addr` (string)


# LogStoreConfig

- `type` (LogStoreType)
- `location` (string)


# InterfaceConfig

- `rpc` (string)


# AppConfig

- `app` (string)
- `auto_start` (bool)
- `port` (Port)
- `args` ([]string)


# HypervisorConfig

- `public_key` (PubKey)


# DmsgConfig

- `discovery` (string)
- `sessions_count` (int)


# Logger

- `` (FieldLogger)


# Mutex

- `state` (int32)
- `sema` (uint32)


# STCPConfig

- `pk_table` ()
- `local_address` (string)
2 changes: 2 additions & 0 deletions pkg/visor/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import (
trClient "github.com/SkycoinProject/skywire-mainnet/pkg/transport-discovery/client"
)

//go:generate readmegen -n Config -o ./README.md ./config.go

const (
// DefaultTimeout is used for default config generation and if it is not set in config.
DefaultTimeout = Duration(10 * time.Second)
Expand Down

0 comments on commit d1567c8

Please sign in to comment.