client

package
v2.1.9 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 6 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 {
	Endpoint   *string
	Protocol   *string
	UserAgent  *string
	Credential credential.Credential
}

func NewClient

func NewClient(config *Config) (*Client, error)

func (*Client) AppendUserAgent

func (client *Client) AppendUserAgent(userAgent *string)

func (*Client) GetAccessKeyId

func (client *Client) GetAccessKeyId() (_result *string, _err error)

func (*Client) GetAccessKeySecret

func (client *Client) GetAccessKeySecret() (_result *string, _err error)

func (*Client) GetUserAgent

func (client *Client) GetUserAgent() (_result *string)

func (*Client) Init

func (client *Client) Init(config *Config) (_err error)

func (*Client) Request

func (client *Client) Request(method *string, pathname *string, query map[string]interface{}, headers map[string]*string, body interface{}, runtime *util.RuntimeOptions) (_result *OpenSearchResult, _err error)

func (*Client) SetUserAgent

func (client *Client) SetUserAgent(userAgent *string)

type Config

type Config struct {
	Endpoint        *string `json:"endpoint,omitempty" xml:"endpoint,omitempty"`
	Protocol        *string `json:"protocol,omitempty" xml:"protocol,omitempty"`
	Type            *string `json:"type,omitempty" xml:"type,omitempty"`
	SecurityToken   *string `json:"securityToken,omitempty" xml:"securityToken,omitempty"`
	AccessKeyId     *string `json:"accessKeyId,omitempty" xml:"accessKeyId,omitempty"`
	AccessKeySecret *string `json:"accessKeySecret,omitempty" xml:"accessKeySecret,omitempty"`
	UserAgent       *string `json:"userAgent,omitempty" xml:"userAgent,omitempty"`
}

func (Config) GoString

func (s Config) GoString() string

func (*Config) SetAccessKeyId

func (s *Config) SetAccessKeyId(v string) *Config

func (*Config) SetAccessKeySecret

func (s *Config) SetAccessKeySecret(v string) *Config

func (*Config) SetEndpoint

func (s *Config) SetEndpoint(v string) *Config

func (*Config) SetProtocol

func (s *Config) SetProtocol(v string) *Config

func (*Config) SetSecurityToken

func (s *Config) SetSecurityToken(v string) *Config

func (*Config) SetType

func (s *Config) SetType(v string) *Config

func (*Config) SetUserAgent

func (s *Config) SetUserAgent(v string) *Config

func (Config) String

func (s Config) String() string

type OpenSearchResult added in v2.1.4

type OpenSearchResult struct {
	Status    string `json:"status"`
	RequestId string `json:"request_id"`
	Errors    []any  `json:"errors"`
	Result    struct {
		Items []struct {
			Fields         map[string]string `json:"fields"`
			SortExprValues []any             `json:"sortExprValues"`
		} `json:"items"`
	} `json:"result"`
}

Jump to

Keyboard shortcuts

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