Documentation ¶
Index ¶
- type FileUploadError
- type FlysystemClaims
- type JWTToken
- func (t *JWTToken) BuildToken(aud, disk, bucket string) (*TokenResponse, error)
- func (t *JWTToken) Delete(fs *flysystem.Flysystem, disk, bucket, fileName string) (*Response, error)
- func (t *JWTToken) ParseToken(token string) (*FlysystemClaims, error)
- func (t *JWTToken) UploadBase64(fs *flysystem.Flysystem, disk, bucket, fileName, base64Str string) (*Response, error)
- func (t *JWTToken) UploadByte(fs *flysystem.Flysystem, disk, bucket, fileName string, contents []byte) (*Response, error)
- func (t *JWTToken) UploadReader(fs *flysystem.Flysystem, disk, bucket, fileName string, reader io.Reader) (*Response, error)
- func (t *JWTToken) WithTokenDelete(fs *flysystem.Flysystem, token, fileName string) (*Response, error)
- func (t *JWTToken) WithTokenUploadBase64(fs *flysystem.Flysystem, token, fileName, base64 string) (*Response, error)
- func (t *JWTToken) WithTokenUploadFilePath(fs *flysystem.Flysystem, token, fileName, filePath string) (*Response, error)
- func (t *JWTToken) WithTokenUploadMultipart(fs *flysystem.Flysystem, token, fileName string, file *multipart.FileHeader) (*Response, error)
- func (t *JWTToken) WithTokenUploadReader(fs *flysystem.Flysystem, token, fileName string, reader io.Reader) (*Response, error)
- type Manage
- func (t *Manage) BuildToken(aud, disk, bucket string) (*TokenResponse, error)
- func (t *Manage) Delete(disk, bucket, fileName string) (*Response, error)
- func (t *Manage) ParseToken(token string) (*FlysystemClaims, error)
- func (t *Manage) UploadBase64(disk, bucket, fileName, base64Str string) (*Response, error)
- func (t *Manage) UploadByte(disk, bucket, fileName string, contents []byte) (*Response, error)
- func (t *Manage) UploadReader(disk, bucket, fileName string, reader io.Reader) (*Response, error)
- func (t *Manage) WithTokenDelete(token, fileName string) (*Response, error)
- func (t *Manage) WithTokenUploadBase64(token, fileName, base64 string) (*Response, error)
- func (t *Manage) WithTokenUploadFilePath(token, fileName, filePath string) (*Response, error)
- func (t *Manage) WithTokenUploadMultipart(token, fileName string, file *multipart.FileHeader) (*Response, error)
- func (t *Manage) WithTokenUploadReader(token, fileName string, reader io.Reader) (*Response, error)
- type Response
- type TokenResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileUploadError ¶
func NewError ¶
func NewError(code int, msg string) *FileUploadError
func (*FileUploadError) Error ¶
func (f *FileUploadError) Error() string
type FlysystemClaims ¶
type FlysystemClaims struct { jwt.StandardClaims Disk string `json:"disk"` Bucket string `json:"bucket"` }
type JWTToken ¶
func (*JWTToken) BuildToken ¶
func (t *JWTToken) BuildToken(aud, disk, bucket string) (*TokenResponse, error)
func (*JWTToken) ParseToken ¶
func (t *JWTToken) ParseToken(token string) (*FlysystemClaims, error)
func (*JWTToken) UploadBase64 ¶
func (*JWTToken) UploadByte ¶
func (*JWTToken) UploadReader ¶
func (*JWTToken) WithTokenDelete ¶ added in v0.4.1
func (*JWTToken) WithTokenUploadBase64 ¶
func (*JWTToken) WithTokenUploadFilePath ¶
func (*JWTToken) WithTokenUploadMultipart ¶
type Manage ¶ added in v0.4.1
type Manage struct {
// contains filtered or unexported fields
}
func (*Manage) BuildToken ¶ added in v0.4.1
func (t *Manage) BuildToken(aud, disk, bucket string) (*TokenResponse, error)
func (*Manage) ParseToken ¶ added in v0.4.1
func (t *Manage) ParseToken(token string) (*FlysystemClaims, error)
func (*Manage) UploadBase64 ¶ added in v0.4.1
func (*Manage) UploadByte ¶ added in v0.4.1
func (*Manage) UploadReader ¶ added in v0.4.1
func (*Manage) WithTokenDelete ¶ added in v0.4.1
func (*Manage) WithTokenUploadBase64 ¶ added in v0.4.1
func (*Manage) WithTokenUploadFilePath ¶ added in v0.4.1
func (*Manage) WithTokenUploadMultipart ¶ added in v0.4.1
type TokenResponse ¶
Click to show internal directories.
Click to hide internal directories.