slackid

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeMessageID

func MakeMessageID(teamID, channelID, timestamp string) networkid.MessageID

func MakePartID

func MakePartID(partType PartType, index int, id string) networkid.PartID

func MakePortalID

func MakePortalID(teamID, channelID string) networkid.PortalID

func MakePortalKey

func MakePortalKey(teamID, channelID string, userLoginID networkid.UserLoginID, wantReceiver bool) (key networkid.PortalKey)

func MakeTeamPortalID

func MakeTeamPortalID(teamID string) networkid.PortalID

func MakeUserID

func MakeUserID(teamID, userID string) networkid.UserID

func MakeUserLoginID

func MakeUserLoginID(teamID, userID string) networkid.UserLoginID

func ParseMessageID

func ParseMessageID(id networkid.MessageID) (teamID, channelID, timestamp string, ok bool)

func ParsePortalID

func ParsePortalID(id networkid.PortalID) (teamID, channelID string)

func ParseSlackTimestamp

func ParseSlackTimestamp(timestamp string) time.Time

func ParseUserID

func ParseUserID(id networkid.UserID) (teamID, userID string)

func ParseUserLoginID

func ParseUserLoginID(id networkid.UserLoginID) (teamID, userID string)

func UserIDToUserLoginID

func UserIDToUserLoginID(userID networkid.UserID) networkid.UserLoginID

func UserLoginIDToUserID

func UserLoginIDToUserID(userLoginID networkid.UserLoginID) networkid.UserID

Types

type GhostMetadata

type GhostMetadata struct {
	SlackUpdatedTS int64         `json:"slack_updated_ts"`
	LastSync       jsontime.Unix `json:"last_sync"`
}

type MessageMetadata

type MessageMetadata struct {
	CaptionMerged bool `json:"caption_merged"`
}

type PartType

type PartType string
const (
	PartTypeFile       PartType = "file"
	PartTypeAttachment PartType = "attachment"
)

func ParsePartID

func ParsePartID(partID networkid.PartID) (partType PartType, index int, id string, ok bool)

type PortalMetadata

type PortalMetadata struct {
	// Only present for team portals, not channels
	TeamDomain string `json:"team_domain"`
}

type UserLoginMetadata

type UserLoginMetadata struct {
	Email       string `json:"email"`
	Token       string `json:"token"`
	CookieToken string `json:"cookie_token,omitempty"`
	AppToken    string `json:"app_token,omitempty"`
}

Jump to

Keyboard shortcuts

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