client

package
v0.0.0-...-d04bc5a Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package client is a generated GoMock package.

Index

Constants

View Source
const (
	SubmitPath       = `/public/submit_query`
	SubmitAndGetPath = `/public/submit_and_get`
	FetchPath        = `/public/fetch_result`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(host string, c httpClientI, maxFetchNum int, fetchInterval time.Duration) *Client

func NewDefaultClient

func NewDefaultClient(host string, c httpClientI) *Client

func (*Client) Fetch

func (c *Client) Fetch(user *scql.SCDBCredential, sessionId string) (*scql.SCDBQueryResultResponse, error)

func (*Client) FetchOnce

func (c *Client) FetchOnce(user *scql.SCDBCredential, sessionId string) (*scql.SCDBQueryResultResponse, error)

func (*Client) SetCallbackURL

func (c *Client) SetCallbackURL(callbackURL string)

func (*Client) SetDBName

func (c *Client) SetDBName(dbName string)

func (*Client) Submit

func (c *Client) Submit(user *scql.SCDBCredential, sql string) (*scql.SCDBSubmitResponse, error)

func (*Client) SubmitAndGet

func (c *Client) SubmitAndGet(user *scql.SCDBCredential, sql string) (*scql.SCDBQueryResultResponse, error)

type MockhttpClientI

type MockhttpClientI struct {
	// contains filtered or unexported fields
}

MockhttpClientI is a mock of httpClientI interface.

func NewMockhttpClientI

func NewMockhttpClientI(ctrl *gomock.Controller) *MockhttpClientI

NewMockhttpClientI creates a new mock instance.

func (*MockhttpClientI) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockhttpClientI) Post

func (m *MockhttpClientI) Post(url, contentType string, body io.Reader) (*http.Response, error)

Post mocks base method.

type MockhttpClientIMockRecorder

type MockhttpClientIMockRecorder struct {
	// contains filtered or unexported fields
}

MockhttpClientIMockRecorder is the mock recorder for MockhttpClientI.

func (*MockhttpClientIMockRecorder) Post

func (mr *MockhttpClientIMockRecorder) Post(url, contentType, body any) *gomock.Call

Post indicates an expected call of Post.

Jump to

Keyboard shortcuts

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