Documentation
¶
Index ¶
- func AttemptCreateDerivedContent(t *testing.T, serverURL, parentID string) *http.Response
- func SetContentMetadata(t *testing.T, serverURL, contentID string, metadata map[string]interface{})
- func SetupTestServer() *httptest.Server
- type ContentMetadataResponse
- type ContentResponse
- func CreateContent(t *testing.T, serverURL string) ContentResponse
- func CreateDerivedContent(t *testing.T, serverURL, parentID string) ContentResponse
- func GetDerivedContent(t *testing.T, serverURL, parentID string) []ContentResponse
- func GetDerivedContentTree(t *testing.T, serverURL, rootID string) []ContentResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttemptCreateDerivedContent ¶
AttemptCreateDerivedContent attempts to create a derived content and returns the response
func SetContentMetadata ¶
SetContentMetadata sets metadata for a content via the API
func SetupTestServer ¶
SetupTestServer creates a test server with all routes configured
Types ¶
type ContentMetadataResponse ¶
type ContentMetadataResponse struct {
ContentID string `json:"content_id"`
ContentType string `json:"content_type"`
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
Tags []string `json:"tags,omitempty"`
FileSize int64 `json:"file_size,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
}
ContentMetadataResponse represents the response from metadata-related API endpoints
func GetContentMetadata ¶
func GetContentMetadata(t *testing.T, serverURL, contentID string) ContentMetadataResponse
GetContentMetadata gets metadata for a content via the API
type ContentResponse ¶
type ContentResponse struct {
ID string `json:"id"`
ParentID string `json:"parent_id,omitempty"`
OwnerID string `json:"owner_id"`
TenantID string `json:"tenant_id"`
Status string `json:"status"`
DerivationType string `json:"derivation_type"`
DerivationLevel int `json:"derivation_level"`
}
ContentResponse represents the response from content-related API endpoints
func CreateContent ¶
func CreateContent(t *testing.T, serverURL string) ContentResponse
CreateContent creates a new content via the API
func CreateDerivedContent ¶
func CreateDerivedContent(t *testing.T, serverURL, parentID string) ContentResponse
CreateDerivedContent creates a derived content via the API
func GetDerivedContent ¶
func GetDerivedContent(t *testing.T, serverURL, parentID string) []ContentResponse
GetDerivedContent gets derived content via the API
func GetDerivedContentTree ¶
func GetDerivedContentTree(t *testing.T, serverURL, rootID string) []ContentResponse
GetDerivedContentTree gets the derived content tree via the API