utils

package
v0.0.0-...-6f59782 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: MIT Imports: 3 Imported by: 3

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"`
}

type CheckResponse

type CheckResponse []Version

type InParams

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

type InRequest

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

type InResponse

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

type MessageFilter

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

type Metadata

type Metadata []MetadataField

type MetadataField

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

type OutMessage

type OutMessage struct {
	Text string `json:"text"`
	slack.PostMessageParameters
}

type OutParams

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

type OutRequest

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

type OutResponse

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

type Regexp

type Regexp struct{ regexp.Regexp }

func (*Regexp) UnmarshalJSON

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

type SlackRequest

type SlackRequest struct {
	Contents string
}

type Source

type Source struct {
	Token       string         `json:"token"`
	ChannelId   string         `json:"channel_id"`
	Filter      *MessageFilter `json:"matching"`
	ReplyFilter *MessageFilter `json:"not_replied_by"`
}

type Version

type Version map[string]string

Jump to

Keyboard shortcuts

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