Commit Graph

64 Commits

Author SHA1 Message Date
Brad Fitzpatrick 17ab1c238f Change strutil.StringFromBytes to depend on Go 1.3.
Change-Id: I83fd1369a199dba7ef41227df4d0b95d9a16aabb
2014-08-14 12:59:54 -07:00
Brad Fitzpatrick da3ce4a13b schema: use existing constant instead of literal
Change-Id: Ia988f4c897788be696326de9a75973161ae3d550
2014-08-07 11:04:09 -07:00
mpl 7e86255cac importer/flickr: set DateCreated attribute
Also cleaned up a few vars.
Moved some attributes to nodeattr pkg.

Change-Id: Iea496d50b12e67132fe88f371a89534c2fe32761
2014-07-25 00:57:10 +02:00
Brad Fitzpatrick ab885a369c schema: add UnknownLocation and IsZoneKnown
Change-Id: Ia056d03a367502ea4d06e5748cc7de7072c3e12c
2014-07-24 13:35:18 -07:00
Brad Fitzpatrick 077763fcbb schema: use GPS location to find timezone from EXIF when UTC offset is unknown
Change-Id: Ia3590424db36508b491d8f19829738fe102e5c3d
2014-07-13 10:26:54 -07:00
Brian Gitonga Marete 53ab352fa7 pkg/schema, cmd/camget, cmd/camput: Support sockets.
This patch:

1. Introduces a JSON schema for unix domain sockets (socket files).
2. Adds support for the new schema to pkg/schema.
3. Adds support for uploading and restoring sockets to camput and
camget respectively.

