func resetVerbosityEndpoint(lc spec.LogControl) endpoint.Endpoint { return func(ctx context.Context, request interface{}) (interface{}, error) { err := lc.ResetVerbosity(ctx) if err != nil { return api.WithError(maskAny(err)), nil } return api.WithSuccess(), nil } }
func setVerbosityEndpoint(lc spec.LogControl) endpoint.Endpoint { return func(ctx context.Context, request interface{}) (interface{}, error) { req := request.(api.SetVerbosityRequest) err := lc.SetVerbosity(ctx, req.Verbosity) if err != nil { return api.WithError(maskAny(err)), nil } return api.WithSuccess(), nil } }