Move more types into types.go

This commit is contained in:
Sam
2019-07-23 14:58:33 -04:00
parent 9e443921c4
commit 7cc8e14fe2
2 changed files with 11 additions and 11 deletions

View File

@ -7,17 +7,6 @@ import (
"time" "time"
) )
// RunOptions holds a set of options to be passed to Run
type RunOptions struct {
Heartbeat int64 // Send a heartbeat through the channel every X minutes (0 = off)
Local bool // Subscribe to local messages
HideExploding bool // Ignore exploding messages
Dev bool // Subscribe to dev channel messages
Wallet bool // Subscribe to wallet events
FilterChannel Channel // Only subscribe to messages from specified channel
FilterChannels []Channel // Only subscribe to messages from specified channels
}
// Creates a string of a json-encoded channel to pass to keybase chat api-listen --filter-channel // Creates a string of a json-encoded channel to pass to keybase chat api-listen --filter-channel
func createFilterString(channel Channel) string { func createFilterString(channel Channel) string {
if channel.Name == "" { if channel.Name == "" {

View File

@ -1,5 +1,16 @@
package keybase package keybase
// RunOptions holds a set of options to be passed to Run
type RunOptions struct {
Heartbeat int64 // Send a heartbeat through the channel every X minutes (0 = off)
Local bool // Subscribe to local messages
HideExploding bool // Ignore exploding messages
Dev bool // Subscribe to dev channel messages
Wallet bool // Subscribe to wallet events
FilterChannel Channel // Only subscribe to messages from specified channel
FilterChannels []Channel // Only subscribe to messages from specified channels
}
// ChatAPI holds information about a message received by the `keybase chat api-listen` command // ChatAPI holds information about a message received by the `keybase chat api-listen` command
type ChatAPI struct { type ChatAPI struct {
Type string `json:"type,omitempty"` Type string `json:"type,omitempty"`