-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from gildas/release/0.9.0
Merge release/0.9.0
- Loading branch information
Showing
21 changed files
with
660 additions
and
327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,25 @@ | ||
package gcloudcx | ||
|
||
import "github.com/gildas/go-logger" | ||
|
||
// Biography describes a User's biography | ||
type Biography struct { | ||
Biography string `json:"biography"` | ||
Interests []string `json:"interests"` | ||
Hobbies []string `json:"hobbies"` | ||
Spouse string `json:"spouse"` | ||
} | ||
|
||
// Redact redacts sensitive data | ||
// | ||
// implements logger.Redactable | ||
func (biography Biography) Redact() interface{} { | ||
redacted := biography | ||
if len(biography.Biography) > 0 { | ||
redacted.Biography = logger.RedactWithHash(biography.Biography) | ||
} | ||
if len(biography.Spouse) > 0 { | ||
redacted.Spouse = logger.RedactWithHash(biography.Spouse) | ||
} | ||
return &redacted | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.