files

package
v0.0.0-...-e7bb422 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Plugin = plugins.Plugin{
	Inject: NewFiles,
}

Functions

This section is empty.

Types

type File

type File struct {
	ID    int64             `json:"id"`
	Name  string            `json:"name"`
	Hash  string            `json:"sha1"`
	Props map[string]string `json:"props"`
}

func (File) MarshalEasyJSON

func (v File) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (File) MarshalJSON

func (v File) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*File) UnmarshalEasyJSON

func (v *File) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*File) UnmarshalJSON

func (v *File) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Files

type Files struct {
	// contains filtered or unexported fields
}

func NewFiles

func NewFiles(db db.DB) *Files

func (*Files) AddFile

func (v *Files) AddFile(ctx context.Context, sid int64, filename, hash string, props url.Values) error

func (*Files) HasFile

func (v *Files) HasFile(ctx context.Context, sid int64, filename string) bool

func (*Files) SearchByProps

func (v *Files) SearchByProps(ctx context.Context, sid int64, props url.Values) ([]File, error)

Jump to

Keyboard shortcuts

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