Documentation
¶
Index ¶
- Constants
- Variables
- type Client
- func (c *Client) Create(ctx context.Context, provider string, fromWorkspaces ...string) (string, error)
- func (c *Client) DeleteFile(ctx context.Context, id, file string) error
- func (c *Client) DeleteRevision(ctx context.Context, id, fileName, revision string) error
- func (c *Client) GetRevision(ctx context.Context, id, fileName, revision string) (*File, error)
- func (c *Client) ListRevisions(ctx context.Context, id, fileName string) ([]RevisionInfo, error)
- func (c *Client) Ls(ctx context.Context, id, prefix string) ([]string, error)
- func (c *Client) OpenFile(ctx context.Context, id, fileName string, opts ...OpenOptions) (*File, error)
- func (c *Client) Providers() []string
- func (c *Client) RemoveAllWithPrefix(ctx context.Context, id, prefix string) error
- func (c *Client) Rm(ctx context.Context, id string) error
- func (c *Client) StatFile(ctx context.Context, id, fileName string, opts ...StatOptions) (FileInfo, error)
- func (c *Client) WriteFile(ctx context.Context, id, fileName string, reader io.Reader, ...) error
- type ConflictError
- type File
- type FileExistsError
- type FileInfo
- type NotFoundError
- type OpenOptions
- type Options
- type RevisionInfo
- type StatOptions
- type WriteOptions
Constants ¶
View Source
const ( DirectoryProvider = "directory" S3Provider = "s3" AzureProvider = "azure" )
Variables ¶
View Source
var RevisionNotRequestedError = errors.New("revision not requested")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) DeleteRevision ¶
func (*Client) GetRevision ¶
func (*Client) ListRevisions ¶
func (*Client) RemoveAllWithPrefix ¶
type ConflictError ¶
type ConflictError struct {
// contains filtered or unexported fields
}
func (*ConflictError) Error ¶
func (e *ConflictError) Error() string
type FileExistsError ¶
type FileExistsError ConflictError
func (*FileExistsError) Error ¶
func (e *FileExistsError) Error() string
type FileInfo ¶
type FileInfo struct { WorkspaceID string `json:"workspaceID"` Name string `json:"name"` Size int64 `json:"size"` ModTime time.Time `json:"modTime"` MimeType string `json:"mimeType"` RevisionID string `json:"revisionID"` }
func (*FileInfo) GetRevisionID ¶
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
type OpenOptions ¶
type OpenOptions struct {
WithLatestRevisionID bool
}
type RevisionInfo ¶
func (*RevisionInfo) GetRevisionID ¶
func (r *RevisionInfo) GetRevisionID() (string, error)
type StatOptions ¶
type StatOptions struct {
WithLatestRevisionID bool
}
type WriteOptions ¶
Click to show internal directories.
Click to hide internal directories.