export

package
v2.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: GPL-3.0 Imports: 20 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 represents 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"`
	SourceTeam      string             `json:"source_team"`
	UserProfile     *ExportUserProfile `json:"user_profile"`
	ReplyUsersCount int                `json:"reply_users_count"`
	// contains filtered or unexported fields
}

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

func (ExportMessage) Time

func (em ExportMessage) Time() time.Time

type ExportType added in v2.2.0

type ExportType uint8
const (
	TNoDownload ExportType = iota // NoDownload
	TStandard                     // Standard
	TMattermost                   // Mattermost
)

func (*ExportType) Set added in v2.2.0

func (e *ExportType) Set(v string) error

Set translates the string value into the ExportType, satisfies flag.Value interface. It is based on the declarations generated by stringer.

func (ExportType) String added in v2.2.0

func (i ExportType) String() string

type ExportUserProfile

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

type Options

type Options struct {
	Oldest      time.Time
	Latest      time.Time
	Logger      logger.Interface
	List        *structures.EntityList
	Type        ExportType
	ExportToken string
}

Options allows to configure slack export options.

func (Options) IsFilesEnabled added in v2.2.0

func (opt Options) IsFilesEnabled() bool

Jump to

Keyboard shortcuts

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