icsgo

package module
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: GPL-3.0 Imports: 9 Imported by: 2

README

ics-go-sdk

ics golang restapi client

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*client.Client

	SessionManager *session.Manager
}

func NewClient

func NewClient(ctx context.Context, u *url.URL, insecure bool) (*Client, error)

NewClient creates a new client from a URL. The client authenticates with the server with username/password before returning if the URL contains user information.

func (*Client) Login

func (c *Client) Login(ctx context.Context, u *url.Userinfo) error

Login dispatches to the SessionManager.

func (*Client) Logout

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

Logout dispatches to the SessionManager.

type DefaultMultipleFoundError

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

func (DefaultMultipleFoundError) Error

type DefaultNotFoundError

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

func (*DefaultNotFoundError) Error

func (e *DefaultNotFoundError) Error() string

type ICSConnection

type ICSConnection struct {
	Client          *client.Client
	Username        string
	Password        string
	Hostname        string
	Port            string
	AccessKeyID     string
	AccessKeySecret string
	Insecure        bool
	// contains filtered or unexported fields
}

func (*ICSConnection) Connect

func (connection *ICSConnection) Connect(ctx context.Context) error

func (*ICSConnection) GetClient

func (connection *ICSConnection) GetClient() (*client.Client, error)

NewClient creates a new ics-go-sdk client for the ICSConnection obj

func (*ICSConnection) Logout

func (connection *ICSConnection) Logout(ctx context.Context) error

Logout calls SessionManager.Logout for the given connection.

func (*ICSConnection) NewClient

func (connection *ICSConnection) NewClient(ctx context.Context) (*client.Client, error)

NewClient creates a new ics-go-sdk client for the ICSConnection obj

func (*ICSConnection) UpdateCredentials

func (connection *ICSConnection) UpdateCredentials(username string, password string)

UpdateCredentials updates username and password. Note: Updated username and password will be used when there is no session active

type MultipleFoundError

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

func (*MultipleFoundError) Error

func (e *MultipleFoundError) Error() string

type NotFoundError

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

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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