Documentation
¶
Index ¶
Constants ¶
const ( CloudUS = "bitwarden.com" CloudEU = "bitwarden.eu" )
The official clouds, by the names ParseServer takes.
Variables ¶
var ErrInsecureServer = errors.New("vault: the password hash and tokens would travel unencrypted")
ErrInsecureServer is a server URL that would carry secrets unencrypted.
Functions ¶
func CheckTransport ¶
CheckTransport refuses a URL that would carry the password hash and the tokens unencrypted off this machine: http to anything but loopback.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is where an account lives: an official cloud by its name, or a self-hosted server (or Vaultwarden) by its base URL, https unless it is on this machine. The zero Server is none.
func ParseServer ¶
ParseServer reads a server setting: CloudUS, CloudEU, or an http(s) base URL without a query or fragment. A URL CheckTransport refuses is an error matching ErrInsecureServer.
func (Server) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (*Server) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler, refusing what ParseServer refuses.