Documentation
¶
Index ¶
- Constants
- type App
- func (v *App) Delete(w http.ResponseWriter, r *http.Request)
- func (v *App) Download(w http.ResponseWriter, r *http.Request)
- func (v *App) DownloadShare(w http.ResponseWriter, r *http.Request)
- func (v *App) List(w http.ResponseWriter, r *http.Request)
- func (v *App) LoginService(redirecURL string) http.HandlerFunc
- func (v *App) RegisterService(redirectURL string) http.HandlerFunc
- func (app *App) Run(ctx context.Context, addr string, ...) error
- func (v *App) ShareFile(publicDownloadPath string) http.HandlerFunc
- func (v *App) Upload(w http.ResponseWriter, r *http.Request)
- type Backend
- func (b *Backend) BasicAuth(ctx context.Context, username, password string) (*BasicAuthResponse, error)
- func (b *Backend) Delete(ctx context.Context, bucket, filename string) (*DeleteResponse, error)
- func (b *Backend) DownloadObject(ctx context.Context, userID, filename string) (*GetObjectResult, error)
- func (b *Backend) DownloadWithToken(ctx context.Context, shareToken string) (*GetObjectResult, error)
- func (b *Backend) Objects(ctx context.Context, userID, lastFilename string, limit int) (<-chan *Object, error)
- func (b *Backend) Register(ctx context.Context, param RegisterParam) (*RegisterResult, error)
- func (b *Backend) ShareObject(ctx context.Context, bucket, filename string) (*SharedObject, error)
- func (b *Backend) UploadObject(ctx context.Context, bucket, filename, contentType string, size int64, ...) (*UploadResult, error)
- type BasicAuthResponse
- type DeleteResponse
- type Filename
- type GetObjectResult
- type Object
- type RegisterParam
- type RegisterResult
- type ShareToken
- type SharedObject
- type UploadResult
Constants ¶
View Source
const (
Session_Account = "session_account"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (*App) DownloadShare ¶
func (v *App) DownloadShare(w http.ResponseWriter, r *http.Request)
func (*App) LoginService ¶
func (v *App) LoginService(redirecURL string) http.HandlerFunc
redirect with http status 303
func (*App) RegisterService ¶
func (v *App) RegisterService(redirectURL string) http.HandlerFunc
redirect with http status 303
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
wrap backend grpc api call
func (*Backend) DownloadObject ¶
func (*Backend) DownloadWithToken ¶
func (*Backend) Register ¶
func (b *Backend) Register(ctx context.Context, param RegisterParam) (*RegisterResult, error)
func (*Backend) ShareObject ¶
type BasicAuthResponse ¶
type DeleteResponse ¶
type GetObjectResult ¶
type GetObjectResult struct {
Filename string
ContentType string
Size int64
Reader io.ReadCloser
}
type Object ¶
type RegisterParam ¶
type RegisterResult ¶
type ShareToken ¶
type ShareToken struct {
}
func (*ShareToken) IsExpired ¶
func (st *ShareToken) IsExpired() bool
type SharedObject ¶
type SharedObject struct {
}
type UploadResult ¶
type UploadResult struct {
Sum string
}
Click to show internal directories.
Click to hide internal directories.