config

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WebhookConfig

type WebhookConfig struct {
	Daemon          string                  `json:"daemon"`
	Receivers       map[string]string       `json:"receivers"`
	Dispatchers     map[string]string       `json:"dispatchers"`
	Transformations map[string]string       `json:"transformations"`
	Webhooks        []WebhookWebhooksConfig `json:"webhooks"`
}

func NewConfigFromReader

func NewConfigFromReader(ctx context.Context, fh io.Reader) (*WebhookConfig, error)

func NewConfigFromURI

func NewConfigFromURI(ctx context.Context, uri string) (*WebhookConfig, error)

func (*WebhookConfig) GetDispatcherConfigByName

func (c *WebhookConfig) GetDispatcherConfigByName(name string) (string, error)

func (*WebhookConfig) GetReceiverConfigByName

func (c *WebhookConfig) GetReceiverConfigByName(name string) (string, error)

func (*WebhookConfig) GetTransformationConfigByName

func (c *WebhookConfig) GetTransformationConfigByName(name string) (string, error)

type WebhookWebhooksConfig

type WebhookWebhooksConfig struct {
	Endpoint        string   `json:"endpoint"`
	Receiver        string   `json:"receiver"`
	Transformations []string `json:"transformations"`
	Dispatchers     []string `json:"dispatchers"`
}

Jump to

Keyboard shortcuts

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