client

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2019 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WebhookConfig added in v0.2.0

type WebhookConfig struct {
	QaasHost     string
	QaasPort     int
	QaasCertFile string
}

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

func (*WebhookConfig) Delete added in v0.2.0

func (s *WebhookConfig) 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 (*WebhookConfig) GetInfo added in v0.2.0

func (s *WebhookConfig) GetInfo(id string) (WebhookConfigInfo, error)

GetInfo retrieves information of a single Webhook configuration referred by the hash id.

func (*WebhookConfig) List added in v0.2.0

func (s *WebhookConfig) List() (chan WebhookConfigInfo, error)

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

func (*WebhookConfig) New added in v0.2.0

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

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

type WebhookConfigInfo added in v0.2.0

type WebhookConfigInfo struct {
	ID           string
	Description  string
	CreationTime string
	Script       string
	WebhookURL   string
}

WebhookConfigInfo 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