-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for importing Flows, Forms and FlowVaultConnections Terra…
…form Resources (#1084) * Added cli support to terraform import flow, form and vault connection * Added docs + updated test case * minor update to version * Added test cases * Added negative testing
- Loading branch information
1 parent
e7536d4
commit 865487b
Showing
10 changed files
with
865 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
//go:generate mockgen -source=flow.go -destination=mock/flow_mock.go -package=mock | ||
|
||
package auth0 | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/auth0/go-auth0/management" | ||
) | ||
|
||
type FlowAPI interface { | ||
// Create a new flow. | ||
Create(ctx context.Context, r *management.Flow, opts ...management.RequestOption) error | ||
|
||
// Read flow details. | ||
Read(ctx context.Context, id string, opts ...management.RequestOption) (r *management.Flow, err error) | ||
|
||
// Update an existing flow. | ||
Update(ctx context.Context, id string, r *management.Flow, opts ...management.RequestOption) error | ||
|
||
// Delete a flow. | ||
Delete(ctx context.Context, id string, opts ...management.RequestOption) error | ||
|
||
// List flow. | ||
List(ctx context.Context, opts ...management.RequestOption) (r *management.FlowList, err error) | ||
} | ||
|
||
type FlowVaultConnectionAPI interface { | ||
// CreateConnection Create a new flow vault connection. | ||
CreateConnection(ctx context.Context, r *management.FlowVaultConnection, opts ...management.RequestOption) error | ||
|
||
// GetConnection Retrieve flow vault connection details. | ||
GetConnection(ctx context.Context, id string, opts ...management.RequestOption) (r *management.FlowVaultConnection, err error) | ||
|
||
// UpdateConnection Update an existing flow vault connection. | ||
UpdateConnection(ctx context.Context, id string, r *management.FlowVaultConnection, opts ...management.RequestOption) error | ||
|
||
// DeleteConnection Delete a flow vault connection. | ||
DeleteConnection(ctx context.Context, id string, opts ...management.RequestOption) error | ||
|
||
// GetConnectionList List flow vault connections. | ||
GetConnectionList(ctx context.Context, opts ...management.RequestOption) (r *management.FlowVaultConnectionList, err error) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
//go:generate mockgen -source=form.go -destination=mock/form_mock.go -package=mock | ||
|
||
package auth0 | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/auth0/go-auth0/management" | ||
) | ||
|
||
type FormAPI interface { | ||
// Create a new form. | ||
Create(ctx context.Context, r *management.Form, opts ...management.RequestOption) error | ||
|
||
// Read form details. | ||
Read(ctx context.Context, id string, opts ...management.RequestOption) (r *management.Form, err error) | ||
|
||
// Update an existing action. | ||
Update(ctx context.Context, id string, r *management.Form, opts ...management.RequestOption) error | ||
|
||
// Delete an action. | ||
Delete(ctx context.Context, id string, opts ...management.RequestOption) error | ||
|
||
// List form. | ||
List(ctx context.Context, opts ...management.RequestOption) (r *management.FormList, err error) | ||
} |
Oops, something went wrong.