You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prepare for v3 release
Rename `.RedactHint()` to `.RedactAs()` as more meaningful name that
is more inline with its purpose. Rename `.Value()` to `.Secret()` as
more meaningful name to return secret string. Polish doc comments.
Restructure and cleanup README to be in sync with latest changes.
- It provides simple Go types like [secret.Text](https://pkg.go.dev/github.com/rsjethani/secret/v2#Text) to encapsulate your secret. Example:
5
+
# Installation
6
+
```
7
+
go get github.com/rsjethani/secret/v3
9
8
```
9
+
10
+
# What secret is?
11
+
It provides simple Go types like `Text` to securely store secrets. For example:
12
+
```go
10
13
typeLoginstruct {
11
14
Userstring
12
15
Password secret.Text
13
16
}
14
17
```
15
-
- The encapsulated secret remains inaccessible to operations like printing, logging, JSON serializtion etc. A (customizable) redact hint like `*****` is returned instead.
16
-
- The only way to access the actual secret value is by asking explicitly via the `.Value()` method.
17
-
- See [godev reference](https://pkg.go.dev/github.com/rsjethani/secret/v2#pkg-examples) for usage examples.
18
+
The encapsulated secret remains inaccessible to operations like printing, logging, JSON serialization etc. A (customizable) redact hint like `*****` is returned instead. The only way to access the actual secret value is by asking explicitly via the `.Secret()` method. See package documentation more reference and examples.
18
19
19
-
###What secret is not?
20
+
# What secret is not?
20
21
- It is not a secret management service or your local password manager.
21
22
- It is not a Go client to facilitate communication with secret managers like Hashicorp Vault, AWS secret Manager etc. Checkout [teller](https://github.com/spectralops/teller) if that is what you are looking for.
22
23
23
-
### Installation
24
-
```
25
-
go get github.com/rsjethani/secret/v2
26
-
```
27
-
NOTE: v1 is deprecated now.
24
+
# Versions
25
+
26
+
### v3
27
+
Current version, same functionality as v2 but much cleaner API.
0 commit comments