Documentation
¶
Index ¶
- Constants
- Variables
- type CreateObjectRequest
- type DeleteObjectRequest
- type DeleteObjectsRequest
- type DeleteObjectsResponse
- type GetObjectRequest
- type Meta
- type Metadata
- type MetadataCreate
- type MetadataKV
- type MetadataKey
- type MetadataList
- type MetadataListRequest
- type MetadataMeta
- type MetadataQueryRequest
- type Object
- type ObjectAttr
- type ObjectCreate
- type ObjectKey
- type ObjectList
- type ObjectListRequest
- type ObjectMeta
- type ObjectTouch
- type ReadObjectRequest
- type Volume
- type VolumeCreate
- type VolumeList
- type VolumeListRequest
- type VolumeMeta
- type VolumeName
- type VolumeTouch
Constants ¶
View Source
const ( DefaultSchema = "filer" NotifyChannel = "filer_changes" )
View Source
const ( VolumeListLimit = 100 ObjectListLimit = 100 MetadataListLimit = 100 // MaxUploadFiles is the maximum number of files accepted in a single multipart upload request. MaxUploadFiles = 1000 )
Variables ¶
View Source
var Objects string
View Source
var Queries string
Functions ¶
This section is empty.
Types ¶
type CreateObjectRequest ¶
type CreateObjectRequest struct {
Body io.Reader `json:"-"`
IfNotExists bool // if true, fail with ErrConflict when the object already exists
ObjectMeta
}
Operations
func (CreateObjectRequest) String ¶
func (r CreateObjectRequest) String() string
type DeleteObjectRequest ¶
type DeleteObjectRequest struct {
GetObjectRequest
}
func (DeleteObjectRequest) String ¶
func (r DeleteObjectRequest) String() string
type DeleteObjectsRequest ¶
type DeleteObjectsRequest struct {
Path string `json:"path,omitempty"`
Recursive bool `json:"recursive,omitempty"` // if true, delete all objects recursively; if false, delete only immediate children
}
func (DeleteObjectsRequest) String ¶
func (r DeleteObjectsRequest) String() string
type DeleteObjectsResponse ¶
type DeleteObjectsResponse struct {
Volume string `json:"volume,omitempty"`
Body []Object `json:"body,omitempty"` // list of deleted objects
}
func (DeleteObjectsResponse) String ¶
func (r DeleteObjectsResponse) String() string
type GetObjectRequest ¶
type GetObjectRequest struct {
Path string
}
func (GetObjectRequest) String ¶
func (r GetObjectRequest) String() string
type Meta ¶ added in v0.2.0
type Meta struct {
Key string `json:"key,omitempty"`
Value json.RawMessage `json:"value,omitempty"`
}
Meta is a string key-value map for user-defined object metadata. Keys should be lowercase for S3 compatibility, as S3 normalizes all metadata keys to lowercase.
type Metadata ¶ added in v0.1.2
type Metadata struct {
Key string `json:"key,omitempty"`
IndexedAt time.Time `json:"indexed_at,omitzero"`
MetadataCreate
}
type MetadataCreate ¶ added in v0.2.0
type MetadataKV ¶ added in v0.2.0
type MetadataKV struct {
Metadata string `json:"-"`
Key string `json:"key,omitempty"`
Value json.RawMessage `json:"value,omitempty"`
}
func AppendMetadataKV ¶ added in v0.2.0
func AppendMetadataKV(metadata []MetadataKV, key string, value any) []MetadataKV
func (MetadataKV) Insert ¶ added in v0.2.0
func (m MetadataKV) Insert(bind *pg.Bind) (string, error)
func (MetadataKV) String ¶ added in v0.2.0
func (m MetadataKV) String() string
type MetadataKey ¶ added in v0.2.0
type MetadataKey string
type MetadataList ¶ added in v0.2.0
type MetadataList struct {
MetadataListRequest
Count uint64 `json:"count"`
Body []*Metadata `json:"body"`
}
func (MetadataList) String ¶ added in v0.2.0
func (r MetadataList) String() string
type MetadataListRequest ¶ added in v0.2.0
type MetadataListRequest struct {
Title *string `json:"title,omitempty" help:"filter by title"`
Type *string `json:"type,omitempty" help:"media type filter"`
pg.OffsetLimit
}
func (MetadataListRequest) String ¶ added in v0.2.0
func (r MetadataListRequest) String() string
type MetadataMeta ¶ added in v0.1.2
type MetadataMeta struct {
Title string `json:"title,omitempty"`
Type string `json:"media_type,omitempty"`
Summary *string `json:"summary,omitempty"`
Tags []string `json:"tags,omitempty"`
Metadata []MetadataKV `json:"metadata,omitempty"`
}
func (MetadataMeta) MetaMap ¶ added in v0.2.0
func (r MetadataMeta) MetaMap() map[string]any
func (MetadataMeta) String ¶ added in v0.1.2
func (m MetadataMeta) String() string
type MetadataQueryRequest ¶ added in v0.2.0
type MetadataQueryRequest struct {
Query string `json:"query,omitempty" arg:"" required:"" help:"full text search query"`
Type *string `json:"type,omitempty" help:"media type filter"`
pg.OffsetLimit
}
func (MetadataQueryRequest) String ¶ added in v0.2.0
func (r MetadataQueryRequest) String() string
type Object ¶
type Object struct {
ObjectKey
ObjectMeta
ObjectAttr
}
Object represents a single stored item returned by the API.
type ObjectAttr ¶ added in v0.2.0
type ObjectAttr struct {
Size int64 `json:"size"`
ETag *string `json:"etag,omitempty"`
ModTime time.Time `json:"last-modified,omitzero"`
IsDir bool `json:"dir,omitempty"`
}
ObjectAttr represents the attributes of an object, which are immutable and cannot be updated.
type ObjectCreate ¶ added in v0.2.0
type ObjectCreate struct {
ObjectKey
ObjectMeta
ObjectAttr
}
ObjectCreate represents the result of creating an object in the database as part of indexing
type ObjectKey ¶ added in v0.1.2
type ObjectKey struct {
Volume string `json:"volume,omitempty"`
Path string `json:"path,omitempty"`
}
ObjectKey represents the unique identifier of an object, which consists of a volume and a path.
type ObjectList ¶ added in v0.2.0
type ObjectList struct {
ObjectListRequest
Count int `json:"count"` // total number of matching objects, before offset/limit
Body []*Object `json:"body,omitempty"` // page of objects; nil when Limit==0 (count-only)
}
func (ObjectList) String ¶ added in v0.2.0
func (r ObjectList) String() string
type ObjectListRequest ¶ added in v0.2.0
type ObjectListRequest struct {
pg.OffsetLimit
Volume *string `json:"volume,omitempty"` // optional volume name to filter by
Path *string `json:"path,omitempty"` // optional path prefix within the backend
Recursive bool `json:"recursive,omitempty"` // if true, list all objects recursively; if false, list only immediate children
Type *string `json:"type,omitempty"` // optional content type to filter by
}
func (ObjectListRequest) Query ¶ added in v0.2.0
func (r ObjectListRequest) Query() url.Values
func (ObjectListRequest) String ¶ added in v0.2.0
func (r ObjectListRequest) String() string
type ObjectMeta ¶
type ObjectMeta struct {
ContentType string `json:"type,omitempty"`
Meta []Meta `json:"meta,omitempty"`
}
ObjectMeta represents the metadata of an object, which can be updated.
type ObjectTouch ¶ added in v0.2.0
type ObjectTouch ObjectKey
type ReadObjectRequest ¶
type ReadObjectRequest struct {
GetObjectRequest
}
type Volume ¶ added in v0.2.0
type VolumeCreate ¶ added in v0.2.0
type VolumeCreate struct {
URL string `json:"url,omitempty" arg:"" help:"URL of the volume to create"`
VolumeMeta
}
type VolumeList ¶ added in v0.2.0
type VolumeList struct {
VolumeListRequest
Count uint64 `json:"count,omitempty"`
Body []*Volume `json:"body,omitempty"`
}
func (VolumeList) String ¶ added in v0.2.0
func (v VolumeList) String() string
type VolumeListRequest ¶ added in v0.2.0
type VolumeListRequest struct {
Enabled *bool `json:"enabled,omitempty" help:"returns only enabled or disabled volumes"`
Stale bool `json:"stale,omitzero" help:"returns volumes that need to be re-indexed"`
pg.OffsetLimit
}
func (VolumeListRequest) String ¶ added in v0.2.0
func (v VolumeListRequest) String() string
type VolumeMeta ¶ added in v0.2.0
type VolumeMeta struct {
Enabled *bool `json:"enabled,omitempty" negatable:""`
IndexDelta *time.Duration `json:"delta,omitempty"` // if non-zero, forces a full re-index if the last index is older than this duration
}
func (VolumeMeta) Insert ¶ added in v0.2.0
func (v VolumeMeta) Insert(bind *pg.Bind) (string, error)
func (VolumeMeta) String ¶ added in v0.2.0
func (v VolumeMeta) String() string
type VolumeName ¶ added in v0.2.0
type VolumeName string
Click to show internal directories.
Click to hide internal directories.