Mainflux.mainflux/provision/api/endpoint.go

47 lines
1.0 KiB
Go
Raw Normal View History

package api
import (
"context"
"github.com/go-kit/kit/endpoint"
"github.com/mainflux/mainflux/provision"
)
func doProvision(svc provision.Service) endpoint.Endpoint {
return func(_ context.Context, request interface{}) (interface{}, error) {
req := request.(provisionReq)
if err := req.validate(); err != nil {
return nil, err
}
NOISSUE - Update provision service (#1133) * Add provision service Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com> * delete sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add provision file Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add provision Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add provision Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix envs Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix vendor Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * deleete LICENSE Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix modules Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix modules Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix modules Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * refactoring provison service Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * provision Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix test, and use sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * remove bootstrap mock Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * implement channel Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * export errors Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix test Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix tests Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix comments Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix tests Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add new line Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * remove docker-compse Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add new line Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix load config Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix load config Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * move certs to sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * move certs to sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * move certs to sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * move certs to sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * change dflt file Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix content Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * cert sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix bootstraping Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix errors Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * update swagger Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix mproxy mod Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix test Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix test Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix linter messages Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix linter errors Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * upd vendor Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * upd vendor Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * remove dead code Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add some space for readability Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * use snake case Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * use snake case Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * use snake case Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * use snake case Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * use snake case Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * remov thingids Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * revert readme Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix logging Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * use snake_case Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix var naming Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix signature Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * aling with defaults Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix logging info Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix logging Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix tag Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2020-04-29 06:39:23 +08:00
token := req.token
MF-1179 - Add a certificate service and certs endpoint to SDK (#1188) * adding certificate issuing Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * adding cert endpoint Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * update envs Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * update envs Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * move certs creation to sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * move certs creation to sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * move certs creation to sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix env vars Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add comment Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * update sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix vars Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add volumes Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix merge config for int Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * remove env Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix error handling Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add cert test, change receiver to pointer Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add docs Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix var naming Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * correct error naming Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * adding certs service Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add certs Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add certs Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * change func receiever Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add default cert issue method Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add config Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * small fix Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * remove some testing code Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add cert issue Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add vault api client Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * additional endpoints Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add swagger for certs Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * remove certs from provision Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * clean provision from certs Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add list certificates endpoint Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add vault api in vendor Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add certs Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add revoke, fix bugs Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix sdk for certs Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * minor changes, add env, doc Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * minor changes, add env, doc Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * minor changes, add env, doc Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * small changes Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * remove CA for signing from provision Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add docker file for certs Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix mock sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add line Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix RevokeCert Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * renam ENV Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * remove tests temporarily Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix naming Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * renam vars Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add cli for issue cert Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add cli for issue cert Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add cli for issue cert Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add cli for issue cert Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * remove not needed envs Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix linter errors, add cli Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix linter errors, add cli, var rename Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix reviews, add viewcert, fix view all certs Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * remove view cert, as it will be retrieved from PKI Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * change endpoints Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add default env val Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * remove some errors Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * refactor, make wrapper lib for vault Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * refactor, make wrapper lib for vault Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * refactor, make wrapper lib for vault Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix revoking Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * refactor, make wrapper lib for vault Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * update vendor Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix comment Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add comments Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * remove unused Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * remove unused field Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * update vendor Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * refactor pki Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * refactor pki Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * refactor pki, update vendor Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * refactor pki Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix comment Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * minor fix Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * remove methods, use fields Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix comments and package desc Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix comments and package desc Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
2020-07-21 18:53:21 +08:00
res, err := svc.Provision(token, req.Name, req.ExternalID, req.ExternalKey)
if err != nil {
NOISSUE - Update provision service (#1133) * Add provision service Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com> * delete sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add provision file Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add provision Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add provision Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix envs Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix vendor Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * deleete LICENSE Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix modules Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix modules Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix modules Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * refactoring provison service Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * provision Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix test, and use sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * remove bootstrap mock Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * implement channel Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * export errors Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix test Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix tests Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix comments Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix tests Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add new line Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * remove docker-compse Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add new line Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix load config Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix load config Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * move certs to sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * move certs to sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * move certs to sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * move certs to sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * change dflt file Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix content Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * cert sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix bootstraping Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix errors Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * update swagger Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix mproxy mod Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix test Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix test Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix linter messages Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix linter errors Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * upd vendor Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * upd vendor Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * remove dead code Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add some space for readability Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * use snake case Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * use snake case Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * use snake case Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * use snake case Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * use snake case Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * remov thingids Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * revert readme Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix logging Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * use snake_case Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix var naming Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix signature Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * aling with defaults Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix logging info Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix logging Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix tag Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2020-04-29 06:39:23 +08:00
return provisionRes{Error: err.Error()}, nil
}
provisionResponse := provisionRes{
NOISSUE - Update provision service (#1133) * Add provision service Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com> * delete sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add provision file Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add provision Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add provision Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix envs Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix vendor Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * deleete LICENSE Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix modules Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix modules Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix modules Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * refactoring provison service Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * provision Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix test, and use sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * remove bootstrap mock Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * implement channel Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * export errors Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix test Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix tests Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix comments Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix tests Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add new line Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * remove docker-compse Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add new line Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix load config Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix load config Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * move certs to sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * move certs to sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * move certs to sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * move certs to sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * change dflt file Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix content Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * cert sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix bootstraping Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix errors Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * update swagger Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix mproxy mod Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix test Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix test Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix linter messages Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix linter errors Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * upd vendor Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * upd vendor Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * remove dead code Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add some space for readability Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * use snake case Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * use snake case Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * use snake case Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * use snake case Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * use snake case Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * remov thingids Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * revert readme Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix logging Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * use snake_case Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix var naming Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix signature Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * aling with defaults Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix logging info Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix logging Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix tag Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2020-04-29 06:39:23 +08:00
Things: res.Things,
Channels: res.Channels,
ClientCert: res.ClientCert,
ClientKey: res.ClientKey,
CACert: res.CACert,
NOISSUE - Update provision service (#1133) * Add provision service Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com> * delete sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add provision file Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add provision Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add provision Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix envs Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix vendor Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * deleete LICENSE Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix modules Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix modules Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix modules Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * refactoring provison service Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * provision Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix test, and use sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * remove bootstrap mock Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * implement channel Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * export errors Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix test Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix tests Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix comments Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix tests Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add new line Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * remove docker-compse Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add new line Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix load config Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix load config Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * move certs to sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * move certs to sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * move certs to sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * move certs to sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * change dflt file Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix content Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * cert sdk Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix bootstraping Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix errors Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * update swagger Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix mproxy mod Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix test Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix test Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix linter messages Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix linter errors Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * upd vendor Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * upd vendor Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * remove dead code Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * add some space for readability Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * use snake case Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * use snake case Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * use snake case Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * use snake case Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * use snake case Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * remov thingids Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * revert readme Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix logging Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * use snake_case Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix var naming Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix signature Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * aling with defaults Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix logging info Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix logging Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * fix tag Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2020-04-29 06:39:23 +08:00
Whitelisted: res.Whitelisted,
}
return provisionResponse, nil
}
}
func getMapping(svc provision.Service) endpoint.Endpoint {
return func(_ context.Context, request interface{}) (interface{}, error) {
req := request.(mappingReq)
if err := req.validate(); err != nil {
return nil, err
}
return svc.Mapping(req.token)
}
}