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 = `
 6name: Soft Serve
 7host: %s
 8port: %d
 9
10# Set the access level for anonymous users. Options are: read-write, read-only and no-access
11anon-access: %v
12
13# Allow read only even if they don't have private keys, any password will work
14allow-no-keys: false
15
16# Customize repo display in menu
17repos:
18  - name: Home
19	  repo: config
20		note: "Configuration and content repo for this server"`
21
22const hasKeyUserConfig = `
23# Users can read all repos, and push to collab-repos, admin can push to all repos
24users:
25  - name: admin
26	  admin: true
27		public-key: |
28		  %s`
29
30const defaultUserConfig = `
31# users:
32#   - name: admin
33# 	  admin: true
34# 		public-key: |
35# 		  KEY TEXT`
36
37const exampleUserConfig = `
38#  - name: little-buddy
39#	   collab-repos:
40#		   - soft-serve
41#		 public-key: |
42#		   KEY TEXT`