Depends on CL 2706 (https://camlistore-review.googlesource.com/2706/)

Change-Id: Ib0d6e9f9ebd348f55efee5a08cd774f3969d0760
2014-05-21 18:51:14 +03:00
Brian Gitonga Marete e9dd1af195 cmd/camget, cmd/camput, pkg/schema: Support FIFOs.
This patch:

1. Introduces a JSON schema for FIFOs (named pipes).
2. Adds support for uploading and restoring FIFOs to camput and camget
respectively.

It includes tests for the basic schema support in pkg/schema and
integration tests for camput and camget.

This CL does not add FIFO support to the HTTP server and fs (cammount
support) code. Those will be addressed in a subsequent patch.

Change-Id: Iab926073c36e653d25e693a559178bea9bf19b9a
2014-05-21 14:52:23 +03:00
Brad Fitzpatrick bf9909028f schema: improved mixedArrayFromString
Change-Id: Iff9d68a498e13e5a90cd68c07ee9986c3407a8cc
2014-05-14 16:07:22 -07:00
Edward Sheffler III 04a38a2515 schema: unexport NewClaim
Change-Id: If088d7b8dd521f89093376282b84a64c59c7b778
2014-04-18 13:25:01 -07:00
Brian Gitonga Marete 88b94b686d pkg/schema: Move two non-utf8-handling utility funcs to schema.go.
As per review comments.

Change-Id: I0240f697d0cb180a9fb2e9b1ddda7ac18869b4ad
2014-03-15 07:39:08 +03:00
Brad Fitzpatrick bf94a73859 Get rid of SeekFetcher vs StreamingFetcher distinction and complexity.
StreamingFetcher is now just Fetcher, and its FetchStreaming is now
just Fetch.

SeekFetcher is gone. Blobs are max 16 MB anyway, so we can slurp to
memory when needed. The main thing that cared about SeekFetcher
was the GET handler, ServeBlobref, because http.ServeContent needed
one for range requests. That's rewritten in an earlier commit, using
the FakeSeeker from another earlier commit.

Lot of code got simpler as a result.

Change-Id: Ib819413e48a8f9b8d97f596d0fbf771dab211f11
2014-03-14 12:29:13 -07:00
Brian Gitonga Marete 68074bbadd pkg/schema: Fix camput panic on non-utf8 filenames or symlink targets.
Also implement the relevant integration tests for camput and camget.

Depends on CL 2216.

Change-Id: I3f541efd4e583674e9817473292fa3de8a3cdabc
2014-03-10 21:01:51 -07:00
Brad Fitzpatrick c6b78818b8 schema: better test for issue 305
Change-Id: I791d2cd614f8cdc5921a05a0c91589f8965ed06f
2013-12-30 20:17:30 -08:00
mpl 2c2ce61ffa schema: missing claimType conversion
Change-Id: I92edb2b3148df8b79c6c39ea88a8c7d04cf3f789
2013-11-04 22:57:05 +01:00
mpl d4b5e413a2 schema: add delete claim
Also rename other claim types for consistent style.

http://camlistore.org/issue/191

Change-Id: I1dc1283bd961481ad793b92262cf5ce641d9fdc8
2013-11-03 00:37:49 +01:00
mpl 304f5c4b38 camput attr: support -del
Change-Id: I28460fed5b572ba9a83cfcb04f38e42124fa723f
2013-10-03 15:07:43 +02:00
mpl d488c576fc search: support for static directory children
This change introduces a new index entry
to help with finding the children of a static directory.
It also fixes ResolvePrefixHop so that it takes
into account static directories, and not only collections.

This is the first step to support publishing static directories.

http://camlistore.org/issue/179

Change-Id: I5666e5caa6c782004054ae4c19a6b6119d4fda8b
2013-09-10 23:06:48 +02:00
Brad Fitzpatrick 2cf4d68267 Let shares have expiration times.
Change-Id: Iecae106302ba43c354b6987163830cf78a70d12c
2013-09-08 17:46:40 -07:00
Brad Fitzpatrick 0bdf20884b all: delete pkg/blobref; convert all from *blobref.BlobRef to new blob.Ref
Change-Id: Id2dfb7f19452bedf4f3c9310b36227fd8117b225
2013-08-03 19:54:30 -07:00
mpl febbaf1387 schema: share is a claim with claimType="share"
http://camlistore.org/issue/150

Change-Id: I1dcd1709c886839df507b02beee2e19986783693
2013-06-22 00:48:51 +02:00
mpl 0830902ffb schema: add Share type
This changes allows to get rid of the use of map[string]interface{} in
pkg/server/share.go

Change-Id: Ifeae6b194ff4db679be63d0087cb6d1c5df2f3ca
2013-03-11 21:53:56 +01:00
mpl e6f4a75e87 schema: bugfix, store permanode ref as string in claim
Change-Id: I8ed216f268cc458ea2c79943f956034cea60e38d
2013-02-26 23:48:24 +01:00
mpl a55595ba8e schema: populate claim with permanode too
Change-Id: Ide340baa9ffa6a9cfd2994c2e4fc41383af01a03
2013-02-26 19:21:19 +01:00
Brad Fitzpatrick 3602a03188 schema: add support for multi-claims.
No indexing support yet.

Part of http://camlistore.org/issue/110

Change-Id: Ibeb04ef24e24857a462eeefc7857fda4bbb5dbed
2013-02-25 20:56:20 -08:00
Brad Fitzpatrick fa690ad3d7 schema: support bytes.Reader and strings.Reader in FileTime
Change-Id: Ib42a0478782f7e421e3f3125b1fc876d27d6ee68
2013-02-18 21:29:19 -08:00
Brad Fitzpatrick 9efdf83d3e schema: use better types in superset: blobref and Time3339
Change-Id: I7004220789e1048c1ebcc8703bf2948a733bae10
2013-02-10 12:58:51 -08:00
Brad Fitzpatrick 070592444a schema: unexport Superset
Change-Id: If45569b1b6d72b1cb6450b9d634f59e88fae4851
2013-01-22 10:32:15 -08:00
Brad Fitzpatrick af2b2987c5 pkg/fs: stop using Superset
Change-Id: I890b2376124de129f8035af5b9424f3ba3861895
2013-01-22 10:20:34 -08:00
Brad Fitzpatrick cfc32e4a05 schema, camget: more work on deleting the Superset type.
not much more remains.

Change-Id: I6cfe4145f67b100a0e2509f88ce6e1c580b7f9fe
2013-01-22 09:32:40 -08:00
Brad Fitzpatrick 1bf01d7315 schema: lot of Blob/Builder work, and kill schema.Map.
Next up: unexport schema.Superset.

Change-Id: Ia4bb34790abba75bdb4d4101df7a4f15875f4237
2013-01-21 20:56:12 -08:00
Brad Fitzpatrick 02e3c08947 schema: start of eliminating/unexporting schema.Superset and schema.Map
For now, unfortunately, there are even more types. The old ones will hopefully die soon.

Change-Id: I9d0bb1743c94a0de429175ef0b05ad6a964e07c0
2013-01-21 17:31:08 -08:00
Brad Fitzpatrick 7ceaaa0012 blobref: simplify the FromHash func. Make type implicit.
Change-Id: I2e01c3663bdb1151c11dfc9a1d59c7081940ffac
2013-01-20 13:36:27 -08:00
Brad Fitzpatrick dd72cd4434 schema: verify no slashes in fileName in FileNameString accessor.
Change-Id: I1b02e67144fed1f80123530786af55c74bd64f36
2013-01-13 20:43:55 -08:00
mpl 77d044f4b7 schema: add FileTime to guess the file
creation time from potential file metadata.
camput: add the -exiftime option that allows
the use of the above for -filenodes and -vivify.

Fixes: http://code.google.com/p/camlistore/issues/detail?id=77

Change-Id: I05d1af3d875bb984e47e06775fd149e5ed0ed7b1
2013-01-10 17:43:05 +01:00
Brad Fitzpatrick 971abb5566 schema: tighten the definition of schema.File
Change-Id: I14212e55fec217953c6a0979f910e5fa93ee6825
2013-01-04 16:26:14 -08:00
Brad Fitzpatrick 2fca641619 schema: minor cleanups
Change-Id: I7565ccc925e6ae816799242310e26d604a4c42ae
2013-01-03 17:14:23 -08:00
Brad Fitzpatrick 8e44c62047 camget: finish --shared fetching support
Change-Id: I32edf63e01068a0e96f3255ba4d1313682cf03c4
2013-01-02 14:50:52 -08:00
Brad Fitzpatrick 827feaa3ac camget, client, schema: start of camget --shared support. see flag docs.
Change-Id: I5dd43129cb0032821a5913a8f20da0ddb38c63da
2013-01-02 12:55:12 -08:00
mpl ed20da7592 vivify: support in camput and upload handler.
no special credentials/auth yet.
pkg/blobserver/handlers/get.go moved to
pkg/blobserver/gethandler/get.go to avoid
a dependency loop with the json sign helper.
pkg/server/sig.go was moved to pkg/jsonsign/signhandler
because it seemed inapproriate to import in
pkg/blobserver/handlers/upload.go something from
pkg/server

Change-Id: Ifeb14512e182e8a101d4fced6d6d4184e2b9cb99
2012-12-30 23:39:22 +01:00
Brad Fitzpatrick 08f09ebf2b schema: fix FileReader bugs, simplify, add exhaustive tests
Change-Id: I5d098d7b12892d278190391dd5abd7272ed997c2
2012-12-25 17:27:52 -08:00
Brad Fitzpatrick 0b022b433a camput, schema, client: query server for dups before uploading, like the JavaScript UI.
Change-Id: Id12f78cf2a095adcfad90ca4c6416bb80b6e9b14
2012-12-22 22:48:21 -08:00
Brad Fitzpatrick 044194b746 schema: document PopulateParts, add a missing error check
Change-Id: Ic9d65fe3e56c4233f481254c6f730a8b382fb4ba
2012-10-29 00:10:31 +01:00
mpl 83ce85b59f old TODOs
Change-Id: Ifa8877f594e65e081536b97f536106301f5c9836
2012-10-19 23:37:14 +02:00
Brad Fitzpatrick e557066f1d schema: more cleanup, making FileReader a ReaderAt.
testing TODOs and further cleanup TODOs remain.

Change-Id: I997153c66805cfe3220d3d735322be14b68b75dc
2012-08-23 20:09:31 -07:00
Brad Fitzpatrick faf3c90d6f schema: more docs and some FileReader work
Change-Id: Id9e754e3b6358a651a826a4cdeb00efb330e3c3a
2012-08-23 18:44:03 -07:00
Brad Fitzpatrick 228c0ca56f schema: change PopulateSymlinkMap to be Map.SetSymlinkTarget
Change-Id: I072ce65331048b54c90c32e951f5034060c1764c
2012-08-22 04:38:25 +10:00
Brad Fitzpatrick a8629ec5dd schema: unexport NewBytes
Change-Id: Ia6ec7c9aec33319bf277b93a189b4fa43d0540b9
2012-08-22 04:33:06 +10:00
Brad Fitzpatrick 439db110ec schema: more cleanup; ditch the Claimer type
Change-Id: I2a52564c1a99c96a2cd8bc84a791784f0a4e4b2e
2012-08-22 04:31:48 +10:00
Brad Fitzpatrick b67d753364 schema: docs and cleanup
Change-Id: Ib720b7f711d71bdeaaf33374f376f14b30a5a97c
2012-08-22 04:14:47 +10:00
Brad Fitzpatrick 11eac8721e Convert more code to use schema.Map instead of map[string]interface{}
Change-Id: I285fd1b0e730ebd32069688a71cb992c43770ade
2012-08-22 03:47:38 +10:00