Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchSaveRequest ¶
type BatchSaveRequest struct {
Files []Record `json:"files"`
}
type BatchSaveResponse ¶
type BatchSaveResponse struct {
}
type DeleteRequest ¶
type DeleteResponse ¶
type DeleteResponse struct {
}
type FileService ¶
type FileService struct {
// contains filtered or unexported fields
}
func NewFileService ¶
func NewFileService(token string) *FileService
func (*FileService) Delete ¶
func (t *FileService) Delete(request *DeleteRequest) (*DeleteResponse, error)
Delete a file by project name/path
func (*FileService) List ¶
func (t *FileService) List(request *ListRequest) (*ListResponse, error)
List files by their project and optionally a path.
func (*FileService) Read ¶
func (t *FileService) Read(request *ReadRequest) (*ReadResponse, error)
Read a file by path
func (*FileService) Save ¶
func (t *FileService) Save(request *SaveRequest) (*SaveResponse, error)
Save a file
type ListRequest ¶
type ListResponse ¶
type ListResponse struct {
Files []Record `json:"files"`
}
type ReadRequest ¶
type ReadResponse ¶
type ReadResponse struct {
// Returns the file
File *Record `json:"file"`
}
type Record ¶
type Record struct {
// File contents
Content string `json:"content"`
// Time the file was created e.g 2021-05-20T13:37:21Z
Created string `json:"created"`
// Any other associated metadata as a map of key-value pairs
Metadata map[string]string `json:"metadata"`
// Path to file or folder eg. '/documents/text-files/file.txt'.
Path string `json:"path"`
// A custom project to group files
// eg. file-of-mywebsite.com
Project string `json:"project"`
// Time the file was updated e.g 2021-05-20T13:37:21Z
Updated string `json:"updated"`
}
type SaveRequest ¶
type SaveRequest struct {
File *Record `json:"file"`
}
type SaveResponse ¶
type SaveResponse struct {
}
Click to show internal directories.
Click to hide internal directories.