Documentation ¶
Index ¶
- Constants
- type Client
- type Gitee
- func (g Gitee) BaseURL() string
- func (g Gitee) GetHeaders() http.Header
- func (g Gitee) Login(config models.LoginInfo) (*models.LoginInfo, error)
- func (g *Gitee) MakeHeaders(headers map[string]string) error
- func (g *Gitee) NewRequest()
- func (g Gitee) String() string
- func (g Gitee) UploadImage(imagePath string) (string, error)
- func (g Gitee) UploadImages(imagesPath []string) ([]string, error)
- type Github
- func (g Github) BaseURL() string
- func (g Github) GetHeaders() http.Header
- func (g Github) Login(config models.LoginInfo) (*models.LoginInfo, error)
- func (g *Github) MakeHeaders(headers map[string]string) error
- func (g *Github) NewRequest()
- func (g Github) String() string
- func (g Github) UploadImage(imagePath string) (string, error)
- func (g Github) UploadImages(imagesPath []string) ([]string, error)
- type Imgtu
- func (i Imgtu) BaseURL() string
- func (i Imgtu) GetHeaders() http.Header
- func (i Imgtu) Login(config models.LoginInfo) (*models.LoginInfo, error)
- func (i *Imgtu) MakeHeaders(headers map[string]string) error
- func (i *Imgtu) NewRequest()
- func (i Imgtu) String() string
- func (i Imgtu) UploadImage(imagePath string) (string, error)
- func (i Imgtu) UploadImages(imagesPath []string) ([]string, error)
- type Ipfs
- func (i Ipfs) BaseURL() string
- func (i Ipfs) GetHeaders() http.Header
- func (i Ipfs) Login(models.LoginInfo) (*models.LoginInfo, error)
- func (i *Ipfs) MakeHeaders(headers map[string]string) error
- func (i *Ipfs) NewRequest()
- func (i Ipfs) String() string
- func (i Ipfs) UploadImage(imagePath string) (string, error)
- func (i Ipfs) UploadImages(imagesPath []string) ([]string, error)
- type SmMs
- func (s SmMs) BaseURL() string
- func (s *SmMs) GetHeaders() http.Header
- func (s SmMs) Login(config models.LoginInfo) (*models.LoginInfo, error)
- func (s *SmMs) MakeHeaders(headers map[string]string) error
- func (s *SmMs) NewRequest()
- func (s SmMs) String() string
- func (s SmMs) UploadImage(imagePath string) (string, error)
- func (s SmMs) UploadImages(imagesPath []string) ([]string, error)
Constants ¶
View Source
const ( SMMS models.ImageBedCode = iota IMGTU GITEE GITHUB IPFS )
Code for each image bed
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // Only the image bed that does not provide api // needs to implement the login method, such as // "imgtu.com" Login(models.LoginInfo) (*models.LoginInfo, error) // UploadImage uploads a image to the image bed UploadImage(imagePath string) (string, error) // UploadImages uploads multiple images to the image bed UploadImages(imagesPath []string) ([]string, error) // String returns the domain name of the image bed String() string // BaseURL returns the basic url of the image bed BaseURL() string // MakeHeaders creates the header required by the image // bed when uploading images MakeHeaders(map[string]string) error // GetHeaders returns the header used by the image bed // when uploading images GetHeaders() http.Header // NewRequest creates the request needed for the image bed NewRequest() // contains filtered or unexported methods }
type Imgtu ¶
type Imgtu struct { Config *models.LoginInfo ConfigFile string // contains filtered or unexported fields }
func (Imgtu) GetHeaders ¶
func (*Imgtu) NewRequest ¶
func (i *Imgtu) NewRequest()
type Ipfs ¶ added in v0.0.3
type Ipfs struct { ConfigFile string // contains filtered or unexported fields }
func (Ipfs) GetHeaders ¶ added in v0.0.3
func (*Ipfs) MakeHeaders ¶ added in v0.0.3
func (*Ipfs) NewRequest ¶ added in v0.0.3
func (i *Ipfs) NewRequest()
func (Ipfs) UploadImage ¶ added in v0.0.3
type SmMs ¶
type SmMs struct { Config *models.LoginInfo ConfigFile string // contains filtered or unexported fields }
func (*SmMs) GetHeaders ¶
func (*SmMs) NewRequest ¶
func (s *SmMs) NewRequest()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.