trigger

package
v1.1.22 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0

Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0

Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0

Index

Constants

View Source
const (
	EventSubMessageTypeNotification = "notification"
	EventSubMessageTypeVerification = "webhook_callback_verification"
	EventSubMessageTypeRevocation   = "revocation"
)

Variables

This section is empty.

Functions

func Fire

func Fire(p TriggerParameters) (string, error)

Fire emits an event using the TriggerParameters defined above.

func ForwardEvent

func ForwardEvent(p ForwardParamters) (*http.Response, error)

func RefireEvent

func RefireEvent(id string, p TriggerParameters) (string, error)

Types

type ForwardParamters

type ForwardParamters struct {
	ID                  string
	ForwardAddress      string
	JSON                []byte
	Transport           string
	Timestamp           string
	Secret              string
	Event               string
	Method              string
	Type                string
	SubscriptionVersion string
}

type TriggerParameters

type TriggerParameters struct {
	Event               string
	Transport           string
	IsAnonymous         bool
	FromUser            string
	ToUser              string
	GiftUser            string
	EventStatus         string
	SubscriptionStatus  string
	ItemID              string
	Cost                int64
	ForwardAddress      string
	Secret              string
	Verbose             bool
	Count               int
	Description         string
	ItemName            string
	GameID              string
	Tier                string
	Timestamp           string
	EventID             string // Also serves as subscription ID. See https://github.com/twitchdev/twitch-cli/issues/184
	CharityCurrentValue int
	CharityTargetValue  int
	ClientID            string
	Version             string
	WebSocketClient     string
	BanStartTimestamp   string
	BanEndTimestamp     string
}

TriggerParameters defines the parameters used to emit an event.

type TriggerResponse

type TriggerResponse struct {
	ID        string
	JSON      []byte
	FromUser  string
	ToUser    string
	Timestamp string
}

Jump to

Keyboard shortcuts

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