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

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

Jump to

Keyboard shortcuts

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