Documentation ¶
Index ¶
- Constants
- func Login(ctx context.Context, host string, data LoginReq, opts ...LoginOpt) (string, error)
- type AlistResp
- 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
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 = AlistResp[FsGetRespData]
type FsGetRespData ¶ added in v0.3.3
type FsGetRespData struct { Name string `json:"name"` Size uint64 `json:"size"` IsDir bool `json:"is_dir"` Modified time.Time `json:"modified"` Created time.Time `json:"created"` Sign string `json:"sign"` Thumb string `json:"thumb"` Type uint64 `json:"type"` Hashinfo string `json:"hashinfo"` HashInfo any `json:"hash_info"` RawURL string `json:"raw_url"` Readme string `json:"readme"` Provider string `json:"provider"` Related []*FsGetRelated `json:"related"` }
type FsListResp ¶
type FsListResp = AlistResp[fsListResp]
type FsMkdirReq ¶
type FsMkdirReq struct {
Path string `json:"path"`
}
type FsMkdirResp ¶
type FsOtherReq ¶
type FsOtherResp ¶
type FsOtherResp = AlistResp[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 = AlistResp[fsSearchResp]
type LoginOptions ¶
type LoginOptions struct {
Hashed bool
}
Click to show internal directories.
Click to hide internal directories.