Documentation ¶
Index ¶
- Constants
- func Login(ctx context.Context, host string, data LoginReq, opts ...LoginOpt) (string, error)
- type Client
- func (c *Client) Do(req *http.Request) (*http.Response, error)
- func (c *Client) FsGet(fSGetReq *FsGetReq) (*FsGetRespData, error)
- func (c *Client) FsList(fSListReq *FsListReq) (*fsListResp, error)
- func (c *Client) FsMkdir(fSMkdirReq *FsMkdirReq) error
- func (c *Client) FsOther(fSOtherReq *FsOtherReq) (*fsOtherResp, error)
- func (c *Client) FsRemove(fSRemoveReq *FsRemoveReq) error
- func (c *Client) FsRename(fSRenameReq *FsRenameReq) error
- func (c *Client) FsSearch(fSSearchReq *FsSearchReq) (*fsSearchResp, error)
- func (c *Client) Login(data LoginReq, opts ...LoginOpt) error
- func (c *Client) Me() (*meResp, error)
- func (c *Client) NewRequest(method, relative string, data any) (req *http.Request, err error)
- func (c *Client) SetToken(token string)
- type ClientConfig
- type FsGetRelated
- type FsGetReq
- type FsGetResp
- type FsGetRespData
- type FsListReq
- type FsListResp
- type FsMkdirReq
- type FsMkdirResp
- type FsOtherReq
- type FsOtherResp
- type FsRemoveReq
- type FsRemoveResp
- type FsRenameReq
- type FsRenameResp
- type FsSearchReq
- type FsSearchResp
- type LoginOpt
- type LoginOptions
- type LoginReq
- type LoginResp
- type MeResp
- type Resp
Constants ¶
View Source
const (
FsOtherReqMethodVideoPreview = "video_preview"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) FsMkdir ¶
func (c *Client) FsMkdir(fSMkdirReq *FsMkdirReq) error
func (*Client) FsOther ¶
func (c *Client) FsOther(fSOtherReq *FsOtherReq) (*fsOtherResp, error)
func (*Client) FsRemove ¶
func (c *Client) FsRemove(fSRemoveReq *FsRemoveReq) error
func (*Client) FsRename ¶
func (c *Client) FsRename(fSRenameReq *FsRenameReq) error
func (*Client) FsSearch ¶ added in v0.3.2
func (c *Client) FsSearch(fSSearchReq *FsSearchReq) (*fsSearchResp, error)
func (*Client) NewRequest ¶
type ClientConfig ¶
type ClientConfig func(*Client)
func WithContext ¶
func WithContext(ctx context.Context) ClientConfig
func WithUserAgent ¶ added in v0.3.3
func WithUserAgent(userAgent string) ClientConfig
type FsGetRelated ¶ added in v0.3.3
type FsGetResp ¶
type FsGetResp = Resp[FsGetRespData]
type FsGetRespData ¶ added in v0.3.3
type FsGetRespData struct { Modified time.Time `json:"modified"` Created time.Time `json:"created"` HashInfo any `json:"hash_info"` Sign string `json:"sign"` Thumb string `json:"thumb"` Hashinfo string `json:"hashinfo"` Name string `json:"name"` RawURL string `json:"raw_url"` Readme string `json:"readme"` Provider string `json:"provider"` Related []*FsGetRelated `json:"related"` Size uint64 `json:"size"` Type uint64 `json:"type"` IsDir bool `json:"is_dir"` }
type FsListResp ¶
type FsListResp = Resp[fsListResp]
type FsMkdirReq ¶
type FsMkdirReq struct {
Path string `json:"path"`
}
type FsMkdirResp ¶
type FsOtherReq ¶
type FsOtherResp ¶
type FsOtherResp = Resp[fsOtherResp]
type FsRemoveReq ¶
type FsRemoveResp ¶
type FsRenameReq ¶
type FsRenameResp ¶
type FsSearchReq ¶ added in v0.3.2
type FsSearchResp ¶ added in v0.3.2
type FsSearchResp = Resp[fsSearchResp]
type LoginOptions ¶
type LoginOptions struct {
Hashed bool
}
Click to show internal directories.
Click to hide internal directories.