Documentation
¶
Overview ¶
package goBoom implements clients for the oBoom API. Docs: https://www.oboom.com/api
Index ¶
- Variables
- type Client
- type ErrStatusCodeMissmatch
- type ErrorResponse
- type FilesystemService
- func (s *FilesystemService) Download(item string) (*url.URL, error)
- func (s *FilesystemService) GetULServer() ([]string, error)
- func (s *FilesystemService) Mkdir(parent, name string) error
- func (s *FilesystemService) RawUpload(parent, ct string, clen int64, multiBody io.Reader) ([]ItemStat, error)
- func (s *FilesystemService) Rm(toTrash bool, items ...string) error
- func (s *FilesystemService) Upload(parent, fname string, input io.Reader) ([]ItemStat, error)
- type InformationService
- type ItemSize
- type ItemStat
- type LsInfo
- type UserService
- Bugs
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUnknwonFourResponseType = errors.New("Can only handle three responses for InformationService.Ls()")
)
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
User *UserService
Info *InformationService
FS *FilesystemService
// contains filtered or unexported fields
}
A Client manages communication with the oBoom API.
type ErrStatusCodeMissmatch ¶
type ErrStatusCodeMissmatch struct{ Http, Api int }
func (ErrStatusCodeMissmatch) Error ¶
func (e ErrStatusCodeMissmatch) Error() string
type ErrorResponse ¶
type ErrorResponse struct {
Response *http.Response // HTTP response that caused this error
Body string
}
An ErrorResponse reports one or more errors caused by an API request.
func (ErrorResponse) Error ¶
func (r ErrorResponse) Error() string
type FilesystemService ¶
type FilesystemService struct {
// contains filtered or unexported fields
}
func (*FilesystemService) Download ¶
func (s *FilesystemService) Download(item string) (*url.URL, error)
Download requests a download url for item
func (*FilesystemService) GetULServer ¶
func (s *FilesystemService) GetULServer() ([]string, error)
func (*FilesystemService) Mkdir ¶
func (s *FilesystemService) Mkdir(parent, name string) error
type InformationService ¶
type InformationService struct {
// contains filtered or unexported fields
}
type ItemStat ¶
type ItemStat struct {
Atime string `mapstructure:"atime"`
Ctime string `mapstructure:"ctime"`
Downloads int64 `mapstructure:"downloads"`
ID string `mapstructure:"id"`
Mtime string `mapstructure:"mtime"`
Iname string `mapstructure:"name"`
Parent string `mapstructure:"parent"`
Root string `mapstructure:"root"`
State string `mapstructure:"state"`
Type string `mapstructure:"type"`
User int64 `mapstructure:"user"`
Isize int64 `mapstructure:"size"`
DDL bool `mapstructure:"ddl"`
Mime string `mapstructure:"mime"`
Owner bool `mapstructure:"owner"`
}
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func (*UserService) Login ¶
func (u *UserService) Login(name, passw string) (*loginResponse, error)
Login sends a login request to the service with name and passw as credentials
Notes ¶
Bugs ¶
reload map, add lock and subscribe to changes
Source Files
¶
Click to show internal directories.
Click to hide internal directories.