dto

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2019 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	ID                      string        `json:"id"`
	Name                    string        `json:"name"`
	IsChannel               bool          `json:"is_channel"`
	IsGroup                 bool          `json:"is_group"`
	IsIm                    bool          `json:"is_im"`
	Created                 int           `json:"created"`
	IsArchived              bool          `json:"is_archived"`
	IsGeneral               bool          `json:"is_general"`
	Unlinked                int           `json:"unlinked"`
	NameNormalized          string        `json:"name_normalized"`
	IsShared                bool          `json:"is_shared"`
	ParentConversation      interface{}   `json:"parent_conversation"`
	Creator                 string        `json:"creator"`
	IsExtShared             bool          `json:"is_ext_shared"`
	IsOrgShared             bool          `json:"is_org_shared"`
	SharedTeamIds           []string      `json:"shared_team_ids"`
	PendingShared           []interface{} `json:"pending_shared"`
	PendingConnectedTeamIds []interface{} `json:"pending_connected_team_ids"`
	IsPendingExtShared      bool          `json:"is_pending_ext_shared"`
	IsMember                bool          `json:"is_member"`
	IsPrivate               bool          `json:"is_private"`
	IsMpim                  bool          `json:"is_mpim"`
	Topic                   struct {
		Value   string `json:"value"`
		Creator string `json:"creator"`
		LastSet int    `json:"last_set"`
	} `json:"topic"`
	Purpose struct {
		Value   string `json:"value"`
		Creator string `json:"creator"`
		LastSet int    `json:"last_set"`
	} `json:"purpose"`
	PreviousNames []interface{} `json:"previous_names"`
	NumMembers    int           `json:"num_members"`
}

Channel it's an object which contains information about slack channel

type DevBotMessageDictionary

type DevBotMessageDictionary struct {
	TextMessageDictionary []DictionaryMessage `json:"text_message_dictionary"`
	FileMessageDictionary []DictionaryMessage `json:"file_message_dictionary"`
}

DevBotMessageDictionary main dictionary of DevBot

type DictionaryMessage

type DictionaryMessage struct {
	Question              string `json:"question"`
	Answer                string `json:"answer"`
	MainGroupIndexInRegex int    `json:"main_group_index_in_regex"`
	ReactionType          string `json:"reaction_type"`
}

DictionaryMessage child struct of DevBotMessageDictionary object

type File

type File struct {
	Created            int    `json:"created"`
	DisplayAsBot       bool   `json:"display_as_bot"`
	Editable           bool   `json:"editable"`
	ExternalType       string `json:"external_type"`
	Filetype           string `json:"filetype"`
	HasRichPreview     bool   `json:"has_rich_preview"`
	ID                 string `json:"id"`
	ImageExifRotation  int    `json:"image_exif_rotation"`
	IsExternal         bool   `json:"is_external"`
	IsPublic           bool   `json:"is_public"`
	IsStarred          bool   `json:"is_starred"`
	Mimetype           string `json:"mimetype"`
	Mode               string `json:"mode"`
	Name               string `json:"name"`
	OriginalH          int    `json:"original_h"`
	OriginalW          int    `json:"original_w"`
	Permalink          string `json:"permalink"`
	PermalinkPublic    string `json:"permalink_public"`
	PrettyType         string `json:"pretty_type"`
	PublicURLShared    bool   `json:"public_url_shared"`
	Size               int    `json:"size"`
	Thumb1024          string `json:"thumb_1024"`
	Thumb1024H         int    `json:"thumb_1024_h"`
	Thumb1024W         int    `json:"thumb_1024_w"`
	Thumb160           string `json:"thumb_160"`
	Thumb360           string `json:"thumb_360"`
	Thumb360H          int    `json:"thumb_360_h"`
	Thumb360W          int    `json:"thumb_360_w"`
	Thumb480           string `json:"thumb_480"`
	Thumb480H          int    `json:"thumb_480_h"`
	Thumb480W          int    `json:"thumb_480_w"`
	Thumb64            string `json:"thumb_64"`
	Thumb720           string `json:"thumb_720"`
	Thumb720H          int    `json:"thumb_720_h"`
	Thumb720W          int    `json:"thumb_720_w"`
	Thumb80            string `json:"thumb_80"`
	Thumb800           string `json:"thumb_800"`
	Thumb800H          int    `json:"thumb_800_h"`
	Thumb800W          int    `json:"thumb_800_w"`
	Thumb960           string `json:"thumb_960"`
	Thumb960H          int    `json:"thumb_960_h"`
	Thumb960W          int    `json:"thumb_960_w"`
	ThumbTiny          string `json:"thumb_tiny"`
	Timestamp          int    `json:"timestamp"`
	Title              string `json:"title"`
	URLPrivate         string `json:"url_private"`
	URLPrivateDownload string `json:"url_private_download"`
	User               string `json:"user"`
	Username           string `json:"username"`
}

File child struct of SlackResponseEventMessage

type MessageBlock

type MessageBlock struct {
	BlockID  string `json:"block_id"`
	Elements []struct {
		Elements []struct {
			Type   string `json:"type"`
			UserID string `json:"user_id,omitempty"`
			Text   string `json:"text,omitempty"`
		} `json:"elements"`
		Type string `json:"type"`
	} `json:"elements"`
	Type string `json:"type"`
}

MessageBlock child struct of SlackResponseEventMessage

type Profile

