session

package
v0.0.0-...-15eb0b2 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session struct {
	sync.RWMutex

	Uid         string
	DisplayName string
	// contains filtered or unexported fields
}

func New

func New(persistPath string) *Session

func (*Session) Cookies

func (s *Session) Cookies() string

Cookies returns the cookie string for auth usage

func (*Session) Dumps

func (s *Session) Dumps() ([]byte, error)

func (*Session) Loads

func (s *Session) Loads(content []byte) error

func (*Session) Renew

func (s *Session) Renew() (cookies string, err error)

func (*Session) RenewWithQrCode

func (s *Session) RenewWithQrCode() (image []byte, err error)

RenewWithQrCode starts a new session and returns the qrcode image

func (*Session) Wait

func (s *Session) Wait(ctx context.Context) (cookies string, err error)

Wait waits for the scan action and get the necessary baseCookies & user info

Jump to

Keyboard shortcuts

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