hints

package
v0.134.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: AGPL-3.0 Imports: 4 Imported by: 4

Documentation

Index

Constants

View Source
const TypeAudio string = "audio"

TypeAudio is the type of our audio hint

View Source
const TypeDigits string = "digits"

TypeDigits is the type of our digits hint

View Source
const TypeImage string = "image"

TypeImage is the type of our image hint

View Source
const TypeLocation string = "location"

TypeLocation is the type of our location hint

View Source
const TypeVideo string = "video"

TypeVideo is the type of our video hint

Variables

This section is empty.

Functions

func ReadHint

func ReadHint(data json.RawMessage) (flows.Hint, error)

ReadHint reads a hint from the given JSON

Types

type AudioHint

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

AudioHint requests a message with an audio attachment

func NewAudioHint

func NewAudioHint() *AudioHint

NewAudioHint creates a new audio hint

func (*AudioHint) Type

func (h *AudioHint) Type() string

Type returns the type of this hint

type DigitsHint

type DigitsHint struct {
	Count        *int   `json:"count,omitempty"`
	TerminatedBy string `json:"terminated_by,omitempty"`
	// contains filtered or unexported fields
}

DigitsHint requests a message containing one or more digits

func NewFixedDigitsHint

func NewFixedDigitsHint(count int) *DigitsHint

NewFixedDigitsHint creates a new digits hint for a fixed count of digits

func NewTerminatedDigitsHint

func NewTerminatedDigitsHint(terminatedBy string) *DigitsHint

NewTerminatedDigitsHint creates a new digits hint for a sequence of digits terminated by the given key

func (*DigitsHint) Type

func (h *DigitsHint) Type() string

Type returns the type of this hint

type ImageHint

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

ImageHint requests a message with an image attachment

func NewImageHint

func NewImageHint() *ImageHint

NewImageHint creates a new image hint

func (*ImageHint) Type

func (h *ImageHint) Type() string

Type returns the type of this hint

type LocationHint

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

LocationHint requests a message with a location attachment, i.e. a geo:<lat>,<long>

func NewLocationHint

func NewLocationHint() *LocationHint

NewLocationHint creates a new location hint

func (*LocationHint) Type

func (h *LocationHint) Type() string

Type returns the type of this hint

type VideoHint

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

VideoHint requests a message with an video attachment

func NewVideoHint

func NewVideoHint() *VideoHint

NewVideoHint creates a new video hint

func (*VideoHint) Type

func (h *VideoHint) Type() string

Type returns the type of this hint

Jump to

Keyboard shortcuts

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