Documentation ¶
Index ¶
- Variables
- func NewSimpleFS(basicPath string) *simpleFS
- type Asset
- type AssetAPIEngine
- type AssetData
- type AssetEngine
- func (ae *AssetEngine) Delete(ctx *kaos.Context, id string) (int, error)
- func (ae *AssetEngine) HttpViewer(w http.ResponseWriter, r *http.Request)
- func (a *AssetEngine) Read(ctx *kaos.Context, id string) (*Asset, error)
- func (ae *AssetEngine) SaveAttr(ctx *kaos.Context, req *SaveAttrRequest) (string, error)
- func (a *AssetEngine) Write(ctx *kaos.Context, attachReq *AssetData) (*Asset, error)
- type AssetFS
- type AssetReference
- type ReferenceRequest
- type SaveAttrRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Event kaos.EventHub Topic string )
Functions ¶
func NewSimpleFS ¶
func NewSimpleFS(basicPath string) *simpleFS
Types ¶
type Asset ¶
type Asset struct { orm.DataModelBase `json:"-" bson:"-"` ID string `json:"_id" bson:"_id"` Title string `json:"title"` OriginalFileName string `json:"originalfilename"` NewFileName string `json:"newfilename"` URI string `json:"uri"` ContentType string `json:"contenttype"` Size int `json:"size"` Tags string `json:"tags"` }
type AssetAPIEngine ¶
type AssetAPIEngine struct { }
func (*AssetAPIEngine) FindByRefID ¶
func (ae *AssetAPIEngine) FindByRefID(ctx *kaos.Context, req *ReferenceRequest) ([]*Asset, error)
func (*AssetAPIEngine) MakeRef ¶
func (ae *AssetAPIEngine) MakeRef(ctx *kaos.Context, req *AssetReference) (string, error)
type AssetEngine ¶
type AssetEngine struct {
// contains filtered or unexported fields
}
func NewAssetEngine ¶
func NewAssetEngine(fs AssetFS) *AssetEngine
func (*AssetEngine) HttpViewer ¶
func (ae *AssetEngine) HttpViewer(w http.ResponseWriter, r *http.Request)
func (*AssetEngine) SaveAttr ¶
func (ae *AssetEngine) SaveAttr(ctx *kaos.Context, req *SaveAttrRequest) (string, error)
type AssetReference ¶
type AssetReference struct { orm.DataModelBase `json:"-" bson:"-"` ID string `json:"_id" bson:"_id"` AssetID string `json:"assetid"` RefType string `json:"reftype"` RefID string `json:"refid"` Feature string `json:"feature"` }
func (*AssetReference) GetID ¶
func (ar *AssetReference) GetID(_ dbflex.IConnection) ([]string, []interface{})
func (*AssetReference) SetID ¶
func (ar *AssetReference) SetID(keys ...interface{})
func (*AssetReference) TableName ¶
func (ar *AssetReference) TableName() string
type ReferenceRequest ¶
type SaveAttrRequest ¶
Click to show internal directories.
Click to hide internal directories.