enel

package module
v0.0.0-...-40e5e98 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

README

ENEL query flow

Leia em português aqui.

This package uses chromedp to navigate through the enel user page.

It returns the following data:

  • dueDate
  • status
  • barCode
  • value

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flow

type Flow struct {
	User    UserData
	Invoice Invoice
	// contains filtered or unexported fields
}

Flow contains and the data and methods needed to crawl through the enel webpage

func NewFlow

func NewFlow(headless bool) Flow

NewFlow creates a flow with context besides user and invoice data

func (*Flow) InvoiceFlow

func (flow *Flow) InvoiceFlow() (Invoice, error)

InvoiceFlow crawls through the enel page

type Invoice

type Invoice struct {
	DueDate string
	Value   string
	BarCode string
	Status  string
}

Invoice has all the invoice data needed for payment

type UserData

type UserData struct {
	Email string `json:"email"`
	Pw    string `json:"pw"`
	Name  string `json:"name"`
}

UserData has all the needed data to login

Jump to

Keyboard shortcuts

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