webhooks

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DefaultURL     string
	DefaultTimeout time.Duration
}

type Duration

type Duration time.Duration //nolint:recvcheck // For marshaling

func (Duration) MarshalJSON

func (d Duration) MarshalJSON() ([]byte, error)

func (Duration) String

func (d Duration) String() string

func (*Duration) UnmarshalJSON

func (d *Duration) UnmarshalJSON(b []byte) error

type Payload

type Payload struct {
	Event     string    `json:"event"`
	JobName   string    `json:"job_name"`
	Status    string    `json:"status"`
	StartedAt time.Time `json:"started_at,omitzero"`
	Duration  Duration  `json:"duration,omitempty"`
	Error     string    `json:"error,omitempty"`
}

type Service

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

func NewService

func NewService(config Config) (*Service, error)

func (*Service) Notify

func (s *Service) Notify(ctx context.Context, payload Payload) error

Jump to

Keyboard shortcuts

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