Documentation
¶
Overview ¶
Package assets contains the public integration-event contracts owned by assets-core.
Index ¶
Constants ¶
View Source
const SubjectAssetCreated = "events.asset.created"
View Source
const SubjectAssetDeleted = "events.asset.deleted"
View Source
const SubjectAssetUpdated = "events.asset.updated"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Asset ¶
type Asset struct {
ID uuid.UUID `json:"id"`
UserID uuid.UUID `json:"user_id"`
Name *string `json:"name"`
Description *string `json:"description"`
Status Status `json:"status"`
MediaType MediaType `json:"media_type"`
LicenseType LicenseType `json:"license_type"`
Visibility VisibilityType `json:"visibility"`
Category Category `json:"category"`
CommentingStatus CommentingStatus `json:"commenting_status"`
Price float64 `json:"price"`
SubscriptionPeriod *int `json:"subscription_period"`
Locale *string `json:"locale"`
CountryISO *string `json:"country_iso"`
Lat *float64 `json:"lat"`
Lng *float64 `json:"lng"`
PreviewAssetID *uuid.UUID `json:"preview_asset_id"`
Path string `json:"path"`
Extension string `json:"extension"`
FileSize *int64 `json:"file_size"`
FileLength *float64 `json:"file_length"`
FileDetails json.RawMessage `json:"file_details"`
SourceClient *string `json:"source_client"`
SourceDetails *string `json:"source_details"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
Asset is the canonical wire snapshot of an asset embedded in assets-core integration events.
type AssetCreated ¶
AssetCreated is published when assets-core creates an asset integration snapshot.
func (*AssetCreated) Subject ¶
func (*AssetCreated) Subject() string
func (*AssetCreated) Version ¶
func (*AssetCreated) Version() string
type AssetDeleted ¶
AssetDeleted is published when assets-core deletes an asset integration snapshot.
func (*AssetDeleted) Subject ¶
func (*AssetDeleted) Subject() string
func (*AssetDeleted) Version ¶
func (*AssetDeleted) Version() string
type AssetUpdated ¶
type AssetUpdated struct {
OccurredAt time.Time `json:"occurred_at"`
Current Asset `json:"current"`
Previous Asset `json:"previous"`
}
AssetUpdated is published when assets-core changes an asset integration snapshot.
func (*AssetUpdated) Subject ¶
func (*AssetUpdated) Subject() string
func (*AssetUpdated) Version ¶
func (*AssetUpdated) Version() string
type CommentingStatus ¶
type CommentingStatus string
type LicenseType ¶
type LicenseType string
type VisibilityType ¶
type VisibilityType string
Click to show internal directories.
Click to hide internal directories.