Documentation
¶
Overview ¶
Example ¶
From the website sanity check
s, err := spectre.New("Robert Lee Mitchell", "banana colored duckling")
if err != nil {
panic(err)
}
pw := s.Site("masterpasswordapp.com")
fmt.Println(pw)
Output: Jejr5[RepuSosp
Example (Second) ¶
Example with options
scoper := spectre.SimpleScoper{
Key: "com.jojodev.jolheiser",
}
s, err := spectre.New("Robert Lee Mitchell", "banana colored duckling", spectre.WithScoper(scoper))
if err != nil {
panic(err)
}
pw := s.Site("jojodev.com",
spectre.WithScope(spectre.Identification),
spectre.WithTemplate(spectre.Maximum),
spectre.WithCounter(2), // Password was leaked, so increment counter (example)
)
fmt.Println(pw)
Output: Ig^JIcxD!*)TbefJBi6-
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultScoper = SimpleScoper{
Key: "com.lyndir.masterpassword",
}
DefaultScoper is the default Scoper
Functions ¶
This section is empty.
Types ¶
type Scoper ¶
Scoper returns one of the three available scopes
type Spectre ¶
type Spectre struct {
// contains filtered or unexported fields
}
Spectre is a spectre client
func New ¶
New returns a Spectre client
func (*Spectre) Site ¶
func (s *Spectre) Site(siteName string, opts ...SiteOption) string
Site returns a site password based on Options
Source Files
¶
- scope.go
- site_key.go
- site_password.go
- spectre.go
- template.go
- user_key.go
Click to show internal directories.
Click to hide internal directories.