Bootstrap copied BFF and local accounts with public Sendico contracts (#34)
This commit is contained in:
1 parent
67dc5b5b1e
commit
7062672a87
556 files changed
+42291
-777
No files matched your search
@@ -0,0 +1,28 @@
|
||||
package mzap
|
||||
|
||||
import (
|
||||
"git.sendico.io/tech/sxchnge/bff/pkg/model"
|
||||
"git.sendico.io/tech/sxchnge/bff/pkg/mutil/mask"
|
||||
"go.mongodb.org/mongo-driver/v2/bson"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
func AccRef(accountRef bson.ObjectID) zap.Field {
|
||||
return ObjRef("account_ref", accountRef)
|
||||
}
|
||||
|
||||
func Email(email string) zap.Field {
|
||||
return MaskEmail("email", email)
|
||||
}
|
||||
|
||||
func MaskEmail(field, email string) zap.Field {
|
||||
return zap.String(field, mask.Email(email))
|
||||
}
|
||||
|
||||
func MaskEmails(field string, emails []string) zap.Field {
|
||||
return zap.Strings(field, mask.Emails(emails))
|
||||
}
|
||||
|
||||
func Login(account *model.Account) zap.Field {
|
||||
return Email(account.Login)
|
||||
}
|
||||
Reference in new issue
Block a user