func New(s service.IAuthzService, mdw map[string][]endpoint.Middleware) Endpoints {
	eps := Endpoints{
		UpsertPolicyEndpoint:      MakeUpsertPolicyEndpoint(s),
		ListPolicyEndpoint:        MakeListPolicyEndpoint(s),
		RemovePolicyEndpoint:      MakeRemovePolicyEndpoint(s),
		RemovePolicyBySubEndpoint: MakeRemovePolicyBySubEndpoint(s),
	}
	for _, m := range mdw["CreateAccount"] {
		eps.ListPolicyEndpoint = m(eps.ListPolicyEndpoint)
	}
	return eps
}
// New returns a Endpoints struct that wraps the provided service, and wires in all of the
// expected endpoint middlewares
New returns a Endpoints struct that wraps the provided service, and wires in all of the
expected endpoint middlewares
// New returns a Endpoints struct that wraps the provided service and wires in all of the // expected endpoint middlewares
func New(s service.IAuthzService, mdw map[string][]endpoint.Middleware) Endpoints {
	eps := Endpoints{
		UpsertPolicyEndpoint:      MakeUpsertPolicyEndpoint(s),
		ListPolicyEndpoint:        MakeListPolicyEndpoint(s),
		RemovePolicyEndpoint:      MakeRemovePolicyEndpoint(s),
		RemovePolicyBySubEndpoint: MakeRemovePolicyBySubEndpoint(s),
	}
	for _, m := range mdw["CreateAccount"] {
		eps.ListPolicyEndpoint = m(eps.ListPolicyEndpoint)
	}
	return eps
}
func New ( s service . IAuthzService , mdw map [ string ] [ ] endpoint . Middleware ) Endpoints { eps := Endpoints { UpsertPolicyEndpoint : MakeUpsertPolicyEndpoint ( s ) , ListPolicyEndpoint : MakeListPolicyEndpoint ( s ) , RemovePolicyEndpoint : MakeRemovePolicyEndpoint ( s ) , RemovePolicyBySubEndpoint : MakeRemovePolicyBySubEndpoint ( s ) , } for _ , m := range mdw [ " " ] { eps . ListPolicyEndpoint = m ( eps . ListPolicyEndpoint ) } return eps }
New returns a Endpoints struct that wraps the provided service, and wires in all of the
expected endpoint middlewares
New returns a Endpoints struct that wraps the provided service and wires in all of the expected endpoint middlewares