utils

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckRequest

type CheckRequest struct {
	Source  Source  `json:"source"`
	Version Version `json:"version"`
}

CheckRequest type definition

type CheckResponse

type CheckResponse []Version

CheckResponse type definition

type InParams

type InParams struct {
	TextPattern *Regexp `json:"text_pattern"`
}

InParams type definition

type InRequest

type InRequest struct {
	Source  Source   `json:"source"`
	Version Version  `json:"version"`
	Params  InParams `json:"params"`
}

InRequest type definition

type InResponse

type InResponse struct {
	Version  Version  `json:"version"`
	Metadata Metadata `json:"metadata"`
}

InResponse type definition

type MessageFilter

type MessageFilter struct {
	AuthorID    string  `json:"author"`
	TextPattern *Regexp `json:"text_pattern"`
}

MessageFilter type definition

type Metadata

type Metadata []MetadataField

Metadata type definition

type MetadataField

type MetadataField struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

MetadataField type definition

type OutMessage

type OutMessage struct {
	Attachments []slack.Attachment `json:"attachments"`
	Blocks      slack.Blocks       `json:"blocks"`
	Text        string             `json:"text"`
	slack.PostMessageParameters
}

OutMessage type definition

type OutParams

type OutParams struct {
	Message     *OutMessage `json:"message"`
	MessageFile string      `json:"message_file"`
}

OutParams type definition

type OutRequest

type OutRequest struct {
	Source Source    `json:"source"`
	Params OutParams `json:"params"`
}

OutRequest type definition

type OutResponse

type OutResponse struct {
	Version  Version  `json:"version"`
	Metadata Metadata `json:"metadata"`
}

OutResponse type definition

type Regexp

type Regexp struct{ regexp.Regexp }

Regexp type definition

func (*Regexp) UnmarshalJSON

func (r *Regexp) UnmarshalJSON(payload []byte) error

UnmarshalJSON custom unmarshaller

type SlackRequest

type SlackRequest struct {
	Contents string
}

SlackRequest type definition

type Source

type Source struct {
	Token           string         `json:"token"`
	ChannelID       string         `json:"channel_id"`
	CheckMostRecent int            `json:"check_most_recent"`
	Filter          *MessageFilter `json:"matching"`
	ReplyFilter     *MessageFilter `json:"not_replied_by"`
}

Source type definition

type Version

type Version map[string]string

Version type definition

Jump to

Keyboard shortcuts

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