client

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2016 License: Unlicense Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

cSense API Client

Client library for the cSense API.

Supported Endpoints:

  • Hooks

Installation

$ go get github.com/danielkrainas/csense/api/client

Usage

How to instantiate a new client:

package main

import (
	"net/http"
	"github.com/danielkrainas/csense/api/client"
)

// http/https url of the csense service
const ENDPOINT = "http://localhost:9181"

func main() {
	// Create a new client
	c := client.New(ENDPOINT, http.DefaultClient)
}

Example

A more detailed example can be found here.

Documentation

Index

Constants

View Source
const CLIENT_USER_AGENT = "csense-client/1.0.0"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Endpoint   string
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

func New

func New(endpoint string, httpClient *http.Client) *Client

func (*Client) Hooks

func (c *Client) Hooks() HooksAPI

func (*Client) Ping

func (c *Client) Ping() error

type HooksAPI

type HooksAPI interface {
	CreateHook(r *v1.NewHookRequest) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL