Documentation ¶
Index ¶
- Constants
- func BotJoinedEventHandler(botID string) socketmode.SocketmodeHandlerFunc
- func ChannelArchiveHandler(channels *Channels, gdrive *GDrive) socketmode.SocketmodeHandlerFunc
- func MessageEventHandler(channels *Channels, botID string, gdrive *GDrive) socketmode.SocketmodeHandlerFunc
- func Run(ctx context.Context) error
- func SlashCommandHandler(channels *Channels, gdrive *GDrive, basedir string) socketmode.SocketmodeHandlerFunc
- type Channels
- func (c *Channels) AppendMessage(channelName, jsonstring string, gdrive *GDrive) error
- func (c *Channels) CreateFilePathForMessage(channelName string, timestamp string, index int, filetype string) string
- func (c *Channels) CreateHtmlFile(channelName string, gdrive *GDrive) error
- func (c *Channels) CreateImageFileName(timestamp string, index int, filetype string) string
- func (c *Channels) CreateImageFilePath(channelName string, timestamp string, index int, filetype string) string
- func (c *Channels) CreateLocalFile(channelName string, timestamp string, i int, fileType string) (*os.File, error)
- type Config
- type Entry
- type GDrive
Constants ¶
View Source
const CSSFile = "output.css"
View Source
const ConfigDir = "./config"
View Source
const ConfigFileName = "config.json"
View Source
const CredentialFileName = "credentials.json"
View Source
const HtmlDir = "html"
View Source
const TemplateDir = "template"
View Source
const TemplateFile = "happeninghound-viewer.html"
Variables ¶
This section is empty.
Functions ¶
func BotJoinedEventHandler ¶
func BotJoinedEventHandler(botID string) socketmode.SocketmodeHandlerFunc
func ChannelArchiveHandler ¶ added in v0.5.3
func ChannelArchiveHandler(channels *Channels, gdrive *GDrive) socketmode.SocketmodeHandlerFunc
func MessageEventHandler ¶
func MessageEventHandler(channels *Channels, botID string, gdrive *GDrive) socketmode.SocketmodeHandlerFunc
MessageEventHandler チャンネルごとのメッセージ受信ハンドラー: MessageEventHandler はメッセージイベントを処理します。
func SlashCommandHandler ¶ added in v0.5.0
func SlashCommandHandler(channels *Channels, gdrive *GDrive, basedir string) socketmode.SocketmodeHandlerFunc
Types ¶
type Channels ¶
type Channels struct {
// contains filtered or unexported fields
}
Channels はチャンネルデータの管理を行います。
func NewChannels ¶
NewChannels は Channels 構造体の新しいインスタンスを作成します。
func (*Channels) AppendMessage ¶
func (*Channels) CreateFilePathForMessage ¶ added in v0.2.0
func (*Channels) CreateHtmlFile ¶ added in v0.4.0
func (*Channels) CreateImageFileName ¶ added in v0.3.0
func (*Channels) CreateImageFilePath ¶ added in v0.2.0
type Entry ¶ added in v0.4.0
type Entry struct { Timestamp string `json:"timestamp"` Message string `json:"message"` ChannelId string `json:"channel.id"` ChannelName string `json:"channel.name"` Files []string `json:"files"` }
Entry jsonlファイルのデータ読み込み用構造体
func (Entry) MessageWithLinkTag ¶ added in v0.5.5
MessageWithLinkTag メッセージに含まれるリンクをHTMLタグに変換
func (Entry) Timestamp2String ¶ added in v0.4.0
Timestamp2String Slackから取得した日付データを文字列に成形
type GDrive ¶ added in v0.3.0
type GDrive struct {
// contains filtered or unexported fields
}
func (GDrive) CreateImageFile ¶ added in v0.3.0
CreateImageFile 画像ファイルをimageDirにアップロードする
func (GDrive) UploadFile ¶ added in v0.3.0
UploadFile ファイルをtargetDirにアップロードする
Click to show internal directories.
Click to hide internal directories.