Documentation
¶
Index ¶
- func CheckTranslationProgress(urn string, token string) (progress string, err error)
- func CreateTransientBucket(bucketName string, token string) (bucketKey string, err error)
- func StartServer(port string)
- func TranslateSourceToSVF(objectID string, token string) (urn string, err error)
- func UploadAndConvert(filename string, data []byte, token string) (urn string, err error)
- func UploadDataIntoBucket(filename string, data []byte, bucketKey string, token string) (objectID string, err error)
- type BucketParams
- type CreateBucketResponse
- type ForgeServices
- type Format
- type TranslationParams
- type TranslationResponse
- type TranslationStatusResponse
- type UploadFileToBucketResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckTranslationProgress ¶
CheckTranslationProgress will check the status of the work and will return progress either "complete" or as percent value
func CreateTransientBucket ¶
CreateTransientBucket is responsible for creation of a transient bucket given the bucket name
func StartServer ¶
func StartServer(port string)
StartServer is responsible for setting up and lunching a simple web-server on the specified port
func TranslateSourceToSVF ¶
TranslateSourceToSVF takes care of base64 conversion of objectID and returns the URN for which translation was started
func UploadAndConvert ¶
UploadAndConvert takes cares of file uploading and translation, given the file and access token
Types ¶
type BucketParams ¶
type BucketParams struct {
BucketKey string `json:"bucketKey"`
PolicyKey string `json:"policyKey"`
}
BucketParams struct reflects the Bucket Creation parameters
type CreateBucketResponse ¶
type CreateBucketResponse struct {
BucketKey string `json:"bucketKey"`
BucketOwner string `json:"bucketOwner"`
CreatedDate int64 `json:"createdDate"`
Permissions []struct {
AuthID string `json:"authId"`
Access string `json:"access"`
} `json:"permissions"`
PolicyKey string `json:"policyKey"`
}
CreateBucketResponse reflects the the data returned upon creating a bucket
type ForgeServices ¶
type ForgeServices struct {
// contains filtered or unexported fields
}
ForgeServices holds the necessary references to Forge services
type Format ¶
Format struct is part of TranslationParams struct and reflects the type to be translated to and the views
type TranslationParams ¶
type TranslationParams struct {
Input struct {
URN string `json:"urn"`
} `json:"input"`
Output struct {
Formats []Format `json:"formats"`
} `json:"output"`
}
TranslationParams reflects the data and the structure necessary to start a translation job
type TranslationResponse ¶
TranslationResponse struct reflects the necessary data returned upon starting file translation
type TranslationStatusResponse ¶
type TranslationStatusResponse struct {
Type string `json:"type"`
Status string `json:"status"`
Progress string `json:"progress"`
Region string `json:"region"`
URN string `json:"urn"`
Version string `json:"version"`
}
TranslationStatusResponse reflect the data returned when checking for translation status
type UploadFileToBucketResponse ¶
type UploadFileToBucketResponse struct {
BucketKey string `json:"bucketKey"`
ObjectID string `json:"objectId"`
ObjectKey string `json:"objectKey"`
SHA1 string `json:"sha1"`
Size int64 `json:"size"`
ContentType string `json:"contentType"`
Location string `json:"location"`
}
UploadFileToBucketResponse struct reflects the data returned upon file uploading into a bucket