icsgo

package module
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2021 License: GPL-3.0 Imports: 8 Imported by: 4

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 ICSConnection

type ICSConnection struct {
	Client   *client.Client
	Username string
	Password string
	Hostname string
	Port     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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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