media

package
v0.0.0-...-0e6b51b Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ERROR_NOT_FOUND = 0x0001

Variables

This section is empty.

Functions

This section is empty.

Types

type AddTask

type AddTask struct {
	Name    interface{} `json:"name,omitempty" name:"name" title:"存储表名"`
	Region  interface{} `json:"region,omitempty" name:"region" title:"存储分区"`
	Uid     interface{} `json:"uid,omitempty" name:"uid" title:"用户ID"`
	Type    interface{} `json:"type,omitempty" name:"type" title:"类型"`
	Title   interface{} `json:"title,omitempty" name:"title" title:"标题"`
	Keyword interface{} `json:"keyword,omitempty" name:"keyword" title:"关键字"`
	Path    interface{} `json:"path,omitempty" name:"path" title:"存储路径"`
	Options interface{} `json:"options,omitempty" name:"options" title:"其他数据 JSON 叠加数据"`
}

func (*AddTask) GetName

func (T *AddTask) GetName() string

func (*AddTask) GetTitle

func (T *AddTask) GetTitle() string

type CountData

type CountData struct {
	Total int32 `json:"total" name:"total" title:"总记录数"`
}

type CountTask

type CountTask struct {
	Name   interface{} `json:"name,omitempty" name:"name" title:"存储表名"`
	Region interface{} `json:"region,omitempty" name:"region" title:"存储分区"`
	Uid    interface{} `json:"uid,omitempty" name:"uid" title:"用户ID"`
	Q      interface{} `json:"q,omitempty" name:"q" title:"搜索关键字"`
	Prefix interface{} `json:"prefix,omitempty" name:"prefix" title:"路径前缀"`
	Type   interface{} `json:"type,omitempty" name:"type" title:"类型,多个逗号分割"`
}

func (*CountTask) GetName

func (T *CountTask) GetName() string

func (*CountTask) GetTitle

func (T *CountTask) GetTitle() string

type GetTask

type GetTask struct {
	Name   interface{} `json:"name,omitempty" name:"name" title:"存储表名"`
	Region interface{} `json:"region,omitempty" name:"region" title:"存储分区"`
	Id     int64       `json:"id" name:"id" title:"媒体ID"`
	Uid    interface{} `json:"uid,omitempty" name:"uid" title:"用户ID"`
}

func (*GetTask) GetName

func (T *GetTask) GetName() string

func (*GetTask) GetTitle

func (T *GetTask) GetTitle() string

type Media

type Media struct {
	db.Object
	Uid     int64       `json:"uid" name:"uid" title:"用户ID" index:"ASC"`
	Type    string      `json:"type" name:"type" title:"类型" length:"32" index:"ASC"`
	Title   string      `json:"title" name:"title" title:"标题" length:"2048"`
	Keyword string      `json:"keyword" name:"keyword" title:"关键字" length:"4096"`
	Path    string      `json:"path" name:"path" title:"存储路径" length:"2048"`
	Options interface{} `json:"options,omitempty" name:"options" title:"其他数据" length:"-1"`
	Ctime   int64       `json:"ctime" name:"ctime" title:"创建时间"`
}

func (*Media) GetName

func (O *Media) GetName() string

func (*Media) GetTitle

func (O *Media) GetTitle() string

type QueryData

type QueryData struct {
	Items []*Media       `json:"items,omitempty" name:"items" title:"媒体"`
	Page  *QueryDataPage `json:"page,omitempty" name:"page" title:"分页"`
}

type QueryDataPage

type QueryDataPage struct {
	P     int32 `json:"p" name:"p" title:"分页位置"`
	N     int32 `json:"n" name:"n" title:"单页记录数"`
	Count int32 `json:"count" name:"count" title:"总页数"`
	Total int32 `json:"total" name:"total" title:"总记录数"`
}

type QueryTask

type QueryTask struct {
	Name   interface{} `json:"name,omitempty" name:"name" title:"存储表名"`
	Region interface{} `json:"region,omitempty" name:"region" title:"存储分区"`
	Uid    interface{} `json:"uid,omitempty" name:"uid" title:"用户ID"`
	Q      interface{} `json:"q,omitempty" name:"q" title:"搜索关键字"`
	Prefix interface{} `json:"prefix,omitempty" name:"prefix" title:"路径前缀"`
	Type   interface{} `json:"type,omitempty" name:"type" title:"类型,多个逗号分割"`
	P      interface{} `json:"p,omitempty" name:"p" title:"分页位置, 从1开始, 0 不处理分页"`
	N      interface{} `json:"n,omitempty" name:"n" title:"分页大小,默认 20"`
}

func (*QueryTask) GetName

func (T *QueryTask) GetName() string

func (*QueryTask) GetTitle

func (T *QueryTask) GetTitle() string

type RmTask

type RmTask struct {
	Name   interface{} `json:"name,omitempty" name:"name" title:"存储表名"`
	Region interface{} `json:"region,omitempty" name:"region" title:"存储分区"`
	Id     int64       `json:"id" name:"id" title:"媒体ID"`
	Uid    interface{} `json:"uid,omitempty" name:"uid" title:"用户ID"`
}

func (*RmTask) GetName

func (T *RmTask) GetName() string

func (*RmTask) GetTitle

func (T *RmTask) GetTitle() string

type Service

type Service struct {
}

func (*Service) Add

func (S *Service) Add(app micro.IContext, task *AddTask) (*Media, error)

func (*Service) Count

func (S *Service) Count(app micro.IContext, task *CountTask) (*CountData, error)

func (*Service) Get

func (S *Service) Get(app micro.IContext, task *GetTask) (*Media, error)

func (*Service) GetName

func (S *Service) GetName() string

func (*Service) GetTitle

func (S *Service) GetTitle() string

func (*Service) Query

func (S *Service) Query(app micro.IContext, task *QueryTask) (*QueryData, error)

func (*Service) Rm

func (S *Service) Rm(app micro.IContext, task *RmTask) (*Media, error)

func (*Service) Set

func (S *Service) Set(app micro.IContext, task *SetTask) (*Media, error)

type SetTask

type SetTask struct {
	Name    interface{} `json:"name,omitempty" name:"name" title:"存储表名"`
	Region  interface{} `json:"region,omitempty" name:"region" title:"存储分区"`
	Id      int64       `json:"id" name:"id" title:"媒体ID"`
	Uid     interface{} `json:"uid,omitempty" name:"uid" title:"用户ID"`
	Type    interface{} `json:"type,omitempty" name:"type" title:"类型"`
	Title   interface{} `json:"title,omitempty" name:"title" title:"标题"`
	Keyword interface{} `json:"keyword,omitempty" name:"keyword" title:"关键字"`
	Path    interface{} `json:"path,omitempty" name:"path" title:"存储路径"`
	Options interface{} `json:"options,omitempty" name:"options" title:"其他数据 JSON 叠加数据"`
}

func (*SetTask) GetName

func (T *SetTask) GetName() string

func (*SetTask) GetTitle

func (T *SetTask) GetTitle() string

Jump to

Keyboard shortcuts

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