func (m *Metadata) Bytes() ([]byte, error) { pbm := new(pb.Metadata) pbm.MimeType = &m.MimeType return proto.Marshal(pbm) }