Documentation
¶
Index ¶
- Constants
- Variables
- type Asset
- type Assets
- type Client
- func (c *Client) DownloadJSON(id string) ([]byte, error)
- func (c *Client) GetChildrenJSON(id, filter string) (*Assets, error)
- func (c *Client) GetMetadataFS(filepath string) (*Asset, error)
- func (c *Client) GetMetadataJSON(id string) (*Asset, error)
- func (c *Client) GetRoot() string
- func (c *Client) MkdirJSON(parent, name string) (*Asset, error)
- func (c *Client) UploadJSON(parent, filename string, payload []byte) (*Asset, error)
- type CombinedError
- type NodeJSON
- type ResponseError
Constants ¶
View Source
const ( AssetFile = "FILE" AssetFolder = "FOLDER" StatusAvailable = "AVAILABLE" StatusTrash = "TRASH" StatusPurged = "PURGED" DebugTrace = 1 << 0 // function calls DebugHTTP = 1 << 1 // HTTP return errors DebugURL = 1 << 2 // URL DebugBody = 1 << 3 // raw body DebugJSON = 1 << 4 // pretty JSON DebugToken = 1 << 5 // login with amazon token DebugLoud = 1 << 6 // frequent function calls )
exported contants
Variables ¶
View Source
var (
ErrNotFound = errors.New("object not found")
)
Functions ¶
This section is empty.
Types ¶
type Asset ¶
type Asset struct { // Overlapped ID string `json:"id"` Name string `json:"name"` Kind string `json:"kind"` // ACDAsset* Version int `json:"version"` ModifiedDate time.Time `json:"modifiedDate"` CreatedDate time.Time `json:"createdDate"` Labels []string `json:"labels"` Description string `json:"description"` CreatedBy string `json:"createdBy"` Parents []string `json:"parents"` Status string `json:"status"` // ACDStatus* // File TempLink string `json:"tempLink"` ContentProperties struct { Version int `json:"version"` MD5 string `json:"md5"` Size int `json:"size"` ContentType string `json:"contentType"` Extension string `json:"extension"` ContentDate time.Time `json:"contentDate"` } `json:"contentProperties"` // Folder Restricted bool `json:"restricted"` IsRoot bool `json:"isRoot"` }
Asset is either a file or a folder. Since most fields overlap use Kind to determine which is which.
type Assets ¶
type Assets struct { Count int `json:"count"` NextToken string `json:"nextToken"` Data []Asset `json:"data"` }
Assets is a collection of assets. This structure is returned by several commands.
type CombinedError ¶
type CombinedError struct { StatusCode int Status string Body []byte ErrorJSON *ResponseError }
func IsCombinedError ¶
func IsCombinedError(err error) (*CombinedError, bool)
func NewCombinedError ¶
func NewCombinedError(sc int, status string, body []byte) CombinedError
func (CombinedError) Error ¶
func (c CombinedError) Error() string
Click to show internal directories.
Click to hide internal directories.