Documentation ¶
Index ¶
- Variables
- func GetFileType(buffer []byte) (string, string, error)
- func GetTenantDBFromContext(ctx *kaos.Context) *datahub.Hub
- func NewSimpleFS(basicPath string) *simpleFS
- type Asset
- type AssetAPIEngine
- type AssetData
- type AssetDataBase64
- type AssetEngine
- func (ae *AssetEngine) Delete(ctx *kaos.Context, id string) (int, error)
- func (a *AssetEngine) Read(ctx *kaos.Context, id string) (*Asset, error)
- func (ae *AssetEngine) SaveAttr(ctx *kaos.Context, req *SaveAttrRequest) (string, error)
- func (ae *AssetEngine) View(ctx *kaos.Context, assetid string) ([]byte, error)
- func (a *AssetEngine) Write(ctx *kaos.Context, attachReq *AssetData) (*Asset, error)
- func (a *AssetEngine) WriteWithContent(ctx *kaos.Context, attachReq *AssetDataBase64) (*Asset, error)
- type AssetFS
- type AssetReference
- type ReferenceRequest
- type S3Asset
- type SaveAttrRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Event kaos.EventHub Topic string )
Functions ¶
func GetTenantDBFromContext ¶ added in v0.0.7
func NewSimpleFS ¶
func NewSimpleFS(basicPath string) *simpleFS
Types ¶
type Asset ¶
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 AssetData ¶
func NewAssetData ¶
func NewAssetData() *AssetData
type AssetDataBase64 ¶ added in v0.0.6
type AssetEngine ¶
type AssetEngine struct {
// contains filtered or unexported fields
}
func NewAssetEngine ¶
func NewAssetEngine(fs AssetFS, topicPrefix string) *AssetEngine
func (*AssetEngine) SaveAttr ¶
func (ae *AssetEngine) SaveAttr(ctx *kaos.Context, req *SaveAttrRequest) (string, error)
func (*AssetEngine) WriteWithContent ¶ added in v0.0.7
func (a *AssetEngine) WriteWithContent(ctx *kaos.Context, attachReq *AssetDataBase64) (*Asset, error)
type AssetReference ¶
type AssetReference struct { orm.DataModelBase `json:"-" bson:"-"` ID string `json:"_id" bson:"_id"` AssetID string RefType string RefID string Feature string }
func (*AssetReference) GetID ¶
func (ar *AssetReference) GetID(_ dbflex.IConnection) ([]string, []interface{})
func (*AssetReference) Indexes ¶ added in v0.0.6
func (ar *AssetReference) Indexes() []dbflex.DbIndex
func (*AssetReference) SetID ¶
func (ar *AssetReference) SetID(keys ...interface{})
func (*AssetReference) TableName ¶
func (ar *AssetReference) TableName() string
type ReferenceRequest ¶
type S3Asset ¶
type S3Asset struct {
// contains filtered or unexported fields
}
func NewS3WithConfig ¶ added in v0.0.6
type SaveAttrRequest ¶
Click to show internal directories.
Click to hide internal directories.