diff --git a/cli/users.go b/cli/users.go index f21733e5a..4e952d3b9 100644 --- a/cli/users.go +++ b/cli/users.go @@ -63,7 +63,7 @@ var cmdUsers = []cobra.Command{ return } pageMetadata := mgxsdk.PageMetadata{ - Email: Email, + Identity: Identity, Offset: Offset, Limit: Limit, Metadata: metadata, diff --git a/cli/utils.go b/cli/utils.go index 997c8b11c..f18c28b08 100644 --- a/cli/utils.go +++ b/cli/utils.go @@ -20,8 +20,8 @@ var ( Offset uint64 = 0 // Name query parameter. Name string = "" - // Email query parameter. - Email string = "" + // Identity query parameter. + Identity string = "" // Metadata query parameter. Metadata string = "" // Status query parameter. diff --git a/cmd/cli/main.go b/cmd/cli/main.go index 88a6ff57f..d3137492f 100644 --- a/cmd/cli/main.go +++ b/cmd/cli/main.go @@ -203,11 +203,11 @@ func main() { ) rootCmd.PersistentFlags().StringVarP( - &cli.Email, - "email", - "e", + &cli.Identity, + "identity", + "I", "", - "User email query parameter", + "User identity query parameter", ) rootCmd.PersistentFlags().StringVarP( diff --git a/pkg/sdk/go/sdk.go b/pkg/sdk/go/sdk.go index 6da9c0283..a85b2aa26 100644 --- a/pkg/sdk/go/sdk.go +++ b/pkg/sdk/go/sdk.go @@ -74,7 +74,7 @@ type PageMetadata struct { Offset uint64 `json:"offset"` Limit uint64 `json:"limit"` Level uint64 `json:"level,omitempty"` - Email string `json:"email,omitempty"` + Identity string `json:"identity,omitempty"` Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` Metadata Metadata `json:"metadata,omitempty"` @@ -91,6 +91,7 @@ type PageMetadata struct { Topic string `json:"topic,omitempty"` Contact string `json:"contact,omitempty"` State string `json:"state,omitempty"` + Order string `json:"order,omitempty"` } // Credentials represent client credentials: it contains @@ -1186,8 +1187,8 @@ func (pm PageMetadata) query() (string, error) { if pm.Level != 0 { q.Add("level", strconv.FormatUint(pm.Level, 10)) } - if pm.Email != "" { - q.Add("email", pm.Email) + if pm.Identity != "" { + q.Add("identity", pm.Identity) } if pm.Name != "" { q.Add("name", pm.Name) diff --git a/provision/service.go b/provision/service.go index e7aea7c8b..bec90d5b8 100644 --- a/provision/service.go +++ b/provision/service.go @@ -96,7 +96,7 @@ func New(cfg Config, sdk sdk.SDK, logger mglog.Logger) Service { // Mapping retrieves current configuration. func (ps *provisionService) Mapping(token string) (map[string]interface{}, error) { userFilter := sdk.PageMetadata{ - Email: "", + Identity: "", Offset: uint64(offset), Limit: uint64(limit), Metadata: make(map[string]interface{}),