webhook

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcknowledgeEvent

type AcknowledgeEvent struct {
	UDID         string            `json:"udid,omitempty"`
	EnrollmentID string            `json:"enrollment_id,omitempty"`
	Status       string            `json:"status"`
	CommandUUID  string            `json:"command_uuid,omitempty"`
	Params       map[string]string `json:"url_params,omitempty"`
	RawPayload   []byte            `json:"raw_payload"`
}

type CheckinEvent

type CheckinEvent struct {
	UDID         string            `json:"udid,omitempty"`
	EnrollmentID string            `json:"enrollment_id,omitempty"`
	Params       map[string]string `json:"url_params"`
	RawPayload   []byte            `json:"raw_payload"`
}

type Event

type Event struct {
	Topic     string    `json:"topic"`
	EventID   string    `json:"event_id"`
	CreatedAt time.Time `json:"created_at"`

	AcknowledgeEvent *AcknowledgeEvent `json:"acknowledge_event,omitempty"`
	CheckinEvent     *CheckinEvent     `json:"checkin_event,omitempty"`
}

type Option

type Option func(*Worker)

func WithHTTPClient

func WithHTTPClient(client *http.Client) Option

func WithLogger

func WithLogger(logger log.Logger) Option

type Worker

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

func New

func New(url string, sub pubsub.Subscriber, opts ...Option) *Worker

func (*Worker) Run

func (w *Worker) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

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