antlabs

package module
v0.0.0-...-d66b983 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2012 License: GPL-3.0 Imports: 6 Imported by: 0

README

Go library for ANTLabs devices

This library provides communication with ANTLabs devices in the Go Language. Specifically, it implements the API for innGate gateways. The ANTLabs InnGate API is capable of managing accounts, authenticating users, retrieving information about plans and processing billing through the PMS module (if enabled). In other words, this library implements the antlabs api in golang.

Install this package:

go get github.com/secesh/gantlabs

Example:

package main

import (
    "fmt"
    "github.com/secesh/gantlabs/innGate"
)
func main(){    
    ant := innGateApi.Host{ Host : "ant.example.com" }
    
    resp, _ := ant.ApiVersion()
    fmt.Println("API_Version:", resp.ApiVersion)
    
    resp2, _ := ant.AccountGetAll(innGateApi.AccountGetAllRequest{Creator : "admin"})
    fmt.Println("Got", resp2.Count, "accounts")

    resp3, _ := ant.AccountDelete(innGateApi.AccountDeleteRequest{Code : []string{"abc123", "def456"}})
    fmt.Println("Deleted", resp3.Deleted, "accounts")
}

InnGate API Status:

Below is a list of API modules supported by the ANTLabs InnGate.

  • Bold modules are implemented (but not much testing yet).
  • Non-bold modules are not yet implemented.

Account

  • account_add
  • account_delete
  • account_get
  • account_get_all
  • account_update

API

  • api_module
  • api_modules
  • api_password_get (only available to native PHP API)
  • api_version

Authentication

  • auth_authenticate
  • auth_init
  • auth_login
  • auth_logout
  • auth_update
  • sid_get
  • publicip_get

Plan

  • plan_get_all
  • plan_get_id

Data

  • data_get
  • data_set
  • data_get_keys
  • data_get_names
  • data_delete

Property Management System (PMS)

  • pms_billing_log
  • pms_guest_status
  • pms_post_check
  • pms_post
  • pms_room_status

Network

  • vlan_get
  • vlan_update
  • device_status

Credit Card

  • cc_payflowpro_post

Miscellaneous

  • browser

Contact:

gantlabs@chasefox.net

Documentation

Overview

Package antlabs provides methods to communicate with an ANTLabs device. http://www.antlabs.com/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Host

type Host struct {
	Host      string
	Port      int
	ApiPass   string
	AdminPass string
	AdminName string
}

func (*Host) InnGateApiRequest

func (ant *Host) InnGateApiRequest(queryString string) (parsed_body [][]string, err error)

InnGateAPIRequest takes a querystring as the only argument and returns a map of values. All ANTLabs InnGate API requests work by a very simple webservice. A URL is crafted according to the API to make the proper request. The result is a plain-text file with lines that look like: field = value when a field has multiple values, they'll be delimited by pipes: field = value1|value2|value3|... The map of fields to values is produced by processing the body in parseBody().

Directories

Path Synopsis
Package innGateApi implements the ANTLabs InnGate API, a structured method of communication with an ANTLabs InnGate.
Package innGateApi implements the ANTLabs InnGate API, a structured method of communication with an ANTLabs InnGate.

Jump to

Keyboard shortcuts

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