From f6780074d5af2f57e5eb5ab2cc4d8e40a265dbe8 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Fri, 7 Feb 2020 10:21:00 +0100 Subject: [PATCH] added docs --- docs/.gitignore | 1 + docs/archetypes/default.md | 6 + docs/config.toml | 18 ++ docs/content/about.md | 8 + docs/content/building.md | 24 +++ docs/content/getting-started.md | 63 ++++++ docs/layouts/_default/list.html | 0 docs/layouts/_default/single.html | 0 docs/layouts/index.html | 57 +++++ docs/layouts/partials/style.html | 2 + docs/static/styles.css | 338 ++++++++++++++++++++++++++++++ docs/static/syntax.css | 59 ++++++ 12 files changed, 576 insertions(+) create mode 100644 docs/.gitignore create mode 100644 docs/archetypes/default.md create mode 100644 docs/config.toml create mode 100644 docs/content/about.md create mode 100644 docs/content/building.md create mode 100644 docs/content/getting-started.md create mode 100644 docs/layouts/_default/list.html create mode 100644 docs/layouts/_default/single.html create mode 100644 docs/layouts/index.html create mode 100644 docs/layouts/partials/style.html create mode 100644 docs/static/styles.css create mode 100644 docs/static/syntax.css diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000000..364fdec1aa --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1 @@ +public/ diff --git a/docs/archetypes/default.md b/docs/archetypes/default.md new file mode 100644 index 0000000000..4e777bee13 --- /dev/null +++ b/docs/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: "{{ replace .TranslationBaseName "-" " " | title }}" +date: {{ .Date }} +anchor: "{{ replace .TranslationBaseName "-" " " | title | urlize }}" +weight: +--- diff --git a/docs/config.toml b/docs/config.toml new file mode 100644 index 0000000000..82d4905f15 --- /dev/null +++ b/docs/config.toml @@ -0,0 +1,18 @@ +baseURL = "https://owncloud.github.io/ocis-accounts/" +languageCode = "en-us" +title = "ownCloud Infinite Scale: Accounts" +pygmentsUseClasses = true + +disableKinds = ["taxonomy", "taxonomyTerm", "RSS", "sitemap"] + +[blackfriday] + angledQuotes = true + fractions = false + plainIDAnchors = true + smartlists = true + extensions = ["hardLineBreak"] + +[params] + author = "ownCloud GmbH" + description = "Serve Accounbts API for oCIS" + keywords = "reva, ocis, accounts" diff --git a/docs/content/about.md b/docs/content/about.md new file mode 100644 index 0000000000..2f6241567b --- /dev/null +++ b/docs/content/about.md @@ -0,0 +1,8 @@ +--- +title: "About" +date: 2020-02-07T00:00:00+00:00 +anchor: "about" +weight: 10 +--- + +This service provides an inter-operable accounts service that operates on the filesystem by default. diff --git a/docs/content/building.md b/docs/content/building.md new file mode 100644 index 0000000000..0cf2186527 --- /dev/null +++ b/docs/content/building.md @@ -0,0 +1,24 @@ +--- +title: "Building" +date: 2018-05-02T00:00:00+00:00 +anchor: "building" +weight: 30 +--- + +As this project is built with Go, so you need to install that first. The installation of Go is out of the scope of this document, please follow the official documentation for [Go](https://golang.org/doc/install), to build this project you have to install Go >= v1.13. After the installation of the required tools you need to get the sources: + +{{< highlight txt >}} +git clone https://github.com/owncloud/ocis-accounts.git +cd ocis-accounts +{{< / highlight >}} + +All required tool besides Go itself and make are bundled or getting automatically installed within the `GOPATH`. All commands to build this project are part of our `Makefile`. + +### Backend + +{{< highlight txt >}} +make generate +make build +{{< / highlight >}} + +Finally you should have the binary within the `bin/` folder now, give it a try with `./bin/ocis-accounts -h` to see all available options and subcommands. diff --git a/docs/content/getting-started.md b/docs/content/getting-started.md new file mode 100644 index 0000000000..795519fe32 --- /dev/null +++ b/docs/content/getting-started.md @@ -0,0 +1,63 @@ +--- +title: "Getting Started" +date: 2018-05-02T00:00:00+00:00 +anchor: "getting-started" +weight: 20 +--- + +### Installation + +So far we are offering two different variants for the installation. You can choose between [Docker](https://www.docker.com/) or pre-built binaries which are stored on our download mirrors and GitHub releases. Maybe we will also provide system packages for the major distributions later if we see the need for it. + +#### Docker + +TBD + +#### Binaries + +TBD + +### Configuration + +We provide overall three different variants of configuration. The variant based on environment variables and commandline flags are split up into global values and command-specific values. + +#### Envrionment variables + +If you prefer to configure the service with environment variables you can see the available variables below. + +##### Server + +OCIS_ACCOUNTS_MANAGER +: Enable sending traces, defaults to `filesystem` + +OCIS_ACCOUNTS_MOUNT_PATH +: Mounting point for the accounts service when running on the filesystem as manager. + +OCIS_ACCOUNTS_NAME +: Name of the accounts service. It will be part of the namespace. + +OCIS_ACCOUNTS_NAMESPACE +: Namespace of the accounts service. + +OCIS_ACCOUNTS_ADDRESS +: Endpoint for the grpc service endpoint. + +#### Commandline flags + +If you prefer to configure the service with commandline flags you can see the available variables below. + +#### Configuration file + +So far we support the file formats `JSON` and `YAML`, if you want to get a full example configuration just take a look at [our repository](https://github.com/owncloud/ocis-accounts/tree/master/pkg/config), there you can always see the latest configuration format. These example configurations include all available options and the default values. The configuration file will be automatically loaded if it's placed at `/etc/ocis/accounts.yml`, `${HOME}/.ocis/accounts.yml` or `$(pwd)/config/accounts.yml`. + +### Usage + +The program provides a few sub-commands on execution. The available configuration methods have already been mentioned above. Generally you can always see a formated help output if you execute the binary via `ocis-accounts --help`. + +#### Server + +The server command is used to start the grpc server. For further help please execute: + +{{< highlight txt >}} +ocis-accounts server --help +{{< / highlight >}} diff --git a/docs/layouts/_default/list.html b/docs/layouts/_default/list.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/layouts/_default/single.html b/docs/layouts/_default/single.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/layouts/index.html b/docs/layouts/index.html new file mode 100644 index 0000000000..27db113acd --- /dev/null +++ b/docs/layouts/index.html @@ -0,0 +1,57 @@ + + + + + + + + + {{ .Site.Title }} + + + + + + {{ partial "style.html" . }} + + + + + + {{ range .Data.Pages.ByWeight }} +
+

+ + {{ .Title }} + + + + + Back to Top + + +

+ + {{ .Content | markdownify }} +
+ {{ end }} + + diff --git a/docs/layouts/partials/style.html b/docs/layouts/partials/style.html new file mode 100644 index 0000000000..1386c59b0d --- /dev/null +++ b/docs/layouts/partials/style.html @@ -0,0 +1,2 @@ + + diff --git a/docs/static/styles.css b/docs/static/styles.css new file mode 100644 index 0000000000..61acc8ddb5 --- /dev/null +++ b/docs/static/styles.css @@ -0,0 +1,338 @@ +body, +html { + cursor: default; +} + +body, +div, +dl, +dt, +dd, +ul, +ol, +li, +h1, +h2, +h3, +h4, +h5, +h6, +pre, +form, +fieldset, +input, +textarea, +p, +blockquote, +th, +td { + margin: 0; + padding: 0; +} + +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +:before, +:after { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +img, +object, +embed { + max-width: 100%; + height: auto; +} + +object, +embed { + height: 100%; +} + +img { + margin: 1.25% 0; + -ms-interpolation-mode: bicubic; +} + +html { + background-color: #F0F1F3; + padding: 2%; +} + +body { + font-size: 16px; + line-height: 1.6; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + color: #242424; + max-width: 800px; + margin: 5% auto; +} + +body::after { + clear: both; + content: ""; + display: table; +} + +header { + margin-bottom: 8%; +} + +footer { + text-align: center; +} + +h1, +h2, +h3, +h4, +h5, +h2 a { + color: #263A48; + font-weight: 500; + text-decoration: none; +} + +h1, +h2 { + font-size: 36px; + padding-bottom: 0.3em; + margin-bottom: 0.4em; + border-bottom: 1px solid #eee +} + +h2 { + font-size: 22px; + padding-bottom: 0.6em; + margin-bottom: 0.6em; + margin-top: 2.5em; +} + +h3 { + font-size: 18px; + margin-bottom: 0.3em; +} + +h2 small a { + color: #98999C; + font-size: 15px; + font-weight: normal; + float: right; + position: absolute; + top: 15px; + right: 20px; +} + +section { + background: #fff; + margin-bottom: 1%; + position: relative; + padding: 6% 8%; +} + +blockquote { + border-left: 3px solid #d54e21; + font-size: 16px; + padding: 0 0 0 20px; + color: #d54e21; +} + +blockquote a { + color: #d54e21; + font-weight: 500; +} + +blockquote code { + color: #d54e21; +} + +.highlight pre { + padding: 10px; +} + +.highlight { + margin-bottom: 4%; +} + +a { + color: #1e8cbe; + text-decoration: underline; +} + +a:hover { + color: #d54e21; +} + +ul { + list-style: none; +} + +ol { + list-style: number; +} + +ol li { + color: #98999C; + margin-bottom: 5px; +} + +ol li:last-child { + margin-bottom: 0; +} + +p, +ul, +ol, +blockquote { + margin-bottom: 4%; +} + +ul ul { + padding-top: 0; + margin-bottom: 0; + margin-left: 4%; +} + +ul ul li:before { + content: '-'; + display: inline-block; + padding-right: 2%; +} + +ul.col-2 { + color: #98999C; + -webkit-column-count: 2; + -moz-column-count: 2; + column-count: 2; + -webkit-column-gap: 20px; + -moz-column-gap: 20px; + column-gap: 20px; +} + +dl dt { + font-weight: bold; +} + +dl dd { + padding-left: 10px; +} + +@media screen and (min-width: 500px) { + ul.col-2 { + -webkit-column-count: 3; + -moz-column-count: 3; + column-count: 3; + -webkit-column-gap: 20px; + -moz-column-gap: 20px; + column-gap: 20px; + } +} + +nav { + background: #F0F1F3; + min-width: 215px; + margin-bottom: 5px; + margin-top: 15px; +} + +nav:first-of-type a { + color: #d54e21; + border-radius: 0; +} + +nav:first-of-type a:hover { + color: #d54e21; +} + +nav:first-of-type a:before { + background-color: #d54e21; +} + +nav.affix { + position: fixed; + top: 20px; +} + +nav.affix-bottom { + position: absolute; +} + +nav a { + border-radius: 3px; + font-size: 15px; + display: block; + cursor: pointer; + font-weight: 500; + position: relative; + text-decoration: none; + padding: 10px 12px; + width: 100%; + padding-right: 3px; + border-bottom: 2px solid #fff; +} + +nav a:before { + content: ''; + width: 4px; + display: block; + left: 0; + position: absolute; + height: 100%; + display: none; + background: #1e8cbe; + top: 0; +} + +nav a:hover { + background-color: #E6E8EA; + color: #1e8cbe; + text-decoration: underline; +} + +nav a:hover:before { + display: block; +} + +nav a:last-of-type { + border-bottom: none; +} + +.gist { + margin-top: 5.1%; + margin-bottom: 5%; +} + +@media screen and (max-width: 1050px) { + body { + margin: 0 auto; + } +} + +@media screen and (max-width: 767px) { + header span { + display: none; + } + + h1 { + font-size: 26px; + } + + h2 { + font-size: 20px; + } +} + +@media screen and (max-width: 514px) { + p, + ul, + ol, + blockquote { + margin-bottom: 8%; + } +} diff --git a/docs/static/syntax.css b/docs/static/syntax.css new file mode 100644 index 0000000000..681758d068 --- /dev/null +++ b/docs/static/syntax.css @@ -0,0 +1,59 @@ +/* Background */ .chroma { color: #f8f8f2; background-color: #272822 } +/* Error */ .chroma .err { color: #960050; background-color: #1e0010 } +/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } +/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; } +/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc } +/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em; } +/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em; } +/* Keyword */ .chroma .k { color: #66d9ef } +/* KeywordConstant */ .chroma .kc { color: #66d9ef } +/* KeywordDeclaration */ .chroma .kd { color: #66d9ef } +/* KeywordNamespace */ .chroma .kn { color: #f92672 } +/* KeywordPseudo */ .chroma .kp { color: #66d9ef } +/* KeywordReserved */ .chroma .kr { color: #66d9ef } +/* KeywordType */ .chroma .kt { color: #66d9ef } +/* NameAttribute */ .chroma .na { color: #a6e22e } +/* NameClass */ .chroma .nc { color: #a6e22e } +/* NameConstant */ .chroma .no { color: #66d9ef } +/* NameDecorator */ .chroma .nd { color: #a6e22e } +/* NameException */ .chroma .ne { color: #a6e22e } +/* NameFunction */ .chroma .nf { color: #a6e22e } +/* NameOther */ .chroma .nx { color: #a6e22e } +/* NameTag */ .chroma .nt { color: #f92672 } +/* Literal */ .chroma .l { color: #ae81ff } +/* LiteralDate */ .chroma .ld { color: #e6db74 } +/* LiteralString */ .chroma .s { color: #e6db74 } +/* LiteralStringAffix */ .chroma .sa { color: #e6db74 } +/* LiteralStringBacktick */ .chroma .sb { color: #e6db74 } +/* LiteralStringChar */ .chroma .sc { color: #e6db74 } +/* LiteralStringDelimiter */ .chroma .dl { color: #e6db74 } +/* LiteralStringDoc */ .chroma .sd { color: #e6db74 } +/* LiteralStringDouble */ .chroma .s2 { color: #e6db74 } +/* LiteralStringEscape */ .chroma .se { color: #ae81ff } +/* LiteralStringHeredoc */ .chroma .sh { color: #e6db74 } +/* LiteralStringInterpol */ .chroma .si { color: #e6db74 } +/* LiteralStringOther */ .chroma .sx { color: #e6db74 } +/* LiteralStringRegex */ .chroma .sr { color: #e6db74 } +/* LiteralStringSingle */ .chroma .s1 { color: #e6db74 } +/* LiteralStringSymbol */ .chroma .ss { color: #e6db74 } +/* LiteralNumber */ .chroma .m { color: #ae81ff } +/* LiteralNumberBin */ .chroma .mb { color: #ae81ff } +/* LiteralNumberFloat */ .chroma .mf { color: #ae81ff } +/* LiteralNumberHex */ .chroma .mh { color: #ae81ff } +/* LiteralNumberInteger */ .chroma .mi { color: #ae81ff } +/* LiteralNumberIntegerLong */ .chroma .il { color: #ae81ff } +/* LiteralNumberOct */ .chroma .mo { color: #ae81ff } +/* Operator */ .chroma .o { color: #f92672 } +/* OperatorWord */ .chroma .ow { color: #f92672 } +/* Comment */ .chroma .c { color: #75715e } +/* CommentHashbang */ .chroma .ch { color: #75715e } +/* CommentMultiline */ .chroma .cm { color: #75715e } +/* CommentSingle */ .chroma .c1 { color: #75715e } +/* CommentSpecial */ .chroma .cs { color: #75715e } +/* CommentPreproc */ .chroma .cp { color: #75715e } +/* CommentPreprocFile */ .chroma .cpf { color: #75715e } +/* GenericDeleted */ .chroma .gd { color: #f92672 } +/* GenericEmph */ .chroma .ge { font-style: italic } +/* GenericInserted */ .chroma .gi { color: #a6e22e } +/* GenericStrong */ .chroma .gs { font-weight: bold } +/* GenericSubheading */ .chroma .gu { color: #75715e }