pastebin

package
v0.30.1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package pastebin wraps the basic functions of the Pastebin API and exposes a Go API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pastebin

type Pastebin struct {
	DevKey string
}

func (*Pastebin) Get

func (p *Pastebin) Get(id string) (text string, err error)

Get returns the text inside the paste identified by ID.

func (*Pastebin) Put

func (p *Pastebin) Put(text, title string) (id string, err error)

Put uploads text to Pastebin with optional title returning the ID or an error.

func (*Pastebin) StripURL

func (p *Pastebin) StripURL(url string) string

StripURL returns the paste ID from a pastebin URL.

func (*Pastebin) WrapID

func (p *Pastebin) WrapID(id string) string

WrapID returns the pastebin URL from a paste ID.

Jump to

Keyboard shortcuts

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