Documentation
¶
Overview ¶
putlib project main.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PutConfig ¶
type PutConfig struct {
PathToWorkdir bool
// Client is the HTTP client used for uploads. When nil, http.DefaultClient
// is used. Set it to control TLS behavior (e.g. InsecureSkipVerify).
Client *http.Client
// Progress, when non-nil, receives a Write for every chunk of the request
// body sent, so callers can render an upload progress bar. The total byte
// count equals the file/manifest length.
Progress io.Writer
// Retention, when non-empty, is sent as the Tie-Retention header on every
// upload: a Go duration (e.g. "72h") or "infinite". Empty means the server
// default (permanent).
Retention string
// OwnerToken, when non-empty, is sent as the Tie-Owner header so the owner
// can later change the blob's retention. It is a shared secret, not stored
// in plaintext on the server.
OwnerToken string
// Store, when non-empty, is sent as the Tie-Store header to select which
// physical store on a multi-store filehost receives the blob. Empty targets
// the filehost's default store.
Store string
}
func (*PutConfig) UploadFile ¶
func (pc *PutConfig) UploadFile(url string, path string) StatusItem
func (*PutConfig) UploadMultipart ¶
type Status ¶
type Status struct {
LastItem StatusItem
UploadedItems []StatusItem
ErrorMsg string
}
Click to show internal directories.
Click to hide internal directories.