assets

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2026 License: MIT Imports: 3 Imported by: 0

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

type AssetCreated struct {
	OccurredAt time.Time `json:"occurred_at"`
	Asset      Asset     `json:"asset"`
}

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

type AssetDeleted struct {
	OccurredAt time.Time `json:"occurred_at"`
	Asset      Asset     `json:"asset"`
}

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 Category

type Category string

type CommentingStatus

type CommentingStatus string

type LicenseType

type LicenseType string

type MediaType

type MediaType string

type Status

type Status string

type VisibilityType

type VisibilityType string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL