push

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2016 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PUSH_NOTE_TYPE = "note"
	PUSH_LINK_TYPE = "link"
	PUSH_FILE_TYPE = "file"
)
View Source
const (
	PUSH_BULLET_SETTING_FILE = "~/.pushmoi/pushbullet.setting.json"
)

Variables

View Source
var (
	Pushsettings = new(Settings)
)

Functions

func NewGetCommand

func NewGetCommand() cli.Command

func NewListDevices

func NewListDevices() cli.Command

func NewSetCommand

func NewSetCommand() cli.Command

func NewSyncCommand

func NewSyncCommand() cli.Command

Types

type Push

type Push struct {
	// Targeting for push
	Iden       string `json:"device_iden,omitempty"`
	Email      string `json:"email,omitempty"`
	ChannelTag string `json:"channel_tag,omitempty"`
	ClientIden string `json:"client_iden,omitempty"`

	// Payload for the push
	Kind     string `json:"type"`
	Title    string `json:"title,omitempty"`
	Body     string `json:"body,omitempty"`
	Url      string `json:"url,omitempty"`
	FileName string `json:"file_name,omitempty"`
	FileType string `json:"file_type,omitempty"`
	FileUrl  string `json:"file_url,omitempty"`

	// Push initiator identity
	SrcIden string `json:"source_device_iden,omitempty"`

	// Unique identifier
	Guid string `json:"guid,omitempty"`
}

func NewPush

func NewPush(kind, title string) *Push

func (*Push) Send

func (p *Push) Send(ctx context.Context) error

type Settings

type Settings struct {
	Default *oauth2.Device `json:"default"`
}

func (*Settings) Dump

func (s *Settings) Dump() error

func (*Settings) Load

func (s *Settings) Load() error

Jump to

Keyboard shortcuts

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