http

package
v1.0.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	ConnectionInfo *ConnectionInfo
}

Client implements Ignite HTTP REST API

func (*Client) QryCls

func (c *Client) QryCls(queryID string) (bool, string, error)

QryCls closes query resources See https://apacheignite.readme.io/docs/rest-api#section-sql-query-close for more details

func (*Client) QryFetch

func (c *Client) QryFetch(queryID string) (*Response, string, error)

QryFetch gets next page for the query See https://apacheignite.readme.io/docs/rest-api#section-sql-query-fetch for more details

func (*Client) QryFldExe

func (c *Client) QryFldExe(query string, v url.Values) (*Response, string, error)

QryFldExe runs sql fields query over cache. See https://apacheignite.readme.io/docs/rest-api#section-sql-fields-query-execute for more details

func (*Client) Version

func (c *Client) Version() (Version, string, error)

Version command shows current Ignite version. See https://apacheignite.readme.io/docs/rest-api#section-version for more details

type ConnectionInfo

type ConnectionInfo struct {
	Servers  []string `json:"servers"`
	Username string   `json:"username"`
	Password string   `json:"password"`
	Cache    string   `json:"cache"`
	PageSize int64    `json:"pageSize"`
}

ConnectionInfo contains Ignite cluster connection information user should provide when open connection

type FieldMetadata

type FieldMetadata struct {
	SchemaName    string `json:"schemaName"`
	TypeName      string `json:"typeName"`
	FieldName     string `json:"fieldName"`
	FieldTypeName string `json:"fieldTypeName"`
}

FieldMetadata is column list See https://apacheignite.readme.io/docs/rest-api#section-sql-fields-query-execute for more details See https://apacheignite.readme.io/docs/rest-api#section-sql-query-fetch for more details

type Response

type Response struct {
	Items          [][]interface{} `json:"items"`
	Last           bool            `json:"last"`
	QueryID        int64           `json:"queryId"`
	FieldsMetadata []FieldMetadata `json:"fieldsMetadata"`
}

Response is body of response for `qryfldexe`, `qryfetch` commands See https://apacheignite.readme.io/docs/rest-api#section-sql-fields-query-execute for more details See https://apacheignite.readme.io/docs/rest-api#section-sql-query-fetch for more details

type Version

type Version string

Version is alias for `string`

type WrapperResponse

type WrapperResponse struct {
	SuccessStatus int      `json:"successStatus"`
	Error         string   `json:"error"`
	Response      Response `json:"response"`
	SessionToken  string   `json:"sessionToken"`
}

WrapperResponse is response for `qryfldexe`, `qryfetch` commands See https://apacheignite.readme.io/docs/rest-api#section-sql-fields-query-execute for more details See https://apacheignite.readme.io/docs/rest-api#section-sql-query-fetch for more details

type WrapperResponseBinary

type WrapperResponseBinary struct {
	SuccessStatus int    `json:"successStatus"`
	Error         string `json:"error"`
	Response      bool   `json:"response"`
	SessionToken  string `json:"sessionToken"`
}

WrapperResponseBinary is response for `qrycls` commands See https://apacheignite.readme.io/docs/rest-api#section-sql-query-close for more details

type WrapperResponseVersion

type WrapperResponseVersion struct {
	SuccessStatus int     `json:"successStatus"`
	Error         string  `json:"error"`
	Version       Version `json:"response"`
	SessionToken  string  `json:"sessionToken"`
}

WrapperResponseVersion is response for `version` command See https://apacheignite.readme.io/docs/rest-api#section-version for more details

Jump to

Keyboard shortcuts

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