Documentation ¶
Index ¶
- Constants
- func AddSource(stype string, fn func(config interface{}) (ISource, error))
- type GetTask
- type HasTask
- type ISource
- type PostData
- type PostTask
- type PutTask
- type RmTask
- type Service
- func (S *Service) Get(app micro.IContext, task *GetTask) (interface{}, error)
- func (S *Service) GetName() string
- func (S *Service) GetTitle() string
- func (S *Service) Has(app micro.IContext, task *HasTask) (interface{}, error)
- func (S *Service) Post(app micro.IContext, task *PostTask) (*PostData, error)
- func (S *Service) Put(app micro.IContext, task *PutTask) (interface{}, error)
- func (S *Service) Rm(app micro.IContext, task *RmTask) (interface{}, error)
Constants ¶
View Source
const ERROR_NOT_FOUND = 0x0001
View Source
const Type_Base64 = "base64"
View Source
const Type_Text = "text"
View Source
const Type_URL = "url"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GetTask ¶
type GetTask struct { Name interface{} `json:"name,omitempty" name:"name" title:"配置名称"` Key string `json:"key" name:"key" title:"Key"` Type interface{} `json:"type,omitempty" name:"type" title:"类型 默认 Type.Url"` Expires interface{} `json:"expires,omitempty" name:"expires" title:"超时时间(秒) 公开读不设置"` Header interface{} `json:"header,omitempty" name:"header" title:"头 JSON 格式"` }
type HasTask ¶
type HasTask struct { Name interface{} `json:"name,omitempty" name:"name" title:"配置名称"` Key string `json:"key" name:"key" title:"Key"` }
type ISource ¶
type ISource interface { Get(key string, header map[string]string) ([]byte, error) GetURL(key string) string GetSignURL(key string, expires time.Duration, header map[string]string) (string, error) Put(key string, data []byte, header map[string]string) error PutSignURL(key string, expires time.Duration) (string, error) PostSignURL(key string, expires time.Duration) (string, map[string]string, error) Del(key string) error Has(key string) error }
func OpenSource ¶
type PostData ¶
type PostData struct { Url string `json:"url" name:"url" title:"上传URL"` Data interface{} `json:"data,omitempty" name:"data" title:"上传 Form Data"` }
type PostTask ¶
type PostTask struct { Name interface{} `json:"name,omitempty" name:"name" title:"配置名称"` Key string `json:"key" name:"key" title:"Key"` Expires interface{} `json:"expires,omitempty" name:"expires" title:"超时时间(秒) type == url 使用"` }
type PutTask ¶
type PutTask struct { Name interface{} `json:"name,omitempty" name:"name" title:"配置名称"` Key string `json:"key" name:"key" title:"Key"` Type interface{} `json:"type,omitempty" name:"type" title:"类型 默认 url"` Content interface{} `` /* 167-byte string literal not displayed */ Expires interface{} `json:"expires,omitempty" name:"expires" title:"超时时间(秒) type == url 使用"` }
type RmTask ¶
type RmTask struct { Name interface{} `json:"name,omitempty" name:"name" title:"配置名称"` Key string `json:"key" name:"key" title:"Key"` }
Click to show internal directories.
Click to hide internal directories.