webhook

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

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