MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / save

Method save

module/certificate/impl.go:78–95  ·  view source on GitHub ↗
(ctx context.Context, id string, clusterId string, create *certificatedto.FileInput)

Source from the content-addressed store, hash-verified

76}
77
78func (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
97func (m *imlCertificate) syncGateway(ctx context.Context, clusterId string, releaseInfo *gateway.DynamicRelease, online bool) error {
98 client, err := m.clusterService.GatewayClient(ctx, clusterId)

Callers 15

CreateMethod · 0.95
UpdateMethod · 0.95
openModalFunction · 0.80
addKeyFunction · 0.80
editKeyFunction · 0.80
openModalFunction · 0.80
handleSaveFilterFunction · 0.80
configureServiceFunction · 0.80
handleEditFunction · 0.80
addModelFunction · 0.80
addProviderFunction · 0.80
OnlineModelListFunction · 0.80

Calls 1

SaveMethod · 0.65

Tested by

no test coverage detected