type Profile struct {
	Title                 string      `json:"title"`
	Phone                 string      `json:"phone"`
	Skype                 string      `json:"skype"`
	RealName              string      `json:"real_name"`
	RealNameNormalized    string      `json:"real_name_normalized"`
	DisplayName           string      `json:"display_name"`
	DisplayNameNormalized string      `json:"display_name_normalized"`
	Fields                interface{} `json:"fields"`
	StatusText            string      `json:"status_text"`
	StatusEmoji           string      `json:"status_emoji"`
	StatusExpiration      int         `json:"status_expiration"`
	AvatarHash            string      `json:"avatar_hash"`
	AlwaysActive          bool        `json:"always_active"`
	FirstName             string      `json:"first_name"`
	LastName              string      `json:"last_name"`
	Image24               string      `json:"image_24"`
	Image32               string      `json:"image_32"`
	Image48               string      `json:"image_48"`
	Image72               string      `json:"image_72"`
	Image192              string      `json:"image_192"`
	Image512              string      `json:"image_512"`
	StatusTextCanonical   string      `json:"status_text_canonical"`
	Team                  string      `json:"team"`
}

Profile object

type ResponseMetadata

type ResponseMetadata struct {
	NextCursor string `json:"next_cursor"`
}

ResponseMetadata object of metadata

type Self

type Self struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

Self child struct of SlackResponseRTMConnect

type SlackMember

type SlackMember struct {
	ID                string      `json:"id"`
	TeamID            string      `json:"team_id"`
	Name              string      `json:"name"`
	Deleted           bool        `json:"deleted"`
	Color             string      `json:"color"`
	RealName          string      `json:"real_name"`
	Tz                interface{} `json:"tz"`
	TzLabel           string      `json:"tz_label"`
	TzOffset          int         `json:"tz_offset"`
	Profile           Profile     `json:"profile"`
	IsAdmin           bool        `json:"is_admin"`
	IsOwner           bool        `json:"is_owner"`
	IsPrimaryOwner    bool        `json:"is_primary_owner"`
	IsRestricted      bool        `json:"is_restricted"`
	IsUltraRestricted bool        `json:"is_ultra_restricted"`
	IsBot             bool        `json:"is_bot"`
	IsAppUser         bool        `json:"is_app_user"`
	Updated           int         `json:"updated"`
}

SlackMember object which is used in SlackResponseUsersList object

type SlackRequestChatPostMessage

type SlackRequestChatPostMessage struct {
	Channel           string `json:"channel"`
	Text              string `json:"text"`
	AsUser            bool   `json:"as_user"`
	Ts                time.Time
	DictionaryMessage DictionaryMessage
}

SlackRequestChatPostMessage request for post.chatMessage

type SlackRequestEventMessage

type SlackRequestEventMessage struct {
	ID      uint64 `json:"id"`
	Type    string `json:"type"`
	Channel string `json:"channel"`
	Text    string `json:"text"`
}

SlackRequestEventMessage object for slack WS event message

type SlackResponseChatPostMessage

type SlackResponseChatPostMessage struct {
	Ok      bool   `json:"ok"`
	Channel string `json:"channel"`
	Ts      string `json:"ts"`
	Error   string `json:"error,omitempty"`
	Message struct {
		BotID      string `json:"bot_id"`
		Type       string `json:"type"`
		Text       string `json:"text"`
		User       string `json:"user"`
		Ts         string `json:"ts"`
		Team       string `json:"team"`
		BotProfile struct {
			ID      string `json:"id"`
			Deleted bool   `json:"deleted"`
			Name    string `json:"name"`
			Updated int    `json:"updated"`
			AppID   string `json:"app_id"`
			Icons   struct {
				Image36 string `json:"image_36"`
				Image48 string `json:"image_48"`
				Image72 string `json:"image_72"`
			} `json:"icons"`
			TeamID string `json:"team_id"`
		} `json:"bot_profile"`
	} `json:"message"`
}

SlackResponseChatPostMessage response object for slack chat postMessage endpoint response

type SlackResponseConversationsList

type SlackResponseConversationsList struct {
	Ok               bool      `json:"ok"`
	Error            string    `json:"error,omitempty"`
	Channels         []Channel `json:"channels"`
	ResponseMetadata struct {
		NextCursor string `json:"next_cursor"`
	} `json:"response_metadata"`
}

SlackResponseConversationsList the list of Channel objects

type SlackResponseEventMessage

type SlackResponseEventMessage struct {
	Channel      string         `json:"channel"`
	ClientMsgID  string         `json:"client_msg_id"`
	DisplayAsBot bool           `json:"display_as_bot"`
	EventTs      string         `json:"event_ts"`
	Files        []File         `json:"files"`
	SourceTeam   string         `json:"source_team"`
	Team         string         `json:"team"`
	Text         string         `json:"text"`
	Ts           string         `json:"ts"`
	Type         string         `json:"type"`
	Upload       bool           `json:"upload"`
	User         string         `json:"user"`
	UserTeam     string         `json:"user_team"`
	Blocks       []MessageBlock `json:"blocks"`
}

SlackResponseEventMessage main event message object

type SlackResponseRTMConnect

type SlackResponseRTMConnect struct {
	Ok    bool   `json:"ok"`
	URL   string `json:"url"`
	Error string `json:"error"`
	Team  Team   `json:"team"`
	Self  Self   `json:"self"`
}

SlackResponseRTMConnect need for decoding an rtm.connect endpoint response

type SlackResponseUsersList

type SlackResponseUsersList struct {
	Ok               bool             `json:"ok"`
	Error            string           `json:"error,omitempty"`
	Members          []SlackMember    `json:"members"`
	CacheTs          int              `json:"cache_ts"`
	ResponseMetadata ResponseMetadata `json:"response_metadata"`
}

SlackResponseUsersList response object from users.list

type Team

type Team struct {
	ID     string `json:"id"`
	Name   string `json:"name"`
	Domain string `json:"domain"`
}

Team child struct of SlackResponseRTMConnect

Jump to

Keyboard shortcuts

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