Documentation ¶
Index ¶
- Variables
- func AesDecrypt(cipherText string, password string) (string, error)
- func AesEncrypt(content string, password string) (string, error)
- func DefaultEvpKDF(password []byte, salt []byte) (key []byte, iv []byte, err error)
- func EvpKDF(password []byte, salt []byte, keySize int, iterations int, ...) ([]byte, error)
- func PKCS5Padding(src []byte, blockSize int) []byte
- func PKCS5UnPadding(src []byte) []byte
- type Error
- type Folder
- type MultiPastePart
- type Notifcation
- type Overview
- type Paste
- type PastefyApiClient
- func (apiClient PastefyApiClient) AddFriendToPaste(paste string, friend string) error
- func (apiClient PastefyApiClient) CreateFolder(folder Folder) (*Folder, error)
- func (apiClient PastefyApiClient) CreatePaste(paste Paste) (*Paste, error)
- func (apiClient PastefyApiClient) DeleteFolder(id string) error
- func (apiClient PastefyApiClient) DeletePaste(id string) error
- func (apiClient PastefyApiClient) GetFolder(id string) (Folder, error)
- func (apiClient PastefyApiClient) GetOverview() (Overview, error)
- func (apiClient PastefyApiClient) GetPaste(id string) (Paste, error)
- func (apiClient PastefyApiClient) GetUser() (User, error)
- func (apiClient PastefyApiClient) GetUserFolders() ([]Folder, error)
- func (apiClient PastefyApiClient) GetUserNotifications() ([]Notifcation, error)
- func (apiClient PastefyApiClient) GetUserPastes() ([]Paste, error)
- func (apiClient PastefyApiClient) GetUserSharedPastes() ([]Paste, error)
- func (apiClient PastefyApiClient) MarkAllNotificationsAsRead() error
- func (apiClient PastefyApiClient) Request(method string, url string, body interface{}) (*http.Response, error)
- func (apiClient PastefyApiClient) RequestMap(method string, url string, body interface{}, ma interface{}) (*http.Response, error)
- func (apiClient PastefyApiClient) SaveFolder(folder Folder) (*Folder, error)
- func (apiClient PastefyApiClient) SavePaste(paste Paste) (*Paste, error)
- func (apiClient *PastefyApiClient) SetApiToken(token string)
- func (apiClient *PastefyApiClient) SetBaseURL(baseURL string)
- func (apiClient PastefyApiClient) UpdateFolder(id string, folder Folder) (*Folder, error)
- func (apiClient PastefyApiClient) UpdatePaste(id string, paste Paste) (*Paste, error)
- type Response
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var PasteType = struct { MULTI_PASTE string PASTE string }{ MULTI_PASTE: "MULTI_PASTE", PASTE: "PASTE", }
Functions ¶
func DefaultEvpKDF ¶
func PKCS5Padding ¶
Types ¶
type MultiPastePart ¶
type Notifcation ¶
type Paste ¶
type Paste struct { Id string `json:"id"` Created string `json:"created"` Encrypted bool `json:"encrypted"` UserId string `json:"user_id,omitempty"` Exists bool `json:"exists"` Title string `json:"title"` Type string `json:"type,omitempty"` FolderId string `json:"folder,omitempty"` Content string `json:"content"` RawUrl string `json:"raw_url,omitempty"` }
func (Paste) GetMultiPasteParts ¶
func (paste Paste) GetMultiPasteParts() []MultiPastePart
type PastefyApiClient ¶
type PastefyApiClient struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient() PastefyApiClient
func NewClientWithBaseURL ¶
func NewClientWithBaseURL(baseURL string) PastefyApiClient
func (PastefyApiClient) AddFriendToPaste ¶
func (apiClient PastefyApiClient) AddFriendToPaste(paste string, friend string) error
func (PastefyApiClient) CreateFolder ¶
func (apiClient PastefyApiClient) CreateFolder(folder Folder) (*Folder, error)
func (PastefyApiClient) CreatePaste ¶
func (apiClient PastefyApiClient) CreatePaste(paste Paste) (*Paste, error)
func (PastefyApiClient) DeleteFolder ¶
func (apiClient PastefyApiClient) DeleteFolder(id string) error
func (PastefyApiClient) DeletePaste ¶
func (apiClient PastefyApiClient) DeletePaste(id string) error
func (PastefyApiClient) GetFolder ¶
func (apiClient PastefyApiClient) GetFolder(id string) (Folder, error)
func (PastefyApiClient) GetOverview ¶
func (apiClient PastefyApiClient) GetOverview() (Overview, error)
func (PastefyApiClient) GetPaste ¶
func (apiClient PastefyApiClient) GetPaste(id string) (Paste, error)
func (PastefyApiClient) GetUser ¶
func (apiClient PastefyApiClient) GetUser() (User, error)
func (PastefyApiClient) GetUserFolders ¶
func (apiClient PastefyApiClient) GetUserFolders() ([]Folder, error)
func (PastefyApiClient) GetUserNotifications ¶
func (apiClient PastefyApiClient) GetUserNotifications() ([]Notifcation, error)
func (PastefyApiClient) GetUserPastes ¶
func (apiClient PastefyApiClient) GetUserPastes() ([]Paste, error)
func (PastefyApiClient) GetUserSharedPastes ¶
func (apiClient PastefyApiClient) GetUserSharedPastes() ([]Paste, error)
func (PastefyApiClient) MarkAllNotificationsAsRead ¶
func (apiClient PastefyApiClient) MarkAllNotificationsAsRead() error
func (PastefyApiClient) RequestMap ¶
func (PastefyApiClient) SaveFolder ¶
func (apiClient PastefyApiClient) SaveFolder(folder Folder) (*Folder, error)
func (PastefyApiClient) SavePaste ¶
func (apiClient PastefyApiClient) SavePaste(paste Paste) (*Paste, error)
func (*PastefyApiClient) SetApiToken ¶
func (apiClient *PastefyApiClient) SetApiToken(token string)
func (*PastefyApiClient) SetBaseURL ¶
func (apiClient *PastefyApiClient) SetBaseURL(baseURL string)
func (PastefyApiClient) UpdateFolder ¶
func (apiClient PastefyApiClient) UpdateFolder(id string, folder Folder) (*Folder, error)
func (PastefyApiClient) UpdatePaste ¶
func (apiClient PastefyApiClient) UpdatePaste(id string, paste Paste) (*Paste, error)
Click to show internal directories.
Click to hide internal directories.