lucky

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDefaultClient

func NewDefaultClient() *http.Client

Types

type Draw

type Draw struct {
	Numbers []int `json:"numbers"`
	Starts  []int `json:"stars"`
}

type Draws

type Draws []Draw

func (*Draws) Generate

func (d *Draws) Generate(disableRepeatedDrawCheck bool) *Draw

type FileSystem

type FileSystem interface {
	ReadFile(path string) ([]byte, error)
}

type HdFileSystem

type HdFileSystem struct{}

func (HdFileSystem) ReadFile

func (fs HdFileSystem) ReadFile(path string) ([]byte, error)

type HttpCli

type HttpCli interface {
	Do(req *http.Request) (*http.Response, error)
}

type Options

type Options struct {
	Client      HttpCli
	FileSystem  FileSystem
	BaseUrl     string
	FromYear    int
	UserAgent   string
	ShouldStore bool
	StoreFile   string
}

func (*Options) ParseFromFile

func (o *Options) ParseFromFile(path string) (*Draws, error)

func (Options) ScrapeFrom

func (o Options) ScrapeFrom(ctx context.Context) (Draws, error)

Jump to

Keyboard shortcuts

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