Skip to content

Commit

Permalink
wire actionexecution
Browse files Browse the repository at this point in the history
  • Loading branch information
turcottedanny committed Jan 27, 2021
1 parent 0e225ca commit 7497d90
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 22 deletions.
4 changes: 4 additions & 0 deletions internal/auth0/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ type ActionBindingAPI interface {
List(triggerID management.TriggerID, opts ...management.RequestOption) (c *management.ActionBindingList, err error)
Update(triggerID management.TriggerID, v []*management.ActionBinding) (list *management.ActionBindingList, err error)
}

type ActionExecutionAPI interface {
Read(id string) (*management.ActionExecution, error)
}
46 changes: 24 additions & 22 deletions internal/auth0/auth0.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,34 @@ import (
// API mimics `management.Management`s general interface, except it refers to
// the interfaces instead of the concrete structs.
type API struct {
Action ActionAPI
ActionVersion ActionVersionAPI
ActionBinding ActionBindingAPI
Client ClientAPI
Connection ConnectionAPI
Log LogAPI
Rule RuleAPI
ResourceServer ResourceServerAPI
Role RoleAPI
CustomDomain CustomDomainAPI
User UserAPI
Action ActionAPI
ActionVersion ActionVersionAPI
ActionExecution ActionExecutionAPI
ActionBinding ActionBindingAPI
Client ClientAPI
Connection ConnectionAPI
Log LogAPI
Rule RuleAPI
ResourceServer ResourceServerAPI
Role RoleAPI
CustomDomain CustomDomainAPI
User UserAPI
}

func NewAPI(m *management.Management) *API {
return &API{
Action: m.Action,
ActionVersion: m.ActionVersion,
ActionBinding: m.ActionBinding,
Client: m.Client,
Connection: m.Connection,
Log: m.Log,
ResourceServer: m.ResourceServer,
Rule: m.Rule,
Role: m.Role,
CustomDomain: m.CustomDomain,
User: m.User,
Action: m.Action,
ActionVersion: m.ActionVersion,
ActionExecution: m.ActionExecution,
ActionBinding: m.ActionBinding,
Client: m.Client,
Connection: m.Connection,
Log: m.Log,
ResourceServer: m.ResourceServer,
Rule: m.Rule,
Role: m.Role,
CustomDomain: m.CustomDomain,
User: m.User,
}
}

Expand Down

0 comments on commit 7497d90

Please sign in to comment.