client

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: Apache-2.0 Imports: 2 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 {
	// contains filtered or unexported fields
}

Client wraps serverscom API client

func NewClient

func NewClient(token string, endpoint string) *Client

func NewWithClient

func NewWithClient(client *serverscom.Client) *Client

func (*Client) GetScClient

func (c *Client) GetScClient() *serverscom.Client

func (*Client) SetUserAgent

func (c *Client) SetUserAgent(agent string) *Client

SetUserAgent sets new user agent for client

func (*Client) SetVerbose

func (c *Client) SetVerbose(verbose bool) *Client

SetVerbose reads verbose from config or cmd flag a

func (*Client) VerifyCredentials

func (c *Client) VerifyCredentials(ctx context.Context) error

VerifyCredentials checks that token is valid by executing /hosts

type ClientFactory

type ClientFactory interface {
	NewClient(token, endpoint string) *Client
}

type DefaultClientFactory

type DefaultClientFactory struct{}

func (*DefaultClientFactory) NewClient

func (f *DefaultClientFactory) NewClient(token, endpoint string) *Client

type TestClientFactory

type TestClientFactory struct {
	TestClient *Client
}

func (*TestClientFactory) NewClient

func (f *TestClientFactory) NewClient(token, endpoint string) *Client

Jump to

Keyboard shortcuts

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