Skip to content

Commit

Permalink
documentation update so godoc doesn't replicate license information. …
Browse files Browse the repository at this point in the history
…Also improved comments to conform to godoc. Part 2
  • Loading branch information
mattbaird committed Sep 26, 2013
1 parent f9816ba commit c43a6a5
Show file tree
Hide file tree
Showing 62 changed files with 218 additions and 298 deletions.
8 changes: 3 additions & 5 deletions api/baseRequest.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
// Copyright 2012 Matthew Baird
//
// Copyright 2013 Matthew Baird
// 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 api

import (
Expand Down Expand Up @@ -67,7 +65,7 @@ func DoCommand(method string, url string, data interface{}) ([]byte, error) {
return body, nil
}

// The API also allows to check for the existance of a document using HEAD
// Exists allows the caller to check for the existance of a document using HEAD
// This appears to be broken in the current version of elasticsearch 0.19.10, currently
// returning nothing
func Exists(pretty bool, index string, _type string, id string) (BaseResponse, error) {
Expand Down
8 changes: 3 additions & 5 deletions api/baseResponse.go
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
// Copyright 2012 Matthew Baird
//
// Copyright 2013 Matthew Baird
// 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 api

import (
"fmt"
)
)

type BaseResponse struct {
Ok bool `json:"ok"`
Expand Down
6 changes: 2 additions & 4 deletions api/request.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
// Copyright 2012 Matthew Baird
//
// Copyright 2013 Matthew Baird
// 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 api

import (
Expand Down
6 changes: 2 additions & 4 deletions api/searchdsl.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
// Copyright 2012 Matthew Baird
//
// Copyright 2013 Matthew Baird
// 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 api

type SearchRequest struct {
Expand Down
6 changes: 2 additions & 4 deletions api/shared.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
// Copyright 2012 Matthew Baird
//
// Copyright 2013 Matthew Baird
// 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 api

type Query struct {
Expand Down
8 changes: 3 additions & 5 deletions cluster/clusterReroute.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
// Copyright 2012 Matthew Baird
//
// Copyright 2013 Matthew Baird
// 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 cluster

import (
Expand All @@ -23,7 +21,7 @@ import (
// The cluster health API allows to get a very simple status on the health of the cluster.
// see http://www.elasticsearch.org/guide/reference/api/admin-cluster-health.html
// TODO: implement wait_for_status, timeout, wait_for_relocating_shards, wait_for_nodes
// TODO: implement level (Can be one of cluster, indices or shards. Controls the details level of the health
// TODO: implement level (Can be one of cluster, indices or shards. Controls the details level of the health
// information returned. Defaults to cluster.)
func Reroute(pretty bool, dryRun bool, commands Commands) (ClusterHealthResponse, error) {
var url string
Expand Down
8 changes: 3 additions & 5 deletions cluster/health.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
// Copyright 2012 Matthew Baird
//
// Copyright 2013 Matthew Baird
// 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 cluster

import (
Expand All @@ -23,7 +21,7 @@ import (
// The cluster health API allows to get a very simple status on the health of the cluster.
// see http://www.elasticsearch.org/guide/reference/api/admin-cluster-health.html
// TODO: implement wait_for_status, timeout, wait_for_relocating_shards, wait_for_nodes
// TODO: implement level (Can be one of cluster, indices or shards. Controls the details level of the health
// TODO: implement level (Can be one of cluster, indices or shards. Controls the details level of the health
// information returned. Defaults to cluster.)
func Health(pretty bool, indices ...string) (ClusterHealthResponse, error) {
var url string
Expand Down
6 changes: 2 additions & 4 deletions cluster/nodesHotThreads.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
// Copyright 2012 Matthew Baird
//
// Copyright 2013 Matthew Baird
// 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 cluster
6 changes: 2 additions & 4 deletions cluster/nodesInfo.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
// Copyright 2012 Matthew Baird
//
// Copyright 2013 Matthew Baird
// 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 cluster

6 changes: 2 additions & 4 deletions cluster/nodesShutdown.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
// Copyright 2012 Matthew Baird
//
// Copyright 2013 Matthew Baird
// 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 cluster
6 changes: 2 additions & 4 deletions cluster/state.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
// Copyright 2012 Matthew Baird
//
// Copyright 2013 Matthew Baird
// 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 cluster

import (
Expand Down
6 changes: 2 additions & 4 deletions cluster/updateSettings.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
// Copyright 2012 Matthew Baird
//
// Copyright 2013 Matthew Baird
// 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 cluster
2 changes: 1 addition & 1 deletion cookbooks/elasticsearch
6 changes: 2 additions & 4 deletions core/bulk.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
// Copyright 2012 Matthew Baird
//
// Copyright 2013 Matthew Baird
// 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 core

import (
Expand Down
6 changes: 2 additions & 4 deletions core/bulkUDP.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
// Copyright 2012 Matthew Baird
//
// Copyright 2013 Matthew Baird
// 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 core
6 changes: 2 additions & 4 deletions core/bulk_test.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
// Copyright 2012 Matthew Baird
//
// Copyright 2013 Matthew Baird
// 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 core

import (
Expand Down
16 changes: 7 additions & 9 deletions core/count.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
// Copyright 2012 Matthew Baird
//
// Copyright 2013 Matthew Baird
// 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 core

import (
Expand All @@ -24,12 +22,12 @@ type CountResponse struct {
Shard api.Status `json:"_shards"`
}

// The count API allows to easily execute a query and get the number of matches for that query.
// It can be executed across one or more indices and across one or more types.
// The query can either be provided using a simple query string as a parameter,
//or using the Query DSL defined within the request body.
// Count allows the caller to easily execute a query and get the number of matches for that query.
// It can be executed across one or more indices and across one or more types.
// The query can either be provided using a simple query string as a parameter,
// or using the Query DSL defined within the request body.
// http://www.elasticsearch.org/guide/reference/api/count.html
// TODO: take parameters.
// TODO: take parameters.
// currently not working against 0.19.10
func Count(pretty bool, index string, _type string) (CountResponse, error) {
var url string
Expand Down
10 changes: 4 additions & 6 deletions core/deleteByQuery.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
// Copyright 2012 Matthew Baird
//
// Copyright 2013 Matthew Baird
// 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 core

import (
Expand All @@ -20,8 +18,8 @@ import (
"strings"
)

// The delete by query API allows to delete documents from one or more indices and one or more types based on a query.
// The query can either be provided using a simple query string as a parameter, or using the Query DSL defined within
// DeleteByQuery allows the caller to delete documents from one or more indices and one or more types based on a query.
// The query can either be provided using a simple query string as a parameter, or using the Query DSL defined within
// the request body.
// see: http://www.elasticsearch.org/guide/reference/api/delete-by-query.html
func DeleteByQuery(pretty bool, indices []string, types []string, query interface{}) (api.BaseResponse, error) {
Expand Down
Loading

0 comments on commit c43a6a5

Please sign in to comment.