sendpaste

package
v0.0.0-...-9b57bea Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2017 License: Apache-2.0 Imports: 8 Imported by: 1

README

sendpaste

sendpaste是一个简单的云复制粘贴服务.目前可以复制文字和文件, 但还只能用于命令行.

服务端需要部署sendpasted

复制文字

sendpaste "helloworld"

复制文件

sendpaste -f a.txt

获取最近一次复制的内容

sendpaste

配置文件放在$(HOME)/.sendpaste.json

{
	"ServerAddr": "ip:port",
	"Auth": ""
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Paste

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

func (*Paste) Add

func (p *Paste) Add(arg *SendData, reply *int64) error

func (*Paste) Get

func (p *Paste) Get(arg int, reply *PasteData) error

func (*Paste) GetByID

func (p *Paste) GetByID(arg int64, reply *PasteData) error

func (*Paste) List

func (p *Paste) List(arg int, reply *[]*PasteData) error

type PasteData

type PasteData struct {
	Data       []byte
	FileName   string
	CreateTime time.Time
	ID         int64
}

type PasteServer

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

func NewPasteServer

func NewPasteServer() *PasteServer

func (*PasteServer) RunWithHttp

func (s *PasteServer) RunWithHttp(addr string, patten string, mux *http.ServeMux)

type SendData

type SendData struct {
	Data     []byte
	FileName string
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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