drives

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AliOSSUpload

type AliOSSUpload struct {
	Endpoint        string
	AccessKeyId     string
	AccessKeySecret string
	BucketName      string
}

func NewAliOSSUpload

func NewAliOSSUpload(endpoint, accessKeyId, accessKeySecret, bucketName string) *AliOSSUpload

func (*AliOSSUpload) Name

func (a *AliOSSUpload) Name() string

func (*AliOSSUpload) Upload

func (a *AliOSSUpload) Upload(data []byte, fileName string) (string, error)

type ImgurData

type ImgurData struct {
	Link string `json:"link"`
}

type ImgurResponse

type ImgurResponse struct {
	Status  int       `json:"status"`
	Success bool      `json:"success"`
	Data    ImgurData `json:"data,omitempty"`
}

type ImgurUpload

type ImgurUpload struct {
	ClientId string
}

func NewImgurUpload

func NewImgurUpload(clientId string) *ImgurUpload

func (*ImgurUpload) Name

func (i *ImgurUpload) Name() string

func (*ImgurUpload) Upload

func (i *ImgurUpload) Upload(data []byte, fileName string) (string, error)

type S3Upload

type S3Upload struct {
	EndPoint        string
	CustomDomain    string
	AccessKeyId     string
	AccessKeySecret string
	BucketName      string
	// contains filtered or unexported fields
}

func NewS3Upload

func NewS3Upload(endpoint, accessKeyId, accessKeySecret, bucketName, cdnurl string, expirationDays int) *S3Upload

func (*S3Upload) Name

func (a *S3Upload) Name() string

func (*S3Upload) Upload

func (a *S3Upload) Upload(data []byte, s3Key string) (string, error)

type SMData

type SMData struct {
	URL string `json:"url"`
}

type SMResponse

type SMResponse struct {
	Success   bool   `json:"success"`
	Code      string `json:"code"`
	Message   string `json:"message"`
	Data      SMData `json:"data,omitempty"`
	RequestID string `json:"RequestId"`
}

type SMUpload

type SMUpload struct {
	Secret string
}

func NewSMUpload

func NewSMUpload(secret string) *SMUpload

func (*SMUpload) Name

func (sm *SMUpload) Name() string

func (*SMUpload) Upload

func (sm *SMUpload) Upload(data []byte, fileName string) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL