integration

package
v0.0.0-...-aeea160 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidID = id.ErrInvalidID
View Source
var NewWebhookID = id.NewWebhookID

Functions

This section is empty.

Types

type Builder

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

func New

func New() *Builder

func (*Builder) Build

func (b *Builder) Build() (*Integration, error)

func (*Builder) Description

func (b *Builder) Description(description string) *Builder

func (*Builder) Developer

func (b *Builder) Developer(developer UserID) *Builder

func (*Builder) GenerateToken

func (b *Builder) GenerateToken() *Builder

func (*Builder) ID

func (b *Builder) ID(id ID) *Builder

func (*Builder) LogoUrl

func (b *Builder) LogoUrl(logoURL *url.URL) *Builder

func (*Builder) MustBuild

func (b *Builder) MustBuild() *Integration

func (*Builder) Name

func (b *Builder) Name(name string) *Builder

func (*Builder) NewID

func (b *Builder) NewID() *Builder

func (*Builder) Token

func (b *Builder) Token(token string) *Builder

func (*Builder) Type

func (b *Builder) Type(t Type) *Builder

func (*Builder) UpdatedAt

func (b *Builder) UpdatedAt(updatedAt time.Time) *Builder

func (*Builder) Webhook

func (b *Builder) Webhook(webhook []*Webhook) *Builder

type ID

type ID = id.IntegrationID

type Integration

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

func (*Integration) AddWebhook

func (i *Integration) AddWebhook(w *Webhook)

func (*Integration) Clone

func (i *Integration) Clone() *Integration

func (*Integration) CreatedAt

func (i *Integration) CreatedAt() time.Time

func (*Integration) DeleteWebhook

func (i *Integration) DeleteWebhook(wId WebhookID) bool

func (*Integration) Description

func (i *Integration) Description() string

func (*Integration) Developer

func (i *Integration) Developer() UserID

func (*Integration) ID

func (i *Integration) ID() ID

func (*Integration) LogoUrl

func (i *Integration) LogoUrl() *url.URL

func (*Integration) Name

func (i *Integration) Name() string

func (*Integration) RandomToken

func (i *Integration) RandomToken()

func (*Integration) SetDescription

func (i *Integration) SetDescription(description string)

func (*Integration) SetDeveloper

func (i *Integration) SetDeveloper(developer UserID)

func (*Integration) SetLogoUrl

func (i *Integration) SetLogoUrl(logoUrl *url.URL)

func (*Integration) SetName

func (i *Integration) SetName(name string)

func (*Integration) SetToken

func (i *Integration) SetToken(token string)

func (*Integration) SetType

func (i *Integration) SetType(t Type)

func (*Integration) SetUpdatedAt

func (i *Integration) SetUpdatedAt(updatedAt time.Time)

func (*Integration) SetWebhook

func (i *Integration) SetWebhook(webhook []*Webhook)

func (*Integration) Token

func (i *Integration) Token() string

func (*Integration) Type

func (i *Integration) Type() Type

func (*Integration) UpdateWebhook

func (i *Integration) UpdateWebhook(wId WebhookID, w *Webhook) bool

func (*Integration) UpdatedAt

func (i *Integration) UpdatedAt() time.Time

func (*Integration) Webhook

func (i *Integration) Webhook(wId WebhookID) (*Webhook, bool)

func (*Integration) Webhooks

func (i *Integration) Webhooks() []*Webhook

type List

type List []*Integration

func (List) ActiveWebhooks

func (l List) ActiveWebhooks(ty event.Type) []*Webhook

func (List) Clone

func (l List) Clone() List

func (List) SortByID

func (l List) SortByID() List

type ModelID

type ModelID = id.ModelID

type Type

type Type string
const (
	TypePublic Type = "public"

	TypePrivate Type = "private"
)

func TypeFrom

func TypeFrom(s string) Type

type UserID

type UserID = accountdomain.UserID

type Webhook

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

func (*Webhook) Active

func (w *Webhook) Active() bool

func (*Webhook) Clone

func (w *Webhook) Clone() *Webhook

func (*Webhook) CreatedAt

func (w *Webhook) CreatedAt() time.Time

func (*Webhook) ID

func (w *Webhook) ID() WebhookID

func (*Webhook) Name

func (w *Webhook) Name() string

func (*Webhook) Secret

func (w *Webhook) Secret() string

func (*Webhook) SetActive

func (w *Webhook) SetActive(active bool)

func (*Webhook) SetName

func (w *Webhook) SetName(name string)

func (*Webhook) SetSecret

func (w *Webhook) SetSecret(secret string)

func (*Webhook) SetTrigger

func (w *Webhook) SetTrigger(trigger WebhookTrigger)

func (*Webhook) SetURL

func (w *Webhook) SetURL(url *url.URL)

func (*Webhook) SetUpdatedAt

func (w *Webhook) SetUpdatedAt(updatedAt time.Time)

func (*Webhook) Trigger

func (w *Webhook) Trigger() WebhookTrigger

func (*Webhook) URL

func (w *Webhook) URL() *url.URL

func (*Webhook) UpdatedAt

func (w *Webhook) UpdatedAt() time.Time

type WebhookBuilder

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

func NewWebhookBuilder

func NewWebhookBuilder() *WebhookBuilder

func (*WebhookBuilder) Active

func (b *WebhookBuilder) Active(active bool) *WebhookBuilder

func (*WebhookBuilder) Build

func (b *WebhookBuilder) Build() (*Webhook, error)

func (*WebhookBuilder) ID

func (*WebhookBuilder) MustBuild

func (b *WebhookBuilder) MustBuild() *Webhook

func (*WebhookBuilder) Name

func (b *WebhookBuilder) Name(name string) *WebhookBuilder

func (*WebhookBuilder) NewID

func (b *WebhookBuilder) NewID() *WebhookBuilder

func (*WebhookBuilder) Secret

func (b *WebhookBuilder) Secret(secret string) *WebhookBuilder

func (*WebhookBuilder) Trigger

func (b *WebhookBuilder) Trigger(trigger WebhookTrigger) *WebhookBuilder

func (*WebhookBuilder) UpdatedAt

func (b *WebhookBuilder) UpdatedAt(updatedAt time.Time) *WebhookBuilder

func (*WebhookBuilder) Url

func (b *WebhookBuilder) Url(url *url.URL) *WebhookBuilder

type WebhookID

type WebhookID = id.WebhookID

type WebhookTrigger

type WebhookTrigger map[event.Type]bool

func (WebhookTrigger) Disable

func (t WebhookTrigger) Disable(et event.Type)

func (WebhookTrigger) Enable

func (t WebhookTrigger) Enable(et event.Type)

func (WebhookTrigger) IsActive

func (t WebhookTrigger) IsActive(et event.Type) bool

Jump to

Keyboard shortcuts

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