Documentation
¶
Index ¶
- Variables
- func InitCmd(cmd *cobra.Command)
- func NewWriter(w io.Writer) *mWriter
- func Upload(file []string)
- type Ali
- type AliResp
- type BD
- type BDItem
- type BDResp
- type CC
- type CCImageItem
- type CCResp
- type Chevereto
- type CheveretoResp
- type DownloadDataFlow
- type IKr
- type IKrResp
- type IU
- type IUResp
- type ImgBox
- type ImgBoxResp
- type ImgBoxTokenResp
- type Itp
- type ItpResp
- type JJ
- type JJCol
- type JJItem
- type JJResp
- type NT
- type NTResp
- type PR
- type PRResp
- type PicBed
- type SG
- type SM
- type SMItem
- type SMResp
- type SN
- type SNResp
- type TG
- type TT
- type TTResp
- type UploadDataFlow
- type VM
- type XM
- type XMResp
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PRBackend = new(PR) PRFinder = regexp.MustCompile(`og:image" content="(.*?)"`) )
View Source
var ( Dest string Backend string Verbose bool )
View Source
var (
AliBackend = new(Ali)
)
View Source
var (
BDBackend = new(BD)
)
View Source
var (
CCBackend = new(CC)
)
View Source
var (
CheveretoBackend = new(Chevereto)
)
View Source
var (
IKrBackend = new(IKr)
)
View Source
var (
IUBackend = new(IU)
)
View Source
var (
ImgBoxBackend = new(ImgBox)
)
View Source
var (
ItpBackend = new(Itp)
)
View Source
var (
JJBackend = new(JJ)
)
View Source
var (
NTBackend = new(NT)
)
View Source
var (
SGBackend = new(SG)
)
View Source
var (
SMBackend = new(SM)
)
View Source
var (
SNBackend = new(SN)
)
View Source
var (
TGBackend = new(TG)
)
View Source
var (
TTBackend = new(TT)
)
View Source
var (
VMBackend = new(VM)
)
View Source
var (
XMBackend = new(XM)
)
Functions ¶
Types ¶
type Ali ¶
type Ali struct {
// contains filtered or unexported fields
}
func (Ali) DownloadStream ¶
func (s Ali) DownloadStream(chan DownloadDataFlow)
func (Ali) UploadStream ¶
func (s Ali) UploadStream(chan UploadDataFlow)
type BD ¶
type BD struct {
// contains filtered or unexported fields
}
func (BD) DownloadStream ¶
func (s BD) DownloadStream(chan DownloadDataFlow)
func (BD) UploadStream ¶
func (s BD) UploadStream(chan UploadDataFlow)
type CC ¶
type CC struct {
// contains filtered or unexported fields
}
func (CC) DownloadStream ¶
func (s CC) DownloadStream(chan DownloadDataFlow)
func (CC) UploadStream ¶
func (s CC) UploadStream(chan UploadDataFlow)
type CCImageItem ¶
type CCResp ¶
type CCResp struct { Code int64 `json:"code"` Errors int64 `json:"total_error"` Image []CCImageItem `json:"success_image"` }
type Chevereto ¶
type Chevereto struct {
// contains filtered or unexported fields
}
func (Chevereto) DownloadStream ¶
func (s Chevereto) DownloadStream(chan DownloadDataFlow)
func (Chevereto) UploadStream ¶
func (s Chevereto) UploadStream(chan UploadDataFlow)
type CheveretoResp ¶
type CheveretoResp struct { StatusCode int `json:"status_code"` Image struct { Name string `json:"name"` URL string `json:"url"` } `json:"image"` Error struct { Message string `json:"message"` ErrorID string `json:"errorId"` Code int `json:"code"` } `json:"error"` StatusTxt string `json:"status_txt"` }
type DownloadDataFlow ¶
type IKr ¶
type IKr struct {
// contains filtered or unexported fields
}
func (IKr) DownloadStream ¶
func (s IKr) DownloadStream(chan DownloadDataFlow)
func (IKr) UploadStream ¶
func (s IKr) UploadStream(chan UploadDataFlow)
type IU ¶
type IU struct {
// contains filtered or unexported fields
}
func (IU) DownloadStream ¶
func (s IU) DownloadStream(chan DownloadDataFlow)
func (IU) UploadStream ¶
func (s IU) UploadStream(chan UploadDataFlow)
type ImgBox ¶
type ImgBox struct {
// contains filtered or unexported fields
}
func (ImgBox) DownloadStream ¶
func (s ImgBox) DownloadStream(chan DownloadDataFlow)
func (ImgBox) UploadStream ¶
func (s ImgBox) UploadStream(chan UploadDataFlow)
type ImgBoxResp ¶
type ImgBoxResp struct { Files []struct { ID string `json:"id"` Slug string `json:"slug"` Name string `json:"name"` NameHTMLEscaped string `json:"name_html_escaped"` CreatedAt time.Time `json:"created_at"` CreatedAtHuman string `json:"created_at_human"` UpdatedAt time.Time `json:"updated_at"` GalleryID any `json:"gallery_id"` URL string `json:"url"` OriginalURL string `json:"original_url"` ThumbnailURL string `json:"thumbnail_url"` SquareURL string `json:"square_url"` Selected bool `json:"selected"` CommentsEnabled int `json:"comments_enabled"` CommentsCount int `json:"comments_count"` } `json:"files"` }
type ImgBoxTokenResp ¶
type Itp ¶
type Itp struct {
// contains filtered or unexported fields
}
func (Itp) DownloadStream ¶
func (s Itp) DownloadStream(chan DownloadDataFlow)
func (Itp) UploadStream ¶
func (s Itp) UploadStream(chan UploadDataFlow)
type ItpResp ¶
type ItpResp struct { Code int64 `json:"code"` Data struct { ID string `json:"id"` Md5 string `json:"md5"` Mime string `json:"mime"` Name string `json:"name"` Sha1 string `json:"sha1"` Size int64 `json:"size"` URL string `json:"url"` } `json:"data"` Msg string `json:"msg"` Time int64 `json:"time"` }
type JJ ¶
type JJ struct {
// contains filtered or unexported fields
}
func (JJ) DownloadStream ¶
func (s JJ) DownloadStream(chan DownloadDataFlow)
func (JJ) UploadStream ¶
func (s JJ) UploadStream(chan UploadDataFlow)
type NT ¶
type NT struct {
// contains filtered or unexported fields
}
func (NT) DownloadStream ¶
func (s NT) DownloadStream(chan DownloadDataFlow)
func (NT) UploadStream ¶
func (s NT) UploadStream(chan UploadDataFlow)
type PR ¶
type PR struct {
// contains filtered or unexported fields
}
func (PR) DownloadStream ¶
func (s PR) DownloadStream(chan DownloadDataFlow)
func (PR) UploadStream ¶
func (s PR) UploadStream(chan UploadDataFlow)
type PicBed ¶
type PicBed interface { Upload([]byte) (string, error) UploadStream(chan UploadDataFlow) // optional DownloadStream(chan DownloadDataFlow) // optional }
func ParseBackend ¶
type SG ¶
type SG struct {
// contains filtered or unexported fields
}
func (SG) DownloadStream ¶
func (s SG) DownloadStream(chan DownloadDataFlow)
func (SG) UploadStream ¶
func (s SG) UploadStream(chan UploadDataFlow)
type SM ¶
type SM struct {
// contains filtered or unexported fields
}
func (SM) DownloadStream ¶
func (s SM) DownloadStream(chan DownloadDataFlow)
func (SM) UploadStream ¶
func (s SM) UploadStream(chan UploadDataFlow)
type SN ¶
type SN struct {
// contains filtered or unexported fields
}
func (SN) DownloadStream ¶
func (s SN) DownloadStream(chan DownloadDataFlow)
func (SN) UploadStream ¶
func (s SN) UploadStream(chan UploadDataFlow)
type TG ¶
type TG struct {
// contains filtered or unexported fields
}
func (TG) DownloadStream ¶
func (s TG) DownloadStream(chan DownloadDataFlow)
func (TG) UploadStream ¶
func (s TG) UploadStream(chan UploadDataFlow)
type TT ¶
type TT struct {
// contains filtered or unexported fields
}
func (TT) DownloadStream ¶
func (s TT) DownloadStream(chan DownloadDataFlow)
func (TT) UploadStream ¶
func (s TT) UploadStream(chan UploadDataFlow)
type UploadDataFlow ¶
type VM ¶
type VM struct {
// contains filtered or unexported fields
}
func (VM) DownloadStream ¶
func (s VM) DownloadStream(chan DownloadDataFlow)
func (VM) UploadStream ¶
func (s VM) UploadStream(chan UploadDataFlow)
type XM ¶
type XM struct {
// contains filtered or unexported fields
}
func (XM) DownloadStream ¶
func (s XM) DownloadStream(chan DownloadDataFlow)
func (XM) UploadStream ¶
func (s XM) UploadStream(chan UploadDataFlow)
Click to show internal directories.
Click to hide internal directories.