xgxw

package module
v0.0.0-...-18ff29a Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2019 License: GPL-3.0 Imports: 2 Imported by: 0

README

瞎搞瞎玩

Go Report Card

预配置

  1. 安装 && 启动mysql: 参照 mysql
  2. 恢复数据库与表: 参照 goose

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	FileID   string `json:"fid" gorm:"column:fid"`
	Name     string `json:"name" gorm:"column:name"`
	Content  string `json:"content" gorm:"column:content"`
	UpdateAt string `json:"update_at" gorm:"column:update_at"`
}

File is ...

type FileService

type FileService interface {
	Get(ctx context.Context, fid string) (todo *File, err error)
	// 先作成常量的, 后续改为可以diff的.
	Put(ctx context.Context, fid, content string) (err error)
	// Del is 删除文件
	Del(ctx context.Context, fid string) (err error)
	// DelFiles is 删除多个文件
	DelFiles(ctx context.Context, fids []string) (err error)
	// GetCatalog is 获取文件列表, 返回目录树的json字符串
	GetCatalog(ctx context.Context, path string, opts storage.ListOption) (catalog string, paths []string, err error)
	SignURL(ctx context.Context, fid string, method storage.HTTPMethod, expiredInSec int64) (url string, err error)
}

FileService is ...

Directories

Path Synopsis
internal
cmd

Jump to

Keyboard shortcuts

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