astislack

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2019 License: MIT Imports: 8 Imported by: 0

README

GoReportCard GoDoc

Clear your Slack history easily!

Thanks to astislack, mass delete all your Slack messages and files!

Releases

Check out the release page to download a binary compatible with your OS as well as the local.toml.dist file.

Usage

  1. Create a Slack legacy token here.

  2. Copy local.toml.dist to local.toml

  3. Edit local.toml and replace SLACK_LEGACY_TOKEN with your legacy token.

  4. Run

$ /path/to/binary -c local.toml -v

This should start mass deleting all your Slack messages and files!

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LegacyToken = flag.String("slack-legacy-token", "", "the Slack legacy token")
)

Flags

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	LegacyToken string `toml:"legacy_token"`
	Sender      astihttp.SenderOptions
}

Configuration represents the configuration of the logger

func FlagConfig

func FlagConfig() Configuration

FlagConfig generates a Configuration based on flags

type Me

type Me struct {
	Team   string
	TeamID string
	User   string
	UserID string
}

type Response

type Response struct {
	Files    ResponseFiles    `json:"files"`
	Messages ResponseMessages `json:"messages"`
	OK       bool             `json:"ok"`
	Team     string           `json:"team"`
	TeamID   string           `json:"team_id"`
	User     string           `json:"user"`
	UserID   string           `json:"user_id"`
}

type ResponseChannel

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

type ResponseFile

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

type ResponseFiles

type ResponseFiles struct {
	Matches    []ResponseFile     `json:"matches"`
	Pagination ResponsePagination `json:"pagination"`
	Paging     ResponsePaging     `json:"paging"`
	Total      int                `json:"total"`
}

type ResponseMessage

type ResponseMessage struct {
	Channel ResponseChannel `json:"channel"`
	Text    string          `json:"text"`
	TS      string          `json:"ts"`
}

type ResponseMessages

type ResponseMessages struct {
	Matches    []ResponseMessage  `json:"matches"`
	Pagination ResponsePagination `json:"pagination"`
	Paging     ResponsePaging     `json:"paging"`
	Total      int                `json:"total"`
}

type ResponsePagination

type ResponsePagination struct {
	First      int `json:"first"`
	Last       int `json:"last"`
	Page       int `json:"page"`
	PageCount  int `json:"page_count"`
	PerPage    int `json:"per_page"`
	TotalCount int `json:"total_count"`
}

type ResponsePaging

type ResponsePaging struct {
	Count int `json:"count"`
	Page  int `json:"page"`
	Pages int `json:"pages"`
	Total int `json:"total"`
}

type Slack

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

func New

func New(c Configuration) *Slack

func (*Slack) Delete

func (s *Slack) Delete(query string) (err error)

func (*Slack) Me

func (s *Slack) Me() (m Me, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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