Documentation ¶
Overview ¶
Package dogbin provides a simple go client library for dogbin and hastebin.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Document struct { Slug string `json:"_id"` IsUrl bool `json:"isUrl"` Content string `json:"content"` ViewCount int `json:"viewCount"` }
Document represents the dogbin document structure and is used for both dogbin and hastebin here
type Message ¶
type Message struct {
Message string `json:"message"`
}
Message represents the json format used by the server for errors
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server defines the dogbin or hastebin server to communicate with
func Dogbin ¶
func Dogbin() Server
Dogbin returns a Server instance configured for the public del.dog dogbin instance
func Hastebin ¶
func Hastebin() Server
Hastebin returns a Server instance configured for the public hastebin.com hastebin instance
func NewServer ¶
NewServer returns a new Server configured for the supplied dogbin/hastebin instance
type UploadRequest ¶
UploadRequest represents the json used internally for uploads to the dogbin extended API
type UploadResult ¶
type UploadResult struct { IsUrl bool `json:"isUrl"` Slug string `json:"key"` Url string `json:"-"` }
UploadResult represents the json returned for upload requests