项目作者: DigivityBV

项目描述 :
Cpanel&WHM Go Client :bell:
高级语言: Go
项目地址: git://github.com/DigivityBV/cpanelgo.git
创建时间: 2018-12-07T23:06:09Z
项目社区:https://github.com/DigivityBV/cpanelgo

开源协议:MIT License

下载


Cpanel & WHM API for GOLANG

Contents

Installation Guide

To install this package, you can run this code

  1. go get https://github.com/DigivityBV/cpanelgo

Usage

For example, if you would like to get list accounts of your whm server,

Firstly auth the whm panel

  1. client, err := cp.New(username, host, password)
  2. if err != nil {
  3. panic(err)
  4. }

Then list accounts

  1. accounts, err := client.ListAccounts()
  2. if err != nil {
  3. panic(err)
  4. }

Cpanel API Usage

Visit CPANEL API To all modules and functions

  1. client, err := cp.New(username, host, password)
  2. if err != nil {
  3. panic(err)
  4. }
  5. message, err := client.Cpanel(module, function, username)
  6. if err != nil {
  7. panic(err)
  8. }

Feedback and contribution

This package is free and open source, feel free to fork and report some issue to this package. :)