Documentation ¶
Index ¶
- type ApiService
- func (s *ApiService) CreatePaste(code string, language string) (*Response, error)
- func (s *ApiService) CreateShorten(url string) (*Response, error)
- func (s *ApiService) CreateUpload(file *os.File) (*Response, error)
- func (s *ApiService) GetInfo(link string) (*Response, error)
- func (s *ApiService) GetLanguages() (*[]Language, error)
- type Language
- type Paste
- type Response
- type Upload
- type Url
- type UtcTime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiService ¶
type ApiService struct {
// contains filtered or unexported fields
}
func NewApiService ¶
func NewApiService(httpClient *http.Client, apiUrl string) *ApiService
func (*ApiService) CreatePaste ¶
func (s *ApiService) CreatePaste(code string, language string) (*Response, error)
func (*ApiService) CreateShorten ¶
func (s *ApiService) CreateShorten(url string) (*Response, error)
func (*ApiService) CreateUpload ¶
func (s *ApiService) CreateUpload(file *os.File) (*Response, error)
func (*ApiService) GetLanguages ¶
func (s *ApiService) GetLanguages() (*[]Language, error)
type Response ¶
type Response struct { Created UtcTime `json:"created"` Updated UtcTime `json:"updated"` Url Url `json:"url,omitempty"` Paste Paste `json:"paste,omitempty"` Upload Upload `json:"upload,omitempty"` Link string `json:"link"` Expiry UtcTime `json:"expiry"` }
func (*Response) GetSummary ¶
Click to show internal directories.
Click to hide internal directories.