export

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DM

type DM struct {
	ID      string   `json:"id"`
	Created int64    `json:"created"`
	Members []string `json:"members"`
}

DM respresents a direct Message entry in dms.json. Structure is based on this post:

https://github.com/RocketChat/Rocket.Chat/issues/13905#issuecomment-477500022

type Export

type Export struct {
	// contains filtered or unexported fields
}

Export is the instance of Slack Exporter.

func New

func New(sd *slackdump.Session, fs fsadapter.FS, cfg Options) *Export

New creates a new Export instance, that will save export to the provided fs.

func (*Export) Run

func (se *Export) Run(ctx context.Context) error

Run runs the export.

type ExportMessage

type ExportMessage struct {
	slack.Msg

	// additional fields not defined by the slack library, but present
	// in slack exports
	UserTeam        string             `json:"user_team,omitempty"`
	SourceTeam      string             `json:"source_team,omitempty"`
	UserProfile     *ExportUserProfile `json:"user_profile,omitempty"`
	ReplyUsersCount int                `json:"reply_users_count,omitempty"`
	ReplyUsers      []string           `json:"reply_users,omitempty"`
}

ExportMessage is the slack.Message with additional fields usually found in slack exports.

func (ExportMessage) Time

func (em ExportMessage) Time() time.Time

type ExportUserProfile

type ExportUserProfile struct {
	AvatarHash        string `json:"avatar_hash,omitempty"`
	Image72           string `json:"image_72,omitempty"`
	FirstName         string `json:"first_name,omitempty"`
	RealName          string `json:"real_name,omitempty"`
	DisplayName       string `json:"display_name,omitempty"`
	Team              string `json:"team,omitempty"`
	Name              string `json:"name,omitempty"`
	IsRestricted      bool   `json:"is_restricted,omitempty"`
	IsUltraRestricted bool   `json:"is_ultra_restricted,omitempty"`
}

type Options

type Options struct {
	Oldest       time.Time
	Latest       time.Time
	IncludeFiles bool
	Logger       logger.Interface
	List         *structures.EntityList
}

Options allows to configure slack export options.

Jump to

Keyboard shortcuts

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