gofile

package
v3.59.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2026 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIResponse

type APIResponse struct {
	Status string      `json:"status"`
	Data   interface{} `json:"data"`
}

type AccountInfoResponse

type AccountInfoResponse struct {
	Status string `json:"status"`
	Data   struct {
		ID         string `json:"id"`
		Type       string `json:"type"`
		Email      string `json:"email"`
		RootFolder string `json:"rootFolder"`
	} `json:"data"`
}

type AccountResponse

type AccountResponse struct {
	Status string `json:"status"`
	Data   struct {
		ID string `json:"id"`
	} `json:"data"`
}

type Addition

type Addition struct {
	driver.RootID
	APIToken         string `json:"api_token" required:"true" help:"Get your API token from your Gofile profile page"`
	LinkExpiry       int    `json:"link_expiry" type:"number" default:"30" help:"Direct link cache duration in days. Set to 0 to disable caching"`
	DirectLinkExpiry int    `` /* 140-byte string literal not displayed */
}

type Content

type Content struct {
	ID           string             `json:"id"`
	Type         string             `json:"type"` // "file" or "folder"
	Name         string             `json:"name"`
	Size         int64              `json:"size,omitempty"`
	CreateTime   int64              `json:"createTime"`
	ModTime      int64              `json:"modTime,omitempty"`
	DirectLink   string             `json:"directLink,omitempty"`
	Children     map[string]Content `json:"children,omitempty"`
	ParentFolder string             `json:"parentFolder,omitempty"`
	MD5          string             `json:"md5,omitempty"`
	MimeType     string             `json:"mimeType,omitempty"`
	Link         string             `json:"link,omitempty"`
}

func (*Content) IsDir

func (c *Content) IsDir() bool

func (*Content) ModifiedTime

func (c *Content) ModifiedTime() time.Time

type ContentsResponse

type ContentsResponse struct {
	Status string `json:"status"`
	Data   struct {
		IsOwner      bool               `json:"isOwner"`
		ID           string             `json:"id"`
		Type         string             `json:"type"`
		Name         string             `json:"name"`
		ParentFolder string             `json:"parentFolder"`
		CreateTime   int64              `json:"createTime"`
		ChildrenList []string           `json:"childrenList,omitempty"`
		Children     map[string]Content `json:"children,omitempty"`
		Contents     map[string]Content `json:"contents,omitempty"`
		Public       bool               `json:"public,omitempty"`
		Description  string             `json:"description,omitempty"`
		Tags         string             `json:"tags,omitempty"`
		Expiry       int64              `json:"expiry,omitempty"`
	} `json:"data"`
}

type CopyResponse

type CopyResponse struct {
	Status string `json:"status"`
	Data   struct {
		CopiedContents map[string]string `json:"copiedContents"` // oldId -> newId mapping
	} `json:"data"`
}

type CreateFolderResponse

type CreateFolderResponse struct {
	Status string `json:"status"`
	Data   struct {
		ID           string `json:"id"`
		Type         string `json:"type"`
		Name         string `json:"name"`
		ParentFolder string `json:"parentFolder"`
		CreateTime   int64  `json:"createTime"`
	} `json:"data"`
}

type DirectLinkResponse

type DirectLinkResponse struct {
	Status string `json:"status"`
	Data   struct {
		DirectLink string `json:"directLink"`
		ID         string `json:"id"`
	} `json:"data"`
}

type ErrorResponse

type ErrorResponse struct {
	Status string `json:"status"`
	Error  struct {
		Message string `json:"message"`
		Code    string `json:"code"`
	} `json:"error"`
}

type Gofile

type Gofile struct {
	model.Storage
	Addition
	// contains filtered or unexported fields
}

func (*Gofile) ArchiveDecompress

func (d *Gofile) ArchiveDecompress(ctx context.Context, srcObj, dstDir model.Obj, args model.ArchiveDecompressArgs) ([]model.Obj, error)

func (*Gofile) Config

func (d *Gofile) Config() driver.Config

func (*Gofile) Copy

func (d *Gofile) Copy(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error)

func (*Gofile) Drop

func (d *Gofile) Drop(ctx context.Context) error

func (*Gofile) Extract

func (d *Gofile) Extract(ctx context.Context, obj model.Obj, args model.ArchiveInnerArgs) (*model.Link, error)

func (*Gofile) GetAddition

func (d *Gofile) GetAddition() driver.Additional

func (*Gofile) GetArchiveMeta

func (d *Gofile) GetArchiveMeta(ctx context.Context, obj model.Obj, args model.ArchiveArgs) (model.ArchiveMeta, error)

func (*Gofile) Init

func (d *Gofile) Init(ctx context.Context) error
func (d *Gofile) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)

func (*Gofile) List

func (d *Gofile) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)

func (*Gofile) ListArchive

func (d *Gofile) ListArchive(ctx context.Context, obj model.Obj, args model.ArchiveInnerArgs) ([]model.Obj, error)

func (*Gofile) MakeDir

func (d *Gofile) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) (model.Obj, error)

func (*Gofile) Move

func (d *Gofile) Move(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error)

func (*Gofile) Put

func (d *Gofile) Put(ctx context.Context, dstDir model.Obj, fileStreamer model.FileStreamer, up driver.UpdateProgress) (model.Obj, error)

func (*Gofile) Remove

func (d *Gofile) Remove(ctx context.Context, obj model.Obj) error

func (*Gofile) Rename

func (d *Gofile) Rename(ctx context.Context, srcObj model.Obj, newName string) (model.Obj, error)

type UpdateResponse

type UpdateResponse struct {
	Status string `json:"status"`
	Data   struct {
		ID   string `json:"id"`
		Name string `json:"name"`
	} `json:"data"`
}

type UploadResponse

type UploadResponse struct {
	Status string `json:"status"`
	Data   struct {
		DownloadPage string `json:"downloadPage"`
		Code         string `json:"code"`
		ParentFolder string `json:"parentFolder"`
		FileId       string `json:"fileId"`
		FileName     string `json:"fileName"`
		GuestToken   string `json:"guestToken,omitempty"`
	} `json:"data"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL