iworx

package module
v0.0.0-...-398975b Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2020 License: MIT Imports: 10 Imported by: 0

README

iworxApi

InterWorx API bindings for Golang

Uses XMLRPC:

http://xmlrpc.com/spec.md

InterWorx authentication information:

http://docs.interworx.com/interworx/api/index-Introduction.php#toc-Section--1 http://docs.interworx.com/interworx/api/index-Using-the-API.php#toc-Section-2.1

BaseURL for XMLRPC is:

https://%%SERVERNAME%%:2443/xmlrpc

InterWorx NodeWorx and SiteWorx APIs appear to not do any session persistance:

https://www.php.net/manual/en/soapserver.setpersistence.php

So we have to send credentials every time

Documentation

Index

Constants

View Source
const NodeWorxAPIRoute = "iworx.route"

Variables

This section is empty.

Functions

func InsecureSSHKeyfileConfig

func InsecureSSHKeyfileConfig(username, keyFile string) (ssh.ClientConfig, error)

Types

type Account

type Account struct {
	Username     string
	Domain       string
	ContactEmail string

	Reseller      string
	HomePartition string
	Shell         string
	Package       string
	Theme         string

	BackupsEnabled        bool
	Suspended             bool
	Locked                bool
	OutgoingMailSuspended bool
	OutgoingMailHold      bool

	MailboxFormat            int8
	MaxDeferPrecent          string
	MinDeferBeforeProtection string
	MaxEmailPerHour          string

	MainIPv4 net.IP
	MainIPv6 net.IP

	EmailQuotaLimit string
	MaxAddons       string
	MaxFtp          string
	MaxMailingLists string
	MaxParked       string
	MaxPop          string
	MaxDatabases    string
	MaxSubdomains   string

	DiskLimit  int
	DiskUsed   int
	InodeLimit int
	InodeUsed  int
}

Account represents a SiteWorx account

type NodeWorxAPI

type NodeWorxAPI struct {
	// contains filtered or unexported fields
}

func NewNodeWorxAPI

func NewNodeWorxAPI(hostname string) (*NodeWorxAPI, error)

func (*NodeWorxAPI) APIKeyAuthenticate

func (a *NodeWorxAPI) APIKeyAuthenticate(key, domain string)

func (*NodeWorxAPI) Call

func (a *NodeWorxAPI) Call(
	controller string,
	action string,
	input interface{},
	output interface{},
) error

func (*NodeWorxAPI) LocalSessionAuthenticate

func (a *NodeWorxAPI) LocalSessionAuthenticate() error

func (*NodeWorxAPI) NodeWorxSessionAuthenticate

func (a *NodeWorxAPI) NodeWorxSessionAuthenticate(session, domain string)

func (*NodeWorxAPI) NodeWorxVersion

func (a *NodeWorxAPI) NodeWorxVersion() (string, error)

func (*NodeWorxAPI) SSHSessionAuthenticate

func (a *NodeWorxAPI) SSHSessionAuthenticate(
	hostname string,
	port int,
	config ssh.ClientConfig,
) error

func (*NodeWorxAPI) UserAuthenticate

func (a *NodeWorxAPI) UserAuthenticate(username, password, domain string)

Directories

Path Synopsis
demo

Jump to

Keyboard shortcuts

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