Documentation ¶
Overview ¶
Package camtypes is like the types package, but higher-level and contains Camlistore-specific types. It exists mostly to break circular dependencies between index, search, and schema.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrClientNoServer = addCamError("client-no-server", funcStr(func() string { return fmt.Sprintf("No valid server defined. It can be set with the CAMLI_SERVER environment variable, or the --server flag, or in the \"servers\" section of %q (see https://camlistore.org/docs/client-config).", osutil.UserClientConfigPath()) })) ErrClientNoPublicKey = addCamError("client-no-public-key", str("No public key configured: see 'camput init'.")) )
Functions ¶
Types ¶
type BlobMeta ¶
type BlobMeta struct { Ref blob.Ref Size uint32 // CamliType is non-empty if this blob is a Camlistore JSON // schema blob. If so, this is its "camliType" attribute. CamliType string }
BlobMeta is the metadata kept for each known blob in the in-memory search index. It's kept as small as possible to save memory.
type Claim ¶
type ClaimPtrsByDate ¶
type ClaimPtrsByDate []*Claim
func (ClaimPtrsByDate) Len ¶
func (cl ClaimPtrsByDate) Len() int
func (ClaimPtrsByDate) Less ¶
func (cl ClaimPtrsByDate) Less(i, j int) bool
func (ClaimPtrsByDate) Swap ¶
func (cl ClaimPtrsByDate) Swap(i, j int)
type ClaimsByDate ¶
type ClaimsByDate []Claim
func (ClaimsByDate) Len ¶
func (cl ClaimsByDate) Len() int
func (ClaimsByDate) Less ¶
func (cl ClaimsByDate) Less(i, j int) bool
func (ClaimsByDate) String ¶
func (cl ClaimsByDate) String() string
func (ClaimsByDate) Swap ¶
func (cl ClaimsByDate) Swap(i, j int)
type Edge ¶
type EdgesToOpts ¶
type EdgesToOpts struct {
Max int
}
type FileInfo ¶
type FileInfo struct { // FileName is the base name of the file or directory. FileName string `json:"fileName"` // Size is the size of file. It is not set for directories. Size int64 `json:"size"` // MIMEType may be set for files, but never for directories. MIMEType string `json:"mimeType,omitempty"` // Time is the earliest of any modtime, creation time, or EXIF // original/modification times found. It may be omitted (zero) // if unknown. Time *types.Time3339 `json:"time,omitempty"` // ModTime is the latest of any modtime, creation time, or EXIF // original/modification times found. If ModTime doesn't differ // from Time, ModTime is omitted (zero). ModTime *types.Time3339 `json:"modTime,omitempty"` // WholeRef is the digest of the entire file contents. // This will be zero for non-regular files, and may also be zero // for files above a certain size threshold. WholeRef blob.Ref `json:"wholeRef,omitempty"` }
FileInfo describes a file or directory.
type ImageInfo ¶
type ImageInfo struct { // Width is the visible width of the image (after any necessary EXIF rotation). Width uint16 `json:"width"` // Height is the visible height of the image (after any necessary EXIF rotation). Height uint16 `json:"height"` }
ImageInfo describes an image file.
The Width and Height are uint16s to save memory in index/corpus.go, and that's the max size of a JPEG anyway. If we want to deal with larger sizes, we can use MaxUint16 as a sentinel to mean to look elsewhere. Or ditch this optimization.
type PermanodeByAttrRequest ¶
type PermanodeByAttrRequest struct { Signer blob.Ref // Attribute to search. currently supported: "tag", "title" // If FuzzyMatch is set, this can be blank to search all // attributes. Attribute string // The attribute value to find exactly (or roughly, if // FuzzyMatch is set) // If blank, the permanodes with Attribute as an attribute // (set to any value) are searched. Query string FuzzyMatch bool // by default, an exact match is required MaxResults int // optional max results }
type RecentPermanode ¶
type RecentPermanode struct { Permanode blob.Ref Signer blob.Ref // may be zero (!Valid()) LastModTime time.Time }
func (RecentPermanode) Equal ¶
func (a RecentPermanode) Equal(b RecentPermanode) bool
type StatusError ¶
Click to show internal directories.
Click to hide internal directories.