(ctx context.Context, databaseID string, params scalingo.DatabaseNetPeeringCreateParams)
| 82 | } |
| 83 | |
| 84 | func DatabaseNetPeeringsAdd(ctx context.Context, databaseID string, params scalingo.DatabaseNetPeeringCreateParams) error { |
| 85 | c, err := config.ScalingoClient(ctx) |
| 86 | if err != nil { |
| 87 | return errors.Wrap(ctx, err, "get Scalingo client") |
| 88 | } |
| 89 | |
| 90 | netPeering, err := c.Preview().DatabaseNetPeeringCreate(ctx, databaseID, params) |
| 91 | if err != nil { |
| 92 | return errors.Wrap(ctx, err, "add database net peering") |
| 93 | } |
| 94 | |
| 95 | io.Statusf("Net peering '%s' creation has been initiated for database '%s'.\n", netPeering.ID, databaseID) |
| 96 | io.Warning("Expect some delay for the net peering to be applied.") |
| 97 | |
| 98 | return nil |
| 99 | } |
| 100 | |
| 101 | func DatabaseNetPeeringsRemove(ctx context.Context, databaseID, netPeeringID string) error { |
| 102 | c, err := config.ScalingoClient(ctx) |
no test coverage detected