trigger

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2021 License: Apache-2.0 Imports: 12 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

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

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

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

Index

Constants

View Source
const TransportEventSub = "eventsub"
View Source
const TransportWebSub = "websub"
View Source
const TransportWebsockets = "websockets"

Variables

This section is empty.

Functions

func Fire

func Fire(p TriggerParameters) (string, error)

Fire emits an event using the TriggerParameters defined above.

func RefireEvent

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

func ValidTransports

func ValidTransports() []string

func ValidTriggers

func ValidTriggers() []string

Types

type CheerParams

type CheerParams struct {
	IsAnonymous bool
	Transport   string
	Type        string
	ToUser      string
	FromUser    string
	Message     string
	Bits        int64
}

type FollowParams

type FollowParams struct {
	Transport string
	FromUser  string
	ToUser    string
	Type      string
}

type ForwardParamters

type ForwardParamters struct {
	ID             string
	ForwardAddress string
	JSON           []byte
	Transport      string
	Secret         string
	Event          string
}

type RedemptionParams

type RedemptionParams struct {
	Transport string
	Type      string
	ToUser    string
	FromUser  string
	Title     string
	Prompt    string
	Status    string
	RewardID  string
	Cost      int64
}

type RewardParams

type RewardParams struct {
	Transport string
	Type      string
	ToUser    string
	Title     string
	Prompt    string
	Cost      int64
}

type SubscribeParams

type SubscribeParams struct {
	IsGift          bool
	IsAnonymousGift bool
	Transport       string
	Type            string
	ToUser          string
	FromUser        string
	GiftUser        string
}

type TransactionParams

type TransactionParams struct {
	IsGift    bool
	Transport string
	Type      string
	ToUser    string
	FromUser  string
	GiftUser  string
}

type TriggerParameters

type TriggerParameters struct {
	Event          string
	Transport      string
	IsAnonymous    bool
	FromUser       string
	ToUser         string
	GiftUser       string
	Status         string
	ItemId         string
	Cost           int64
	ForwardAddress string
	Secret         string
	Verbose        bool
	Count          int
}

TriggerParameters defines the parameters used to emit an event.

type TriggerResponse

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

func GenerateCheerBody

func GenerateCheerBody(p CheerParams) (TriggerResponse, error)

func GenerateFollowBody

func GenerateFollowBody(p FollowParams) (TriggerResponse, error)

func GenerateRedemptionBody

func GenerateRedemptionBody(p RedemptionParams) (TriggerResponse, error)

func GenerateRewardBody

func GenerateRewardBody(p RewardParams) (TriggerResponse, error)

func GenerateSubBody

func GenerateSubBody(params SubscribeParams) (TriggerResponse, error)

func GenerateTransactionBody

func GenerateTransactionBody(params TransactionParams) (TriggerResponse, error)

Jump to

Keyboard shortcuts

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