mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-31 15:29:48 +02:00
Update import api and environment detection
This commit is contained in:
parent
bf4c2beba8
commit
5a53c6304c
7 changed files with 178 additions and 320 deletions
|
@ -121,7 +121,7 @@ func (api *API) GetClusterResourceBundles(ctx context.Context) (*cluster_api.Get
|
|||
)
|
||||
}
|
||||
|
||||
func (api *API) ImportConfig(ctx context.Context, cfg *configpb.Config) (*cluster_api.ImportResponse, error) {
|
||||
func (api *API) ImportConfig(ctx context.Context, cfg *configpb.Config, params *cluster_api.ImportConfigurationParams) (*cluster_api.ImportResponse, error) {
|
||||
data, err := proto.Marshal(cfg)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -139,15 +139,12 @@ func (api *API) ImportConfig(ctx context.Context, cfg *configpb.Config) (*cluste
|
|||
return nil, err
|
||||
}
|
||||
return apierror.CheckResponse(api.cluster.ImportConfigurationWithBodyWithResponse(ctx,
|
||||
params,
|
||||
"application/octet-stream",
|
||||
&compressedData,
|
||||
))
|
||||
}
|
||||
|
||||
func (api *API) GetQuotas(ctx context.Context) (*cluster_api.ConfigQuotas, error) {
|
||||
return apierror.CheckResponse(api.cluster.GetQuotasWithResponse(ctx))
|
||||
}
|
||||
|
||||
func (api *API) GetTelemetryConn() *grpc.ClientConn {
|
||||
return api.telemetryConn
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue