manifestFile

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DTO

type DTO struct {
	FileName string `json:"file_name"`
	FilePath string `json:"file_path"`
	FileType string `json:"file_type"`
	UploadId string `json:"upload_id""`
	Status   string `json:"status"`
	Icon     string `json:"icon"`
}

type FileDTO

type FileDTO struct {
	UploadID       string `json:"upload_id"`
	S3Key          string `json:"s3_key"`
	TargetPath     string `json:"target_path"`
	TargetName     string `json:"target_name"`
	Status         Status `json:"status"`
	MergePackageId string `json:"merge_package_id"` // MergePackageId is ID of package if not using UploadID
	FileType       string `json:"file_type"`        // FileType is string representation of fileType (auto populated if empty)
}

FileDTO used to transfer file object in API requests.

type FileStatusDTO

type FileStatusDTO struct {
	UploadId string `json:"upload_id"`
	Status   Status `json:"status"`
}

FileStatusDTO used to transfer status information in API requests.

type GetManifestFilesResponse

type GetManifestFilesResponse struct {
	ManifestId        string `json:"manifest_id"`
	Files             []DTO  `json:"files"`
	ContinuationToken string `json:"continuation_token"` //Upload ID of the last returned item
}

type Status

type Status int64
const (
	Local      Status = iota // set when client creates upload (local only)
	Registered               // set when client syncs with server (local, server)
	Imported                 // set when uploader imported file (local, server)
	Finalized                // set when importer moves file to final destination (local, server)
	Verified                 // set when client is informed of finalized status (local, server)
	Failed                   // set when importer fails to import (local, server)
	Removed                  // set when client removes file locally (local only)
	Unknown                  // set when sync failed (local only)
	Changed                  // set when synced file is updated locally (local only)
	Uploaded                 // set when file has successfully been uploaded to server (local only)
)

func (Status) IsInProgress

func (s Status) IsInProgress() string

IsInProgress returns a boolean indicating whether upload status reflects a finalized status

func (Status) ManifestFileStatusMap

func (s Status) ManifestFileStatusMap(value string) Status

ManifestFileStatusMap maps string values to FileStatus objects.

func (Status) String

func (s Status) String() string

String returns string version of FileStatus object.

Jump to

Keyboard shortcuts

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