{"modulePath":"github.com/keycase/client-fork","version":"v5.5.2+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package libhttpserver\n\n## Functions\n\n```go\nfunc GetGUIFileContextFromContentType(contentTypeRaw string) (\n\tviewType keybase1.GUIViewType, invariance string)\n```\nGetGUIFileContextFromContentType returns necessary data used by GUI for displaying file previews.\n\nThe invariance here is derived from viewType, and later added into the url returned to GUI. When a file is requested from the the http server and an invariance field is specified, we make sure the viewType of the file we serve satisfies the invariance provided. This makes sure the viewType doesn't change between when GUI learnt about it and when GUI requested it over HTTP from the webview.\n\n## Types\n\n```go\ntype Server struct {\n\t// contains filtered or unexported fields\n}\n```\nServer is a local HTTP server for serving KBFS content over HTTP.\n\n```go\nfunc New(appStateUpdater env.AppStateUpdater, config libkbfs.Config) (\n\ts *Server, err error)\n```\nNew creates and starts a new server.\n\n```go\nfunc (s *Server) Address() (string, error)\n```\nAddress returns the address that the server is listening on.\n\n```go\nfunc (s *Server) CurrentToken() (token string, err error)\n```\nCurrentToken returns the currently valid token that a HTTP client can use to load content from the server.\n\n```go\nfunc (s *Server) Shutdown()\n```\nShutdown shuts down the server.\n\n","path":"github.com/keycase/client-fork/go/kbfs/libhttpserver","name":"libhttpserver","synopsis":"","isRedistributable":true}
