Giter VIP home page Giter VIP logo

libvmod-jq's Introduction

libvmod-jq

ci codecov

About

A Varnish master VMOD to process JSON input.

Requirements

To build this VMOD you will need:

  • make
  • a C compiler, e.g. GCC or clang
  • pkg-config
  • python3-docutils or docutils in macOS [1]
  • Varnish master built from sources
  • libjq-dev in recent Debian/Ubuntu releases, jq in macOS [1]. See also https://github.com/stedolan/jq

If you are building from Git, you will also need:

  • autoconf
  • automake
  • libtool

In addition, you will need to set PKG_CONFIG_PATH to the directory where varnishapi.pc is located before running autogen.sh and configure. For example:

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

Installation

From a tarball

To install this VMOD, run the following commands:

./configure
make
make check
sudo make install

The make check step is optional but it's good to know whether the tests are passing on your platform.

From the Git repository

To install from Git, clone this repository by running:

git clone --recursive https://github.com/varnishcache-friends/libvmod-jq

And then run ./autogen.sh followed by the instructions above for installing from a tarball.

Example

import jq;

sub vcl_recv {
	jq.parse(string, "[1, 2, 3]");
	if (jq.get(".[0]", "10") == "1") {
		...
	}
}

License

This VMOD is licensed under BSD license. See LICENSE for details.

Note

  1. Using Homebrew, https://github.com/Homebrew/brew/.

libvmod-jq's People

Contributors

fgsch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

zdeneksvarc

libvmod-jq's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.