socketcfg

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package socketcfg provides apiconnector client connection settings

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Socketcfg

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

Socketcfg is a struct representing connection settings used as POST data for http request against the insanely fast 1API backend API.

func (*Socketcfg) EncodeData

func (s *Socketcfg) EncodeData() string

EncodeData method to return the struct data ready to submit within POST request of type "application/x-www-form-urlencoded"

func (*Socketcfg) SetCredentials

func (s *Socketcfg) SetCredentials(username string, password string, otpcode string)

SetCredentials method to set username and password to use for api communication

func (*Socketcfg) SetEntity

func (s *Socketcfg) SetEntity(entityid string)

SetEntity method to set the system entity id used to communicate with "1234" -> OT&E system, "54cd" -> LIVE system

func (*Socketcfg) SetSession

func (s *Socketcfg) SetSession(sessionid string)

SetSession method to set a API session id to use for api communication instead of credentials which is basically required in case you plan to use session based communication or if you want to use 2FA

func (*Socketcfg) SetUser

func (s *Socketcfg) SetUser(username string)

SetUser method to set an user account (must be subuser account of your login user) to use for API communication use this if you want to make changes on that subuser account or if you want to have his data view

Jump to

Keyboard shortcuts

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