go/structs.go

34 lines
656 B
Go
Raw Normal View History

2017-06-08 05:40:35 +00:00
package pastee
import "net/http"
type Pastee struct {
ApiKey string
Base string
Client *http.Client
}
type Paste struct {
Encrypted bool `json:"encrypted,omitempty"`
Description string `json:"description,omitempty"`
Sections []*Section `json:"sections"`
}
type Section struct {
Name string `json:"name,omitempty"`
Syntax string `json:"syntax,omitempty"`
Contents string `json:"contents"`
}
type Error struct {
Field string `json:"field"`
Code int `json:"code"`
Message string `json:"message"`
}
type PasteResponse struct {
Success bool `json:"success"`
Errors []*Error `json:"errors"`
ID string `json:"id"`
Link string `json:"link"`
}