webhook

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: Apache-2.0 Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HeaderType

type HeaderType []Headers

func (*HeaderType) Scan

func (h *HeaderType) Scan(value interface{}) error

func (HeaderType) Value

func (h HeaderType) Value() (driver.Value, error)

type Headers

type Headers struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type ResponseWebhook

type ResponseWebhook struct {
	WebhookID    uuid.UUID          `json:"webhookID"`
	Description  string             `json:"description"`
	Method       string             `json:"method"`
	URL          string             `json:"url"`
	Headers      HeaderType         `json:"headers"`
	RepositoryID uuid.UUID          `json:"repositoryID"`
	Repository   account.Repository `json:"repository" gorm:"foreignkey:RepositoryID;association_foreignkey:RepositoryID"`
	CompanyID    uuid.UUID          `json:"companyID"`
	CreatedAt    time.Time          `json:"createdAt"`
	UpdatedAt    time.Time          `json:"updatedAt"`
}

type Webhook

type Webhook struct {
	WebhookID    uuid.UUID  `json:"webhookID" gorm:"primary_key" swaggerignore:"true"`
	Description  string     `json:"description"`
	URL          string     `json:"url"`
	Method       string     `json:"method"`
	Headers      HeaderType `json:"headers"`
	RepositoryID uuid.UUID  `json:"repositoryID" swaggerignore:"true"`
	CompanyID    uuid.UUID  `json:"companyID" swaggerignore:"true"`
	CreatedAt    time.Time  `json:"createdAt" swaggerignore:"true"`
	UpdatedAt    time.Time  `json:"updatedAt" swaggerignore:"true"`
}

func (*Webhook) GetHeaders

func (w *Webhook) GetHeaders() map[string]string

func (*Webhook) GetMethod

func (w *Webhook) GetMethod() string

func (*Webhook) GetTable

func (w *Webhook) GetTable() string

func (*Webhook) SetCompanyIDAndRepositoryID

func (w *Webhook) SetCompanyIDAndRepositoryID(companyIDString, repositoryIDString string) (*Webhook, error)

func (*Webhook) SetWebhookID

func (w *Webhook) SetWebhookID(id uuid.UUID) *Webhook

func (*Webhook) ToBytes

func (w *Webhook) ToBytes() []byte

func (*Webhook) Validate

func (w *Webhook) Validate() error

Jump to

Keyboard shortcuts

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