data

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSourceOrganizationWebhooks

func GetSourceOrganizationWebhooks(owner string, g *APIGetter) ([]byte, error)

func SensitivePrompt

func SensitivePrompt(label string) string

The entered password will not be displayed on the screen

Types

type APIGetter

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

func NewAPIGetter

func NewAPIGetter(restClient api.RESTClient) *APIGetter

func (*APIGetter) CreateOrganizationWebhook

func (g *APIGetter) CreateOrganizationWebhook(owner string, data io.Reader) error

func (*APIGetter) CreateWebhookList

func (g *APIGetter) CreateWebhookList(data [][]string) []CreatedWebhook

func (*APIGetter) GetOrganizationWebhooks

func (g *APIGetter) GetOrganizationWebhooks(owner string) ([]byte, error)

type Config

type Config struct {
	ContentType string `json:"content_type"`
	InsecureSSL string `json:"insecure_ssl"`
	Secret      string `json:"secret"`
	Url         string `json:"url"`
}

type CreatedWebhook

type CreatedWebhook struct {
	Name   string   `json:"name"`
	Active bool     `json:"active"`
	Events []string `json:"events"`
	Config Config   `json:"config"`
}

type Getter

type Getter interface {
	GetOrganizationWebhooks(owner string) ([]byte, error)
	CreateWebhookList(data [][]string) []Webhook
	CreateOrganizationWebhook(owner string, data []byte) error
}

type Webhook

type Webhook struct {
	HookType  string    `json:"type"`
	ID        int       `json:"id"`
	Name      string    `json:"name"`
	Active    bool      `json:"active"`
	Events    []string  `json:"events"`
	Config    Config    `json:"config"`
	UpdatedAt time.Time `json:"updated_at"`
	CreatedAt time.Time `json:"created_at"`
}

Jump to

Keyboard shortcuts

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