slack

package
v1.5.13 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2023 License: CC0-1.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthedUser added in v0.12.1

type AuthedUser struct {
	Id          string `json:"id"`
	Scope       string `json:"scope"`
	AccessToken string `json:"access_token"`
	TokenType   string `json:"token_type"`
}

type BaseIdName added in v0.12.1

type BaseIdName struct {
	Name string `json:"name"`
	Id   string `json:"id"`
}

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"`
	Creator            string        `json:"creator"`
	IsArchived         bool          `json:"is_archived"`
	IsGeneral          bool          `json:"is_general"`
	Unlinked           int           `json:"unlinked"`
	NameNormalized     string        `json:"name_normalized"`
	IsShared           bool          `json:"is_shared"`
	IsExtShared        bool          `json:"is_ext_shared"`
	IsOrgShared        bool          `json:"is_org_shared"`
	PendingShared      []interface{} `json:"pending_shared"`
	IsPendingExtShared bool          `json:"is_pending_ext_shared"`
	IsMember           bool          `json:"is_member"`
	IsPrivate          bool          `json:"is_private"`
	IsMpim             bool          `json:"is_mpim"`
	LastRead           string        `json:"last_read"`
	Latest             Latest        `json:"latest"`
	UnreadCount        int           `json:"unread_count"`
	UnreadCountDisplay int           `json:"unread_count_display"`
	Topic              Topic         `json:"topic"`
	Purpose            Purpose       `json:"purpose"`
	PreviousNames      []string      `json:"previous_names"`
	Priority           int           `json:"priority"`
	Locale             string        `json:"locale"`
	NumMembers         int           `json:"num_members"`
	Error              string        `json:"error,omitempty"`
	ChannelMemberResponse
}

type ChannelCreateRequest

type ChannelCreateRequest struct {
	Name      string `json:"name"`
	IsPrivate bool   `json:"is_private"`
}

type ChannelMemberResponse

type ChannelMemberResponse struct {
	Members          []string `json:"members"`
	ResponseMetadata struct {
		NextCursor string `json:"next_cursor"`
	} `json:"response_metadata"`
}

type Latest

type Latest struct {
	Type string `json:"type"`
	User string `json:"user"`
	Text string `json:"text"`
	Ts   string `json:"ts"`
}

type OauthAccess added in v0.12.1

type OauthAccess struct {
	AccessToken         string     `json:"access_token"`
	TokenType           string     `json:"token_type"`
	Scope               string     `json:"scope"`
	BotUserId           string     `json:"bot_user_id"`
	AppId               string     `json:"app_id"`
	ExpiresIn           int        `json:"expires_in"`
	RefreshToken        string     `json:"refresh_token"`
	Team                BaseIdName `json:"team"`
	Enterprise          BaseIdName `json:"enterprise"`
	IsEnterpriseInstall bool       `json:"is_enterprise_install"`
	AuthedUser          AuthedUser `json:"authed_user"`
	Error               string     `json:"error,omitempty"`
}

type Purpose

type Purpose struct {
	Value   string `json:"value"`
	Creator string `json:"creator"`
	LastSet int    `json:"last_set"`
}

type Reminder

type Reminder struct {
	Id         string `json:"id"`
	Creator    string `json:"creator"`
	User       string `json:"user"`
	Text       string `json:"text"`
	Recurring  bool   `json:"recurring"`
	Time       int    `json:"time"`
	CompleteTs int    `json:"complete_ts"`
	Error      string `json:"error,omitempty"`
}

type Response

type Response[T ResponseType] struct {
	Ok    bool `json:"ok"`
	Data  T
	Error string `json:"error,omitempty"`
}

type ResponseType

type ResponseType interface {
	Channel | Reminder | OauthAccess
}

type Topic

type Topic struct {
	Value   string `json:"value"`
	Creator string `json:"creator"`
	LastSet int    `json:"last_set"`
}

Jump to

Keyboard shortcuts

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