cloudsearch

package
v0.0.0-...-1a19813 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2015 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Verification_Error_EndpointEmpty = errors.New("Endpoint can not be empty!")
	NoPermission_For_Endpoint        = errors.New("403 Invalid permissions to hit endpoint.")
)

Functions

This section is empty.

Types

type BatchDocumentMessage

type BatchDocumentMessage struct {
	Message string `json:"message"`
}

type BatchDocumentRequest

type BatchDocumentRequest struct {
	Items []DocumentInfo
	// if you full endpoint is blah.us-west-2.cloudsearch.amazonaws.com
	// then set this to 'blah'
	Endpoint string `json:"-"`
	Region   string
}

func NewBatchDocumentRequest

func NewBatchDocumentRequest() *BatchDocumentRequest

Creates a new BatchDocumentRequest, populating in some defaults

func (BatchDocumentRequest) DeMarshalResponse

func (gir BatchDocumentRequest) DeMarshalResponse(response []byte, headers http.Header, statusCode int) (*BatchDocumentResponse, error)

func (BatchDocumentRequest) Request

type BatchDocumentResponse

type BatchDocumentResponse struct {
	Status     string                 `json:"status"`
	Adds       int                    `json:"adds"`
	Deletes    int                    `json:"deletes"`
	Errors     []BatchDocumentMessage `json:"errors"`
	Warnings   []BatchDocumentMessage `json:"warnings"`
	StatusCode int
}

type BatchResponseError

type BatchResponseError struct {
	Response   string
	JsonError  error
	StatusCode int
}

func (BatchResponseError) Error

func (b BatchResponseError) Error() string

type DocumentInfo

type DocumentInfo struct {
	// 'add' or 'delete'
	Type   string      `json:"type"`
	Id     string      `json:"id"`
	Fields interface{} `json:"fields,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL