diff --git a/pkg/httpserver/httpserver.go b/pkg/httpserver/httpserver.go index 5919cc5b0..15edca078 100644 --- a/pkg/httpserver/httpserver.go +++ b/pkg/httpserver/httpserver.go @@ -1,3 +1,19 @@ +/* + * Mini Object Storage, (C) 2014 Minio, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package httpserver import ( diff --git a/pkg/server/server.go b/pkg/server/server.go index dc4a0cd26..f532d3e91 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -1,3 +1,19 @@ +/* + * Mini Object Storage, (C) 2014 Minio, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package server import ( diff --git a/pkg/storage/storage.go b/pkg/storage/storage.go index 4d0e875cd..0937ddbab 100644 --- a/pkg/storage/storage.go +++ b/pkg/storage/storage.go @@ -1,3 +1,19 @@ +/* + * Mini Object Storage, (C) 2014 Minio, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package storage import ( @@ -23,26 +39,6 @@ type ObjectMetadata struct { Size int } -type GenericError struct { - bucket string - path string -} - -type ObjectNotFound GenericError - -func (self ObjectNotFound) Error() string { - return "Not Found: " + self.bucket + "#" + self.path -} - -type ObjectExists struct { - bucket string - key string -} - -func (self ObjectExists) Error() string { - return "Object exists: " + self.bucket + "#" + self.key -} - func (storage *Storage) CopyObjectToWriter(w io.Writer, bucket string, object string) (int64, error) { // TODO synchronize access // get object diff --git a/pkg/storage/storage_errors.go b/pkg/storage/storage_errors.go new file mode 100644 index 000000000..b81a299f3 --- /dev/null +++ b/pkg/storage/storage_errors.go @@ -0,0 +1,21 @@ +package storage + +type GenericError struct { + bucket string + path string +} + +type ObjectExists struct { + bucket string + key string +} + +type ObjectNotFound GenericError + +func (self ObjectNotFound) Error() string { + return "Not Found: " + self.bucket + "#" + self.path +} + +func (self ObjectExists) Error() string { + return "Object exists: " + self.bucket + "#" + self.key +} diff --git a/pkg/utils/execpipe.go b/pkg/utils/execpipe.go index 74be379f5..848abed3d 100644 --- a/pkg/utils/execpipe.go +++ b/pkg/utils/execpipe.go @@ -1,3 +1,19 @@ +/* + * Mini Object Storage, (C) 2014 Minio, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package utils import ( diff --git a/pkg/utils/execpipe_test.go b/pkg/utils/execpipe_test.go index 7d6451a2f..d7eda90eb 100644 --- a/pkg/utils/execpipe_test.go +++ b/pkg/utils/execpipe_test.go @@ -1,4 +1,18 @@ -// !build linux,amd64 +/* + * Mini Object Storage, (C) 2014 Minio, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package utils diff --git a/pkg/webapi/minioapi/definitions.go b/pkg/webapi/minioapi/definitions.go index bf8216237..cfae223dc 100644 --- a/pkg/webapi/minioapi/definitions.go +++ b/pkg/webapi/minioapi/definitions.go @@ -1,3 +1,19 @@ +/* + * Mini Object Storage, (C) 2014 Minio, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package minioapi import ( @@ -5,13 +21,13 @@ import ( ) type ListResponse struct { - XMLName xml.Name `xml:"ListBucketResult"` - Name string `xml:"Name"` - toragerefix string - Marker string - MaxKeys int - IsTruncated bool - Contents []Content `xml:"Contents",innerxml` + XMLName xml.Name `xml:"ListBucketResult"` + Name string `xml:"Name"` + storagerefix string + Marker string + MaxKeys int + IsTruncated bool + Contents []Content `xml:"Contents",innerxml` } type Content struct { diff --git a/pkg/webapi/minioapi/minioapi.go b/pkg/webapi/minioapi/minioapi.go index ef99463ec..e7b53349b 100644 --- a/pkg/webapi/minioapi/minioapi.go +++ b/pkg/webapi/minioapi/minioapi.go @@ -1,3 +1,19 @@ +/* + * Mini Object Storage, (C) 2014 Minio, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package minioapi import ( diff --git a/pkg/webapi/minioapi/minioapi_test.go b/pkg/webapi/minioapi/minioapi_test.go index 4abbd659a..7a632d69b 100644 --- a/pkg/webapi/minioapi/minioapi_test.go +++ b/pkg/webapi/minioapi/minioapi_test.go @@ -1,3 +1,19 @@ +/* + * Mini Object Storage, (C) 2014 Minio, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package minioapi import (