default.go
func (r *Password) SetBSON(raw bson.Raw) error {
	var m bson.M
	if err := raw.Unmarshal(&m); err != nil {
		return err
	}

	if data, ok := m["data"].(string); ok {
		*r = Password(data)
		return nil
	}

	return errors.New("couldn't unmarshal bson raw value as Password")
}
func (r *Password) SetBSON(raw bson.Raw) error {
	var m bson.M
	if err := raw.Unmarshal(&m); err != nil {
		return err
	}

	if data, ok := m["data"].(string); ok {
		*r = Password(data)
		return nil
	}

	return errors.New("couldn't unmarshal bson raw value as Password")
}
func ( r * Password ) SetBSON ( raw bson . Raw ) error { var m bson . M if err := raw . Unmarshal ( & m ) ; err != nil { return err } if data , ok := m [ " " ] . ( string ) ; ok { * r = Password ( data ) return nil } return errors . New ( " " ) }
// SetBSON sets the Password from raw bson data
SetBSON sets the Password from raw bson data