misskey

package
v3.42.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addition

type Addition struct {
	// Usually one of two
	driver.RootPath
	// define other
	// Field string `json:"field" type:"select" required:"true" options:"a,b,c" default:"a"`
	Endpoint    string `json:"endpoint" required:"true" default:"https://misskey.io"`
	AccessToken string `json:"access_token" required:"true"`
}

type MFile

type MFile struct {
	ID           string     `json:"id"`
	CreatedAt    string     `json:"createdAt"`
	Name         string     `json:"name"`
	Type         string     `json:"type"`
	MD5          string     `json:"md5"`
	Size         int64      `json:"size"`
	IsSensitive  bool       `json:"isSensitive"`
	Blurhash     string     `json:"blurhash"`
	Properties   Properties `json:"properties"`
	URL          string     `json:"url"`
	ThumbnailURL string     `json:"thumbnailUrl"`
	Comment      *string    `json:"comment"`
	FolderID     *string    `json:"folderId"`
	Folder       MFolder    `json:"folder"`
}

type MFolder

type MFolder struct {
	ID        string  `json:"id"`
	CreatedAt string  `json:"createdAt"`
	Name      string  `json:"name"`
	ParentID  *string `json:"parentId"`
}

type Misskey

type Misskey struct {
	model.Storage
	Addition
}

func (*Misskey) Config

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

func (*Misskey) Copy

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

func (*Misskey) Drop

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

func (*Misskey) GetAddition

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

func (*Misskey) Init

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

func (*Misskey) List

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

func (*Misskey) MakeDir

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

func (*Misskey) Move

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

func (*Misskey) Put

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

func (*Misskey) Remove

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

func (*Misskey) Rename

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

type Properties

type Properties struct {
	Width  int `json:"width"`
	Height int `json:"height"`
}

type Resp

type Resp struct {
	Code int
	Raw  []byte
}

Jump to

Keyboard shortcuts

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