creation

package
v0.0.0-...-bde9636 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package creation provides ...

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteProject

func DeleteProject(handler gorexos.RequestHandler, urn string) error

Types

type FileReference

type FileReference struct {
	FileUrn        string                 `json:"fileUrn"`
	Transformation gorexos.Transformation `json:"transformation"`
	Urn            string                 `json:"urn"`
}

func CreateFileReference

func CreateFileReference(handler gorexos.RequestHandler, projectUrn, groupUrn, fileUrn string, localTransformation gorexos.Transformation) (FileReference, error)

CreateFileReference creates a 3D reference in space which points to a project file being referenced by the fileUrn. The group reference needs to be created first.

type GroupReference

type GroupReference struct {
	Transformation gorexos.TransformationWithScale `json:"transformation"`
	Urn            string                          `json:"urn"`
}

func CreateGroupReference

func CreateGroupReference(handler gorexos.RequestHandler, projectUrn string, localTransformation gorexos.TransformationWithScale) (GroupReference, error)

CreateGroupReference creates a 3D group reference in space. This is required for a valid REXcad project. Every file reference needs to go underneath this group reference.

type PortalReference

type PortalReference struct {
	Key            string                 `json:"key"`
	Name           string                 `json:"name"`
	Positioned     bool                   `json:"positioned"`
	Urn            string                 `json:"urn"`
	Transformation gorexos.Transformation `json:"transformation"`
}

type Project

type Project struct {
	Name            string          `json:"name"`
	Owner           string          `json:"owner"`
	Urn             string          `json:"urn"`
	PortalReference PortalReference `json:"portalReference"`
}

func CreateProject

func CreateProject(handler gorexos.RequestHandler, name string, portalReference PortalReference) (Project, error)

type ProjectDescription

type ProjectDescription struct {
	Name                 string `json:"name"`
	NumberOfProjectFiles int    `json:"numberOfProjectFiles"`
	Public               bool   `json:"public"`
	TotalProjectFileSize int    `json:"totalProjectFileSize"`
	Type                 string `json:"type"`
	Urn                  string `json:"urn"`
}

type ProjectFile

type ProjectFile struct {
	Name           string                          `json:"name"`
	Urn            string                          `json:"urn"`
	Transformation gorexos.TransformationWithScale `json:"transformation"`
	Type           string                          `json:"type"`
}

func UploadProjectFile

func UploadProjectFile(handler gorexos.RequestHandler, urn, fileName string, dataTransform *gorexos.TransformationWithScale) (ProjectFile, error)

type ProjectFileDetail

type ProjectFileDetail struct {
	ProjectFile
	ContentType  string `json:"contentType"`
	DownloadLink string `json:"downloadLink"`
	FileSize     int    `json:"fileSize"`
}

func GetProjectFiles

func GetProjectFiles(handler gorexos.RequestHandler, projectUrn string) ([]ProjectFileDetail, error)

type ProjectParameters

type ProjectParameters struct {
	Anchored        string
	IsOwnedBy       string
	IsReadSharedTo  string
	IsWriteSharedTo string
	Legacy          string
	IsHiddenFor     string
	IsFavoriteOf    string
}

type ProjectsPaged

type ProjectsPaged struct {
	Page struct {
		Number        int `json:"number"`
		Size          int `json:"size"`
		TotalElements int `json:"totalElements"`
		TotalPages    int `json:"totalPages"`
	} `json:"page"`
	Projects []ProjectDescription `json:"projects"`
}

func GetProjects

func GetProjects(handler gorexos.RequestHandler, page int64, params *ProjectParameters) (ProjectsPaged, error)

Jump to

Keyboard shortcuts

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