client

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GRPC = "GRPC"
	REST = "REST"
)

Variables

This section is empty.

Functions

func Status added in v0.1.1

func Status(err error) int

Types

type Client

func NewClient

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

func NewGRPCClient

func NewGRPCClient(c *Config) (Client, error)

NewGRPCClient creates a new gRPC client.

func NewRESTClient

func NewRESTClient(c *Config) (Client, error)

NewRESTClient creates a new REST client.

type Config added in v0.1.1

type Config struct {
	ClientType string
	URL        *url.URL
	Timeout    time.Duration
	Transport  *transport.Config
}

func (*Config) ClientTLSConfig added in v0.1.1

func (c *Config) ClientTLSConfig() (*tls.Config, error)

type Credentials added in v0.1.1

type Credentials struct {
	oauth2.TokenSource
	*transport.ImpersonationConfig
	SkipTransportSecurity bool
}

Credentials supplies PerRPCCredentials from a Token Source and Impersonation config.

func (*Credentials) GetRequestMetadata added in v0.1.1

func (c *Credentials) GetRequestMetadata(ctx context.Context, _ ...string) (map[string]string, error)

GetRequestMetadata gets the request metadata as a map from a Custom.

func (*Credentials) RequireTransportSecurity added in v0.1.1

func (c *Credentials) RequireTransportSecurity() bool

RequireTransportSecurity indicates whether the credentials requires transport security.

type RESTClient

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

func (*RESTClient) CreateRecord

func (*RESTClient) CreateResult

func (*RESTClient) DeleteLog

func (*RESTClient) DeleteRecord

DeleteRecord makes request to delete record

func (*RESTClient) DeleteResult

DeleteResult makes request to delete result

func (*RESTClient) GetLog

func (*RESTClient) GetRecord

GetRecord makes request to get record

func (*RESTClient) GetRecordListSummary added in v0.1.1

func (*RESTClient) GetResult

GetResult makes request to get result

func (*RESTClient) ListLogs

func (*RESTClient) ListRecords

ListRecords makes request to get record list

func (*RESTClient) ListResults

ListResults makes request and get result list

func (*RESTClient) UpdateLog

func (*RESTClient) UpdateRecord

func (*RESTClient) UpdateResult

Jump to

Keyboard shortcuts

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