defaults.go

 1package config
 2
 3const defaultReadme = "# Soft Serve\n\n Welcome! You can configure your Soft Serve server by cloning this repo and pushing changes.\n\n## Repos\n\n{{ range .Repos }}* {{ .Name }}{{ if .Note }} - {{ .Note }} {{ end }}\n  - `git clone ssh://{{$.Host}}:{{$.Port}}/{{.Repo}}`\n{{ end }}"
 4
 5const defaultConfig = `name: Soft Serve
 6host: %s
 7port: %d
 8
 9# Set the access level for anonymous users. Options are: read-write, read-only and no-access
10anon-access: %s
11
12# Allow read only even if they don't have private keys, any password will work
13allow-no-keys: false
14
15# Customize repo display in menu
16repos:
17  - name: Home
18    repo: config
19    note: "Configuration and content repo for this server"`
20
21const hasKeyUserConfig = `
22# Users can read all repos, and push to collab-repos, admin can push to all repos
23users:
24  - name: admin
25    admin: true
26    public-key:
27      %s`
28
29const defaultUserConfig = `
30# users:
31#   - name: admin
32#     admin: true
33#     public-key: |
34#       KEY TEXT`
35
36const exampleUserConfig = `
37#   - name: little-buddy
38#     collab-repos:
39#       - soft-serve
40#     public-key: |
41#       KEY TEXT`