jobcan

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2022 License: MIT Imports: 10 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

jobcan

Use the cli to clock in clock off without hassle.

Usage

./jobcan {check | toggle} -u <email@example.com> -p <password>
# specify -c "" to disable persistent cookie

If you encountered unable to extract working status error, you might need to delete the cookies and sign-in again.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(cookiefile, username, password string, debug bool) *Client

func (*Client) Close

func (c *Client) Close() error

func (*Client) GetStatus

func (c *Client) GetStatus(ctx context.Context) (status string, err error)

func (*Client) IsLogined

func (c *Client) IsLogined() bool

func (*Client) Login

func (c *Client) Login(ctx context.Context) (status string, token string, err error)

func (*Client) Reset

func (c *Client) Reset()

func (*Client) Toggle

func (c *Client) Toggle(ctx context.Context) (prevStatus string, newStatus string, err error)

type Jar

type Jar struct {
	*cookiejar.Jar
}

func NewJar

func NewJar(o *cookiejar.Options) *Jar

func (*Jar) CheckSession

func (j *Jar) CheckSession() (expired bool)

func (*Jar) SetCookies

func (j *Jar) SetCookies(u *url.URL, cookies []*http.Cookie)

Directories

Path Synopsis
cmd
cli command

Jump to

Keyboard shortcuts

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