client

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2019 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Webhook

type Webhook struct {
	QaasHost     string
	QaasPort     int
	QaasCertFile string
}

Webhook provides client interfaces for managing webhook registry on the QaaS server, using the RESTful interface.

func (*Webhook) Delete

func (s *Webhook) Delete(id string, removeDir bool) error

Delete removes a webhook with the given id.

The deletion maily removes webhook registry from QaaS server. If removeDir is true, the local webhook working directory is removed when the webhook is unregistered from the QaaS server.

func (*Webhook) List

func (s *Webhook) List() (chan WebhookInfo, error)

List retrieves a list of webhooks of the current user. The information of webhooks is returned with a channel.

func (*Webhook) New

func (s *Webhook) New(script string) (*url.URL, error)

New provisions a new webhook for QaaS and registry the new webhook at the QaaS server.

type WebhookInfo

type WebhookInfo struct {
	ID string
}

WebhookInfo is a data structure containing the information (and/or attributes) of a webhook.

Jump to

Keyboard shortcuts

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