mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-12 23:19:08 -06:00
config docs prototype
This commit is contained in:
11
thumbnails/cmd/helper/configdoc/main.go
Normal file
11
thumbnails/cmd/helper/configdoc/main.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/ocis-pkg/docs"
|
||||
"github.com/owncloud/ocis/thumbnails/pkg/config"
|
||||
)
|
||||
|
||||
func main() {
|
||||
cfg := config.DefaultConfig()
|
||||
docs.Display(*cfg)
|
||||
}
|
||||
23
thumbnails/cmd/helper/defaultconfig/main.go
Normal file
23
thumbnails/cmd/helper/defaultconfig/main.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/accounts/pkg/config"
|
||||
"github.com/owncloud/ocis/accounts/pkg/config/parser"
|
||||
"gopkg.in/yaml.v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
cfg := config.DefaultConfig()
|
||||
|
||||
parser.EnsureDefaults(cfg)
|
||||
parser.Sanitize(cfg)
|
||||
|
||||
b, err := yaml.Marshal(cfg)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
fmt.Println(string(b))
|
||||
}
|
||||
Reference in New Issue
Block a user