()
| 302 | } |
| 303 | |
| 304 | func (dcs DedicatedColumns) ToTempopb() ([]*tempopb.DedicatedColumn, error) { |
| 305 | tempopbCols := make([]*tempopb.DedicatedColumn, 0, len(dcs)) |
| 306 | |
| 307 | for _, c := range dcs { |
| 308 | scope, err := c.Scope.ToTempopb() |
| 309 | if err != nil { |
| 310 | return nil, fmt.Errorf("unable to convert dedicated column '%s': %w", c.Name, err) |
| 311 | } |
| 312 | |
| 313 | typ, err := c.Type.ToTempopb() |
| 314 | if err != nil { |
| 315 | return nil, fmt.Errorf("unable to convert dedicated column '%s': %w", c.Name, err) |
| 316 | } |
| 317 | |
| 318 | options, err := c.Options.ToTempopb() |
| 319 | if err != nil { |
| 320 | return nil, fmt.Errorf("unable to convert dedicated column '%s': %w", c.Name, err) |
| 321 | } |
| 322 | |
| 323 | tempopbCols = append(tempopbCols, &tempopb.DedicatedColumn{ |
| 324 | Scope: scope, |
| 325 | Name: c.Name, |
| 326 | Type: typ, |
| 327 | Options: options, |
| 328 | }) |
| 329 | } |
| 330 | |
| 331 | return tempopbCols, nil |
| 332 | } |
| 333 | |
| 334 | func (dcs DedicatedColumns) Validate() (warnings []error, err error) { |
| 335 | columnCount := map[DedicatedColumnType]map[DedicatedColumnScope]int{} |
no outgoing calls