default.go
func (b *Base64) 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 {
		*b = Base64(data)
		return nil
	}

	return errors.New("couldn't unmarshal bson raw value as Base64")
}
func (b *Base64) 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 {
		*b = Base64(data)
		return nil
	}

	return errors.New("couldn't unmarshal bson raw value as Base64")
}
// SetBSON sets the Base64 from raw bson data