Documentation ¶
Index ¶
Constants ¶
View Source
const (
TopicAssetSaved = "asset_service.asset_saved"
)
Variables ¶
This section is empty.
Functions ¶
func NewFileService ¶
func NewHTTPClient ¶
func NewHTTPClient() *httpClientImpl
Types ¶
type Asset ¶
type Asset struct { // URL is the url where this asset was found URL string // Content is the text content of the asset Content string // Namespace is the namespace folder where this file should be stored (e.g. raw, optimized, source code) Namespace string // ContentType is the type of the content of this file ContentType string // Parent is the asset that loaded the current asset, nil if it doesn't exist. (e.g. html page loading a js script) Parent *Asset // Path is the path where this asset was stored Path string }
func (Asset) GetParentURL ¶
type AssetService ¶
type AssetService interface { AsyncSaveAsset(ctx context.Context, asset Asset) AsyncFetchAndSave(ctx context.Context, req AsyncFetchAndSaveRequest) }
func NewAssetService ¶
func NewAssetService(cfg AssetServiceConfig) AssetService
type AssetServiceConfig ¶
type EventAssetSaved ¶
type EventAssetSaved struct {
Asset Asset
}
Click to show internal directories.
Click to hide internal directories.