config

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2019 License: BSD-3-Clause Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WebhookConfig

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

func NewConfigFromFile

func NewConfigFromFile(path string) (*WebhookConfig, error)

func (*WebhookConfig) GetDispatcherConfigByName

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

func (*WebhookConfig) GetReceiverConfigByName

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

func (*WebhookConfig) GetTransformationConfigByName

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

type WebhookDaemonConfig

type WebhookDaemonConfig struct {
	Protocol   string `json:"protocol,omitempty"`
	Host       string `json:"host,omitempty"`
	Port       int    `json:"port,omitempty"`
	AllowDebug bool   `json:"allow_debug"`
}

type WebhookDispatcherConfig

type WebhookDispatcherConfig struct {
	Name     string `json:"name"`
	Host     string `json:"host,omitempty"`
	Port     int    `json:"port,omitempty"`
	Channel  string `json:"channel,omitempty"`
	Config   string `json:"config,omitempty"`
	DSN      string `json:"dsn,omitempty"`
	Function string `json:"function,omitempty"`
}

type WebhookReceiverConfig

type WebhookReceiverConfig struct {
	Name   string `json:"name"`
	Secret string `json:"secret,omitempty"`
	Ref    string `json:"ref,omitempty"`
}

type WebhookTransformationConfig

type WebhookTransformationConfig struct {
	Name                 string `json:"name"`
	Language             string `json:"language,omitempty"`
	Clucking             bool   `json:"clucking,omitempty"`
	ExcludeAdditions     bool   `json:"exclude_additions,omitempty"`
	ExcludeModifications bool   `json:"exclude_modifications,omitempty"`
	ExcludeDeletions     bool   `json:"exclude_deletions,omitempty"`
}

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