(ctx context.Context, id string, clusterId string, create *certificatedto.FileInput)
| 76 | } |
| 77 | |
| 78 | func (m *imlCertificate) save(ctx context.Context, id string, clusterId string, create *certificatedto.FileInput) (*certificatedto.Certificate, error) { |
| 79 | |
| 80 | keyData, err := base64.StdEncoding.DecodeString(create.Key) |
| 81 | if err != nil { |
| 82 | |
| 83 | return nil, fmt.Errorf("decode key error: %w", err) |
| 84 | } |
| 85 | certData, err := base64.StdEncoding.DecodeString(create.Cert) |
| 86 | if err != nil { |
| 87 | return nil, fmt.Errorf("decode cert error: %w", err) |
| 88 | } |
| 89 | o, err := m.service.Save(ctx, id, clusterId, keyData, certData) |
| 90 | if err != nil { |
| 91 | return nil, err |
| 92 | } |
| 93 | out := certificatedto.FromModel(o) |
| 94 | return out, nil |
| 95 | } |
| 96 | |
| 97 | func (m *imlCertificate) syncGateway(ctx context.Context, clusterId string, releaseInfo *gateway.DynamicRelease, online bool) error { |
| 98 | client, err := m.clusterService.GatewayClient(ctx, clusterId) |
no test coverage detected