@@ -35,7 +35,7 @@ type Service interface {
3535 // Subscribe subscribes message from the broker using the thingKey for authorization,
3636 // and the channelID for subscription. Subtopic is optional.
3737 // If the subscription is successful, nil is returned otherwise error is returned.
38- Subscribe (ctx context.Context , thingKey , chanID , subtopic string , client * Client ) error
38+ Subscribe (ctx context.Context , thingKey , chanID , subtopic string , client * Client ) errors. Error
3939}
4040
4141var _ Service = (* adapterService )(nil )
@@ -53,7 +53,7 @@ func New(authClient magistrala.AuthzServiceClient, pubsub messaging.PubSub) Serv
5353 }
5454}
5555
56- func (svc * adapterService ) Subscribe (ctx context.Context , thingKey , chanID , subtopic string , c * Client ) error {
56+ func (svc * adapterService ) Subscribe (ctx context.Context , thingKey , chanID , subtopic string , c * Client ) errors. Error {
5757 if chanID == "" || thingKey == "" {
5858 return svcerr .ErrAuthentication
5959 }
@@ -84,7 +84,7 @@ func (svc *adapterService) Subscribe(ctx context.Context, thingKey, chanID, subt
8484
8585// authorize checks if the thingKey is authorized to access the channel
8686// and returns the thingID if it is.
87- func (svc * adapterService ) authorize (ctx context.Context , thingKey , chanID , action string ) (string , error ) {
87+ func (svc * adapterService ) authorize (ctx context.Context , thingKey , chanID , action string ) (string , errors. Error ) {
8888 ar := & magistrala.AuthorizeReq {
8989 SubjectType : auth .ThingType ,
9090 Permission : action ,
0 commit comments