8784: Fix test for latest firefox.
[arvados.git] / services / keep-web / usage.go
1 package main
2
3 import (
4         "encoding/json"
5         "flag"
6         "fmt"
7         "os"
8 )
9
10 func usage() {
11         c := DefaultConfig()
12         c.AnonymousTokens = []string{"xxxxxxxxxxxxxxxxxxxxxxx"}
13         c.Client.APIHost = "zzzzz.arvadosapi.com:443"
14         exampleConfigFile, err := json.MarshalIndent(c, "    ", "  ")
15         if err != nil {
16                 panic(err)
17         }
18         fmt.Fprintf(os.Stderr, `
19
20 Keep-web provides read-only HTTP access to files stored in Keep; see
21 https://godoc.org/github.com/curoverse/arvados/services/keep-web and
22 http://doc.arvados.org/install/install-keep-web.html
23
24 Usage: keep-web -config path/to/keep-web.yml
25
26 Options:
27 `)
28         flag.PrintDefaults()
29         fmt.Fprintf(os.Stderr, `
30 Example config file:
31     %s
32
33 Client.APIHost:
34
35     Address (or address:port) of the Arvados API endpoint.
36
37 Client.AuthToken:
38
39     Unused. Normally empty, or omitted entirely.
40
41 Client.Insecure:
42
43     True if your Arvados API endpoint uses an unverifiable SSL/TLS
44     certificate.
45
46 Listen:
47
48     Local port to listen on. Can be "address", "address:port", or
49     ":port", where "address" is a host IP address or name and "port"
50     is a port number or name.
51
52 AnonymousTokens:
53
54     Array of tokens to try when a client does not provide a token.
55
56 AttachmentOnlyHost:
57
58     Accept credentials, and add "Content-Disposition: attachment"
59     response headers, for requests at this hostname:port.
60
61     This prohibits inline display, which makes it possible to serve
62     untrusted and non-public content from a single origin, i.e.,
63     without wildcard DNS or SSL.
64
65 TrustAllContent:
66
67     Serve non-public content from a single origin. Dangerous: read
68     docs before using!
69
70 Cache.TTL:
71
72     Maximum time to cache collection data and permission checks.
73
74 Cache.MaxCollectionEntries:
75
76     Maximum number of collection cache entries.
77
78 Cache.MaxCollectionBytes:
79
80     Approximate memory limit for collection cache.
81
82 Cache.MaxPermissionEntries:
83
84     Maximum number of permission cache entries.
85
86 Cache.MaxUUIDEntries:
87
88     Maximum number of UUID cache entries.
89
90 `, exampleConfigFile)
91 }