1
0
mirror of https://github.com/mainflux/mainflux.git synced 2025-04-28 13:48:49 +08:00
Mainflux.mainflux/pkg/sdk/go/requests.go
b1ackd0t 7cccba91c9
NOISSUE - Reformat Things and Users Policies Endpoint (#1831)
* Reformat Policies Enpoint to Take Sub Obj

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add Redirect to `policies`

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Make Delete Endpoint not to Contain Body

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Remove gRPC unused functions

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Remove Redirect

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Update CLI

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Use Switch Statement

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Uncomment Commented Parts

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add Empty Line

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Remove Unused gRPC Req and Resp

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix Listing of Policies

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Rename Authorize Functions For Users and Things Service

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add Authorize To CLI

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

---------

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
2023-07-28 14:39:13 +02:00

40 lines
1.0 KiB
Go

// Copyright (c) Mainflux
// SPDX-License-Identifier: Apache-2.0
package sdk
// updateClientSecretReq is used to update the client secret.
type updateClientSecretReq struct {
OldSecret string `json:"old_secret,omitempty"`
NewSecret string `json:"new_secret,omitempty"`
}
type updateThingSecretReq struct {
Secret string `json:"secret,omitempty"`
}
// updateClientIdentityReq is used to update the client identity.
type updateClientIdentityReq struct {
token string
id string
Identity string `json:"identity,omitempty"`
}
// UserPasswordReq contains old and new passwords.
type UserPasswordReq struct {
OldPassword string `json:"old_password,omitempty"`
Password string `json:"password,omitempty"`
}
// ConnectionIDs contains ID lists of things and channels to be connected.
type ConnectionIDs struct {
ThingIDs []string `json:"subjects"`
ChannelIDs []string `json:"objects"`
Actions []string `json:"actions,omitempty"`
}
type tokenReq struct {
Identity string `json:"identity"`
Secret string `json:"secret"`
}