Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseMapToAttributes ¶
func ParseMapToAttributes(cid string, attrMap map[string]any, fileAttributes map[string]any) ([]aa.PostKV, error)
ParseMapToAttributes parses a map and a file stat map to a slice of attributes for POSTing to the AA server It also reads the encryption keys from the filesystem, if fields are put under "private" key. Note that all keys under "private" are promoted to top level in encrypted form
Types ¶
type CrawlAdminResponse ¶
type CrawlAdminResponse struct { ID string `json:"id"` Type string `json:"type"` Userid string `json:"userid"` UserName string `json:"userName"` Oid string `json:"oid"` Profileid string `json:"profileid"` Name string `json:"name"` Description string `json:"description"` Started string `json:"started"` Finished string `json:"finished"` State string `json:"state"` Stats struct { Found int `json:"found"` Done int `json:"done"` Size int `json:"size"` } `json:"stats"` FileSize int `json:"fileSize"` FileCount int `json:"fileCount"` Tags []string `json:"tags"` Errors []string `json:"errors"` CollectionIds []string `json:"collectionIds"` Resources []struct { Name string `json:"name"` Path string `json:"path"` Hash string `json:"hash"` Size int64 `json:"size"` CrawlID string `json:"crawlId"` NumReplicas int `json:"numReplicas"` ExpireAt string `json:"expireAt"` } `json:"resources"` }
type LoginResponse ¶
type PostGenericWebhookOpt ¶
type PostGenericWebhookOpt struct { Source string // Source is the origin of the asset, which is used to determine the webhook endpoint ProjectId string // ProjectId is the project specific ID where the asset belongs Format string // Format is "json" or "cbor" }
PostWebhookOpt is the options for posting a file to the webhook server
type PostGenericWebhookResponse ¶
type PostGenericWebhookResponse struct { Cid string `json:"cid,omitempty"` Error error `json:"error,omitempty"` }
func PostFileToWebHook ¶
func PostFileToWebHook(file io.Reader, metadata map[string]any, opts PostGenericWebhookOpt) (*PostGenericWebhookResponse, error)
PostFileToWebHook posts a file and its metadata to the webhook server
Click to show internal directories.
Click to hide internal directories.