Documentation ¶
Index ¶
- type Sdk
- func (s *Sdk) GetSessionID() string
- func (s *Sdk) Login(token string) (SdkResult, error)
- func (s *Sdk) Logout() (bool, error)
- func (s *Sdk) New(scheme, host string, port int, isDevelopment bool) error
- func (s *Sdk) Request(method string, args interface{}) (SdkResult, error)
- func (s *Sdk) SetSessionID(newSessionID string) error
- type SdkResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sdk ¶
type Sdk struct { HasAuthenticated bool // Controlled using login and logout methods. // contains filtered or unexported fields }
Sdk struct definition for all operations in this library. Will store the connecitivty attributes as: host, port and scheme. If you want to change this attributes, you need re-initialize the interface. Also, will store the sessionID, this attribute will be rewritted or getted using GetSessionID or SetSessionID
func (*Sdk) GetSessionID ¶
GetSessionID is a getter function used to retrieve the sessionID used in all SDK requests.
func (*Sdk) Login ¶
Login method, you should use this if you want to login quickly, you can find more information about this function in the SDK documentation as "token/login" method. Disclaimer: method "core/login" was deprecated at 2015.
func (*Sdk) Logout ¶
Logout method, you should use this if you want to logout quickly, you can find more information about this function in the SDK documentation as "core/logout" method
func (*Sdk) New ¶
New constructor initialize the instance, please send port as 0, host and scheme as empty string ("") if you will use Wialon Hosting
func (*Sdk) Request ¶
Request function to call any function in Wialon SDK, method is defined as "svc" in the official documentation, args is "params" argument in the documentation
func (*Sdk) SetSessionID ¶
SetSessionID is a setter function used to set a new sessionID, generally you should use this function when you already has a session