2020-02-15 22:13:50 +00:00
|
|
|
package sigcred
|
|
|
|
|
2020-03-29 21:16:36 +00:00
|
|
|
import "dehub.dev/src/dehub.git/typeobj"
|
2020-02-15 22:13:50 +00:00
|
|
|
|
|
|
|
// Credential represents a credential which has been attached to a commit which
|
2020-03-04 19:14:54 +00:00
|
|
|
// hopefully will allow it to be included in the main. Exactly one field tagged
|
2020-02-16 17:28:59 +00:00
|
|
|
// with "type" should be set.
|
2020-02-15 22:13:50 +00:00
|
|
|
type Credential struct {
|
|
|
|
PGPSignature *CredentialPGPSignature `type:"pgp_signature"`
|
|
|
|
|
|
|
|
// AccountID specifies the account which generated this Credential. The
|
|
|
|
// Credentials produced by the Signifier.Sign method do not fill this field
|
|
|
|
// in.
|
|
|
|
AccountID string `yaml:"account"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalYAML implements the yaml.Marshaler interface.
|
|
|
|
func (c Credential) MarshalYAML() (interface{}, error) {
|
|
|
|
return typeobj.MarshalYAML(c)
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalYAML implements the yaml.Unmarshaler interface.
|
|
|
|
func (c *Credential) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
|
|
|
return typeobj.UnmarshalYAML(c, unmarshal)
|
|
|
|
}
|