Implemented all but update from cli client to server;

solidified encryption;
setup deployment mechanism for GCP
This commit is contained in:
mitchell 2019-05-27 18:16:50 -07:00
parent cd24f6e848
commit c5ae0b4ddc
28 changed files with 598 additions and 295 deletions

View file

@ -1,6 +1,7 @@
package types
import (
"fmt"
"time"
)
@ -8,16 +9,25 @@ const TypePrefixCred = "cred"
type Credential struct {
Metadata
Username string
Email string
Password string `json:"-"`
Username string
Email string
Password string `json:"-"`
OTPSecret string `json:"-"`
}
func (c Credential) String() string {
return fmt.Sprintf(
"username = %s\nemail = %s\n%s",
c.Username, c.Email, c.Metadata,
)
}
type CredentialInput struct {
MetadataInput
Username string
Email string
Password string
Username string
Email string
Password string
OTPSecret string
}
type Metadata struct {
@ -30,6 +40,13 @@ type Metadata struct {
Tag string
}
func (m Metadata) String() string {
return fmt.Sprintf(
"id = %s\nsourceHost = %s\ncreatedAt = %s\nupdatedAt = %s\nprimary = %s\nloginUrl = %s\ntag = %s\n",
m.ID, m.SourceHost, m.CreatedAt, m.UpdatedAt, m.Primary, m.LoginURL, m.Tag,
)
}
type MetadataInput struct {
Primary string
SourceHost string