Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchTLSCertificate ¶
FetchTLSCertificate will use the ACME protocol and LetsEncrypt to download a certificate to the user's cache dir automatically. This either needs rights to bind :80 (i.e. sudo) or the right capabilities (i.e. sudo setcap CAP_NET_BIND_SERVICE=+ep ~/go/bin/brig)
func UserCacheDir ¶
UserCacheDir is the same as os.UserCacheDir from go1.11, but taken from the standard library. This way it also works for go1.9 and go1.10.
This method should be replaced by os.UserCacheDir by go1.13.
Types ¶
type Backend ¶
type Backend interface { Stat(nodePath string) (*catfs.StatInfo, error) Cat(nodePath string) (mio.Stream, error) Tar(nodePath string, w io.Writer) error }
Backend is the backend that the gateway uses to output files. This is conviniently the same API as catfs.FS, but useful for testing purposes to separate this.
type Gateway ¶
type Gateway struct {
// contains filtered or unexported fields
}
Gateway is a small HTTP server that is able to serve files from brig over HTTP. This can be used to share files inside of brig with users that do not use brig.
func NewGateway ¶
NewGateway returns a newly built gateway. This function does not yet start a server.