(ctx context.Context, variant *pb.SourceVariant)
| 1653 | } |
| 1654 | |
| 1655 | func (serv *MetadataServer) CreateSourceVariant(ctx context.Context, variant *pb.SourceVariant) (*pb.Empty, error) { |
| 1656 | variant.Created = tspb.New(time.Now()) |
| 1657 | return serv.genericCreate(ctx, &sourceVariantResource{variant}, func(name, variant string) Resource { |
| 1658 | return &SourceResource{ |
| 1659 | &pb.Source{ |
| 1660 | Name: name, |
| 1661 | DefaultVariant: variant, |
| 1662 | // This will be set when the change is propagated to dependencies. |
| 1663 | Variants: []string{}, |
| 1664 | }, |
| 1665 | } |
| 1666 | }) |
| 1667 | } |
| 1668 | |
| 1669 | func (serv *MetadataServer) GetSources(stream pb.Metadata_GetSourcesServer) error { |
| 1670 | return serv.genericGet(stream, SOURCE, func(msg proto.Message) error { |
nothing calls this directly
no test coverage detected