auth

package
v0.0.0-...-e4508ab Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthResponse

type AuthResponse struct {
	Token   string `json:"token"`
	Product string `json:"product"`
	Status  string `json:"status"`
	Error   string `json:"error"`
}

type AuthService

type AuthService struct {
	AppKey string

	SessionToken string
	// contains filtered or unexported fields
}

func NewAuthService

func NewAuthService(appKey string, username string, password string, certFile string, keyFile string, connectionTimeout uint) AuthService

NewAuthService creates a AuthService struct.

func (AuthService) KeepAlive

func (as AuthService) KeepAlive() error

KeepAlive extends the session timeout period. At the moment the international (.com) Exchange the current session time is 8 hours. If you don't call Keep Alive within the specified timeout period, the session will expire. Note: Session times aren't determined or extended based on API activity.

func (*AuthService) Login

func (as *AuthService) Login() (err error)

Login authenticates account on the betfair servers and stores valid session token to be used on later requests.

func (*AuthService) Logout

func (as *AuthService) Logout() error

Logout terminates current session.

type LoginResponse

type LoginResponse struct {
	LoginStatus  string `json:"loginStatus"`
	SessionToken string `json:"SessionToken"`
}

Jump to

Keyboard shortcuts

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