webhooks

package
v0.0.0-...-8e7030c Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package webhooks provides the ability to trigger an action represented by a webhook from the OpenStack Clustering Service.

Example to Trigger webhook action

result, err := webhooks.Trigger(serviceClient(), "f93f83f6-762b-41b6-b757-80507834d394", webhooks.TriggerOpts{V: "1"}).Extract()
if err != nil {
	panic(err)
}

fmt.Println("result", result)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TriggerOpts

type TriggerOpts struct {
	V      string `q:"V" required:"true"`
	Params map[string]string
}

TriggerOpts represents options used for triggering an action

func (TriggerOpts) ToWebhookTriggerQuery

func (opts TriggerOpts) ToWebhookTriggerQuery() (string, error)

Query string builder for webhooks

type TriggerOptsBuilder

type TriggerOptsBuilder interface {
	ToWebhookTriggerQuery() (string, error)
}

TriggerOptsBuilder Query string builder interface for webhooks

type TriggerResult

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

func Trigger

func Trigger(client *gophercloud.ServiceClient, id string, opts TriggerOptsBuilder) (r TriggerResult)

Trigger an action represented by a webhook.

func (TriggerResult) Extract

func (r TriggerResult) Extract() (string, error)

Extract retrieves the response action

Directories

Path Synopsis
clustering_webhooks_v1
clustering_webhooks_v1

Jump to

Keyboard shortcuts

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